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>
Let ncurses take care of expanding tabs by setting its TABSIZE variable
Rename the default tab size from TABSIZE to TAB_SIZE, since it shadows
the public ncurses TABSIZE variable which controls how the waddch-family
expands tabs when drawing. This makes it possible to finally handle
tabsizes different from 8 for UTF-8.
Rename the default tab size from TABSIZE to TAB_SIZE, since it shadows
the public ncurses TABSIZE variable which controls how the waddch-family
expands tabs when drawing. This makes it possible to finally handle
tabsizes different from 8 for UTF-8.
Refreshing the current view when F5 is pressed (like gitk)
Fix regression from "Improve staging of diff chunks"
In commit 234918423a4fac44375317e6c9e7ee54ea09379c the change to
stage_update reads:
static bool
stage_update(struct view *view, struct line *line)
{
- if (!opt_no_head && stage_line_type != LINE_STAT_UNTRACKED &&
- (line->type == LINE_DIFF_CHUNK || !stage_status.status)) {
- if (!stage_update_chunk(view, line)) {
where the !stage_status.status part was meant to match whole sections.
Reinstate this behavior so that pressing 'u' when in the stage view for
a section of changes it will stage all changed files in that section.
In commit 234918423a4fac44375317e6c9e7ee54ea09379c the change to
stage_update reads:
static bool
stage_update(struct view *view, struct line *line)
{
- if (!opt_no_head && stage_line_type != LINE_STAT_UNTRACKED &&
- (line->type == LINE_DIFF_CHUNK || !stage_status.status)) {
- if (!stage_update_chunk(view, line)) {
where the !stage_status.status part was meant to match whole sections.
Reinstate this behavior so that pressing 'u' when in the stage view for
a section of changes it will stage all changed files in that section.
Do not reload status and stage views on errors
It hides the error message.
It hides the error message.
Fix AsciiDoc replacing -- in --with-libiconv
Squelsh output of update-index when loading the status view (part II)
Also include messages from stdout.
Also include messages from stdout.
Rebind the maximize action to 'O' instead of 'M'
The latter is already used for launching the mergetool when in the
status view.
The latter is already used for launching the mergetool when in the
status view.
tig-0.11
Use sans-serif font for the README page
Update copyright notice for the manual
Remove unused blame line attributes
Use tables for listing the UI colors
Minor cleanup in blame_draw
Setup colors for the selected line in draw_view_line()
Make the main and blame view share date drawing and date colors
Renames the main-date color to date.
Renames the main-date color to date.
Squelsh output of update-index when loading the status view
Avoid splitting the view when navigating stage view in full screen
Use 3 as the minimum width of formatted line numbers
It gives a more pleasant experience when "digging" through commits.
And of course, most commits will have diffs smaller than 1000 lines!?
For the blame view it means less flickering in the startup when the
whole file is read.
It gives a more pleasant experience when "digging" through commits.
And of course, most commits will have diffs smaller than 1000 lines!?
For the blame view it means less flickering in the startup when the
whole file is read.
Revert "When toggling options redraw the view instead of the whole display"
This reverts commit d79f15772b0489ae3bf77322706016c733a714c9.
This reverts commit d79f15772b0489ae3bf77322706016c733a714c9.
Fix compatibility for git rev-parse without --symbolic-full-name
Use symbolic-ref instead.
Use symbolic-ref instead.
Error out when starting up in empty main or blame view
This usually means that the arguments did not match any revisions or file.
This usually means that the arguments did not match any revisions or file.
Improve staging of diff chunks
As suggested by Petr Baudis some year ago, make updating of chunks work
stage the chunk the cursor line is within instead of the whole file. Still
stage everything when the cursor is in the diff --stat header.
As suggested by Petr Baudis some year ago, make updating of chunks work
stage the chunk the cursor line is within instead of the whole file. Still
stage everything when the cursor is in the diff --stat header.
Reload the status and stage views after a run request has been handled
Add support for refreshing of the stage view
Consolidate stage reloading for the edit, refresh, and update requests.
It works by first reloading the status view after which the stage view
is closed or reloaded depending on whether the status information of the
stage view still is valid.
Consolidate stage reloading for the edit, refresh, and update requests.
It works by first reloading the status view after which the stage view
is closed or reloaded depending on whether the status information of the
stage view still is valid.
When toggling options redraw the view instead of the whole display
Use werase() instead of wclear() when reloading a view
It behaves much better by not causing the parent view to be repainted.
It behaves much better by not causing the parent view to be repainted.
Share the line number colors between blame view and others
Renames the blame-lineno color to line-number.
Renames the blame-lineno color to line-number.
Rename load_repo_config() to load_git_config()
Do not load repository references when acting as a pager
It will cause git ls-remote to print an error message.
It will cause git ls-remote to print an error message.
Merge branch 'master' of remote-server:src/tig
status: use draw_text completely
Make local tags and normal branches use normal font-weight
Change color of HEAD reference to use cyan as normal branches
but with bold font.
Change color of HEAD reference to use cyan as normal branches
but with bold font.
Show the tracked remote branch with bold text
... and others with normal font-weight.
... and others with normal font-weight.
Add draw_lineno() and use when drawing the blame and pager view
Add action to maximize the current view; bound to M by default
Disable opening views that require a git directory when in pager mode
Fix pager mode by always doing the isatty()
Also relax the opt_git_dir check.
Also relax the opt_git_dir check.
stage: disable whitespace warnings from git apply when staging updates
Improve perfomance and usability when updating many files
Split the update function into one for single file and all files in a
section so that only one fork of update-index is required in both cases.
Show progress for long running updates (e.g. importing the Linux kernel)
where git needs to hash many objects (>20k).
Split the update function into one for single file and all files in a
section so that only one fork of update-index is required in both cases.
Show progress for long running updates (e.g. importing the Linux kernel)
where git needs to hash many objects (>20k).
Fix and improve status refreshing after updating
Update the view offset so the current line is already visible.
This requires that the display is split or initialized before
starting to load the view so status_open has the view->height
available.
Update the view offset so the current line is already visible.
This requires that the display is split or initialized before
starting to load the view so status_open has the view->height
available.
Fix uninitialized variable warning
Output extra \n on tig -h
The usage string does not contain a '\n' as the last character which is
annoying when calling 'tig -h'.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
The usage string does not contain a '\n' as the last character which is
annoying when calling 'tig -h'.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Avoid reloading the status view when nothing was updated
Oops, fix delimiter documentation
Add support for preparing the initial commit in the status view
Rename "main-delim" color to the more generic "delimiter"
It was already used by views other than main.
It was already used by views other than main.
Show the current branch in the status view
Also, improve the positioning of the cursor line after updates to
restore or select something that is "updateable". Adding new files
should now work more intuitively.
Also, improve the positioning of the cursor line after updates to
restore or select something that is "updateable". Adding new files
should now work more intuitively.
Save current branch from rev-parse output and highlight it
The chosen color is red with bold font, however, maybe all other refs
should be toned down and only the current branch should use bold font.
The chosen color is red with bold font, however, maybe all other refs
should be toned down and only the current branch should use bold font.
blame: Fix opening from subdirectory and consecutive invokations
Remove deprecated options and cleanup option parsing
More blame view fixes
Various fixes and improvements of the new blame view
- Fix entering from status and stage views by making opt_ref setting
optional.
- Use separate opt_file variable, since the tree view also uses
opt_path.
- Fix entering from status and stage views by making opt_ref setting
optional.
- Use separate opt_file variable, since the tree view also uses
opt_path.
Add blame view
It may both be entered from the command line using:
tig blame [rev] path
or from either the status and stage, as well as by using the tree view
to navigte.
It may both be entered from the command line using:
tig blame [rev] path
or from either the status and stage, as well as by using the tree view
to navigte.
Add hack to allow view loading to have multiple phases
.. by avoiding end_update() call after last read line.
.. by avoiding end_update() call after last read line.
Simplify subcommand option parsing by moving it out of the loop
draw_text: remove unused col argument
Use rewritten parent info from --parents to simplify the revgraph
Move unrelated UTF-8 setup code out of parse_options