IO API: replace init_io_fd with io_open which calls fopen(3)
IO API: use in the status view
IO API: use when loading repository properties
This introduces an incompatibility regarding the format of the
TIG_LS_REMOTE environment variable.
This introduces an incompatibility regarding the format of the
TIG_LS_REMOTE environment variable.
IO API: use in the stage view
IO API: obsolete opt_pipe
IO API: obsolete opt_cmd by using prepare_update in status_enter
IO API: use prepare_update when parsing command line arguments
IO API: use in add_describe_ref
IO API: use in the blame view
IO API: unify tree view and the default path in begin_update
IO API: use for the main, log, diff, tree and blob views
This introduces an incompatibility with previous versions.
This introduces an incompatibility with previous versions.
IO API: use when preparing to run commands from the prompt
IO API: convert status checkout/revert support
IO API: use when running external commands
IO API: refactor the run request command formatter
Adds support for new %(file), %(directory) and %(ref) identifiers.
Also adds infrastructure for working with argument arrays
Adds support for new %(file), %(directory) and %(ref) identifiers.
Also adds infrastructure for working with argument arrays
IO API: add small library for reading files and running programs
Blame: do to not reload the diff view for same commits
Blame: update blame to selected commit when pressing 'B'
Blame: remove unused member of struct blame
Add setup_update for initialize incremental view updates
Refactors common parts of begin_update and blame_open.
Refactors common parts of begin_update and blame_open.
Slightly reduce memory usage for keybindings
Move formatting of blame --incremental command to blame_read_file
Doing it in blame_open after starting the command makes error handling
harder and the code was indeed buggy.
Doing it in blame_open after starting the command makes error handling
harder and the code was indeed buggy.
Minor simplification of blame_open
Don't use view->cmd to share state in the blame view
Fix drawing loading views that are not displayed.
Add support for launching the editor from the tree view
Only supported for files in the currently checked out head.
Requested by Cyril Romain.
Only supported for files in the currently checked out head.
Requested by Cyril Romain.
Replace opt_no_head with opt_head_rev in order to save the HEAD rev
Add is_initial_commit macro which replaces opt_no_head tests. Also,
update ref_head and ref_commit with the resolved HEAD revision.
Add is_initial_commit macro which replaces opt_no_head tests. Also,
update ref_head and ref_commit with the resolved HEAD revision.
Use switch statement in tree_request
Refuse to open blame view for all non-file entries in the tree view
Refuse to open deleted files from the status and stage views
tigrc(5): minor fixes and improvements from wip/run-command
Refuse to open a directory in the status and stage view
Adds suffixcmp() used for checking if the status entry name ends
with "/". Also use it for repository reference loading.
Adds suffixcmp() used for checking if the status entry name ends
with "/". Also use it for repository reference loading.
Fix waiting for input after executing a run request in pager mode
When in pager mode, stdin should not be touched. After executing a run
request a getc(stdin) was done to wait for the user's command to
continue, which didn't result in the expected behavior. To fix this
store the proper TTY handle in the new opt_tty variable which is set up
by init_display().
When in pager mode, stdin should not be touched. After executing a run
request a getc(stdin) was done to wait for the user's command to
continue, which didn't result in the expected behavior. To fix this
store the proper TTY handle in the new opt_tty variable which is set up
by init_display().
update_view: Check the pipes and call end_update() before redrawing
This allows the main view to finish its updating of the revision graph
so that it is rendered properly for the last commit. As a bonus, it also
removes a goto.
This allows the main view to finish its updating of the revision graph
so that it is rendered properly for the last commit. As a bonus, it also
removes a goto.
Use "--" to separate file argument to git-checkout
Cleanup and fix the main loop to make view point to the current view
Update and improve the manual
Especially the section on external commands and commands from the
environment is reworked. The section on the viewer is moved up.
Especially the section on external commands and commands from the
environment is reworked. The section on the viewer is moved up.
Remove documentation relicts from before the option parsing was changed
Introduce prefixcmp macro to reduce code verbosity
Separate blame revision and file argument by "--" to avoid problems
Add bash completion for the blame subcommand
Remove outdated comment
Make more strings const
Sort references in the order: tags, heads, tracked remotes, remotes
tig-0.12.1
Rename checkout to revert and support individual diff chunks reverts
Avoid triggering assertion failure when reloading the status view
After staging a diff chunk, the stage view automatically reloads the
status view. If the staging happened while the status view is not
displayed an assertion failure is triggered by draw_view_line(). Fix it
by only conditionally redrawing the view in open_view().
After staging a diff chunk, the stage view automatically reloads the
status view. If the staging happened while the status view is not
displayed an assertion failure is triggered by draw_view_line(). Fix it
by only conditionally redrawing the view in open_view().
Consolidate and share view resetting via new reset_view()
Help view: move requests from the Misc group into separate groups
Help view: use "(no key)" instead of "'?'" to not confuse unbound actions
Clear the status line when closing a view
Avoids confusion from stale messages.
Avoids confusion from stale messages.
Fix bug introduced in commit for using --exclude-standard flag
Introduced in commit 33623c0022b49a5f2774b37a58726a95a4367447. The bug
is reproducible when running tig status in a newly created repository.
Introduced in commit 33623c0022b49a5f2774b37a58726a95a4367447. The bug
is reproducible when running tig status in a newly created repository.
Add support for refreshing the log view
Make OPEN_REFRESH imply OPEN_NOMAXIMIZE
... so the main view keeps its dimension when refreshing with the diff
view open.
... so the main view keeps its dimension when refreshing with the diff
view open.
Simplify view refreshing by adding new OPEN_REFRESH flag for open_view
Show complete shortlog for small releases
Improve checkout error reporting
Cleanup and make option argument strings const
Improve handling of unmatched quotes in ~/.tigrc
Make GIT_CONFIG only contain the config subcommand
Reload repository references when refreshing the main view
Avoid refreshing views when checkout is canceled by user
Also allow files to be checked out from stage view
Cleanup exclude rule setup by using ls-files --exclude-standard flag
This makes user specific ignore rules effective in the status view.
This makes user specific ignore rules effective in the status view.
Main: use --topo-order when arguments are given on the command line
main: automatically refresh after run requests
status: add support for checking out files with unstaged changes
TODO: support for jumping to parents' blame in the blame view
Add script for preparing release announcements
tig-0.12
Do not show boundary commits by default
They can cause confusing results when combined with the --author flag.
If they should be shown the --boundary option should be passed.
They can cause confusing results when combined with the --author flag.
If they should be shown the --boundary option should be passed.
main: implement refreshing by just rerunning the original command
Also updates NEWS to mention the fix from last commit.
Also updates NEWS to mention the fix from last commit.
Continue updates when pipe read has errno "Success"
When we are reading from a pipe and receive a signal, our
read call fails and ferror() returns true. The current
behavior is to call end_update and report failure. However,
we can detect this situation by checking that errno is set
to success and continue the reading process.
You can provoke this behavior by running a "tig blame" that
takes a few seconds and then resizing the terminal that tig
is running in (you should get an incomplete blame output and
the error "Failed to read: Success").
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
When we are reading from a pipe and receive a signal, our
read call fails and ferror() returns true. The current
behavior is to call end_update and report failure. However,
we can detect this situation by checking that errno is set
to success and continue the reading process.
You can provoke this behavior by running a "tig blame" that
takes a few seconds and then resizing the terminal that tig
is running in (you should get an incomplete blame output and
the error "Failed to read: Success").
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Clean up incomplete commits from main view listed for --no-walk
When --no-walk is given on the command line by the user it causes
boundary commits to be output with just the commit line, i.e:
> git rev-list --pretty=raw --boundary --no-walk HEAD
commit 60e8ea56880fc2e42008075d516c356ef605bc60
tree 5b76086e4deaf62d3f7baffc6f49840f61d4e79c
parent 145194bdfc8bf0b58185bbe28bc0097ce429de4d
author Jonas Fonseca <fonseca@diku.dk> 1217797175 +0200
committer Jonas Fonseca <fonseca@diku.dk> 1217797402 +0200
Remove the global opt_request variable
commit -145194bdfc8bf0b58185bbe28bc0097ce429de4d
When --no-walk is given on the command line by the user it causes
boundary commits to be output with just the commit line, i.e:
> git rev-list --pretty=raw --boundary --no-walk HEAD
commit 60e8ea56880fc2e42008075d516c356ef605bc60
tree 5b76086e4deaf62d3f7baffc6f49840f61d4e79c
parent 145194bdfc8bf0b58185bbe28bc0097ce429de4d
author Jonas Fonseca <fonseca@diku.dk> 1217797175 +0200
committer Jonas Fonseca <fonseca@diku.dk> 1217797402 +0200
Remove the global opt_request variable
commit -145194bdfc8bf0b58185bbe28bc0097ce429de4d
Remove the global opt_request variable
TODO: Option for abbreviating author names using just the initials
Gracefully ignore negative values given to options in ~/.tigrc
Add option 'author-width' to consumize the width of the author column
This can be used when the first few characteres are enough to tell the
authors apart or when the default width is too narrow.
To set the width of the author column to 10 put the following in the
~/.tigrc file:
set author-width = 10
This can be used when the first few characteres are enough to tell the
authors apart or when the default width is too narrow.
To set the width of the author column to 10 put the following in the
~/.tigrc file:
set author-width = 10
INSTALL: Mention the release notes in the NEWS file
Update NEWS
Remove useless check in blame_read_file()
Rename the gitlink:[] AsciiDoc macro to manpage:[]
It breaks for AsciiDoc version 8.2.3.
It breaks for AsciiDoc version 8.2.3.
Fix reopening blame view when it is already loading
Move call to end_update() if view->pipe is non-NULL from begin_update()
to open_view() so it is called also for views that defines an open()
operation.
Triggered by Jeff King's "show blame for parent" patch posted to the
git mailing list in <20080410040213.GA29618@sigill.intra.peff.net>.
Move call to end_update() if view->pipe is non-NULL from begin_update()
to open_view() so it is called also for views that defines an open()
operation.
Triggered by Jeff King's "show blame for parent" patch posted to the
git mailing list in <20080410040213.GA29618@sigill.intra.peff.net>.
Fix the view notification of end of reading
Move notification from update_view() to end_update() so <view>_read()
functions are also called when the user requests that loading views
are stopped. Allow ends to be forced so the extra spawning in the
blame view is closed as well.
Move notification from update_view() to end_update() so <view>_read()
functions are also called when the user requests that loading views
are stopped. Allow ends to be forced so the extra spawning in the
blame view is closed as well.
Makefile: remove bashism from distclean rule
Add stage-next action to jump to next diff chunk that can be staged
By default bound to '@'. Requested by Pascal Obry.
By default bound to '@'. Requested by Pascal Obry.
Make configure check for ncurses header files
First ncursesw/ncurses.h, then ncurses/ncurses.h, and finally ncurses.h.
Also include ncurses.h by default instead of curses.h. On most system
ncurses.h should be a symlink to curses.h and this will avoid the
problem of including a non-ncurses header file.
This should fix systems like Solaris who ships their own version of
/usr/include/curses.h that is incompatible with ncurses.
Reported by SungHyun Nam.
First ncursesw/ncurses.h, then ncurses/ncurses.h, and finally ncurses.h.
Also include ncurses.h by default instead of curses.h. On most system
ncurses.h should be a symlink to curses.h and this will avoid the
problem of including a non-ncurses header file.
This should fix systems like Solaris who ships their own version of
/usr/include/curses.h that is incompatible with ncurses.
Reported by SungHyun Nam.
Drop use of $(...) for popen() and system() calls
Some shells don't support it, like the jsh that is used as /bin/sh on
some Solaris boxes, which results in the following error:
sh: syntax error at line 1: `(' unexpected
Fix the only user (reading remote information via git-ls-remote) to use
a much simpler shell syntax.
Reported by SungHyun Nam.
Some shells don't support it, like the jsh that is used as /bin/sh on
some Solaris boxes, which results in the following error:
sh: syntax error at line 1: `(' unexpected
Fix the only user (reading remote information via git-ls-remote) to use
a much simpler shell syntax.
Reported by SungHyun Nam.
Add NEWS file
Fix warnings emitted with -pedantic
Refactor management of the current draw column and max draw width
Do it in the draw_* functions instead of all the view draw functions.
Do it in the draw_* functions instead of all the view draw functions.
Use draw_field() for the author field
This requires that utf8_length() makes the width/column available to
draw_text().
This requires that utf8_length() makes the width/column available to
draw_text().
Introduce draw_field() helper for drawing main and blame fields
It will draw spaces if the passed string is NULL.
It will draw spaces if the passed string is NULL.
Refactor revgraph drawing into draw_graphic()
blame: simplify handling of incomplete commit information
Always wait for the final blame information (the commit filename) to be
read before showing any commit information.
Always wait for the final blame information (the commit filename) to be
read before showing any commit information.
Simplify line attribute handling
- Add set_view_attr() that wraps calls to wattrset() and does the right
thing for the selected line. For successive calls without a change of
the attribute nothing will be done.
- Make draw_text() take a line attribute since all callers were already
calling set_view_attr().
Note: all attribute updates will now also call wchgat() in addition to
wattrset().
- Add set_view_attr() that wraps calls to wattrset() and does the right
thing for the selected line. For successive calls without a change of
the attribute nothing will be done.
- Make draw_text() take a line attribute since all callers were already
calling set_view_attr().
Note: all attribute updates will now also call wchgat() in addition to
wattrset().
Keep line graphics characters in a table initialized on startup
... and use ACS_VLINE instead of '|' for the revgraph.
... and use ACS_VLINE instead of '|' for the revgraph.
Add line-graphics option to disable graphics characters for line drawing
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Search checks reference names too
Do not search for matches in hidden view elements.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Do not search for matches in hidden view elements.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Document the main-commit colour option
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>