tigrc(5): suggest git aliases for external commands requiring shell ops
Fix the view clearing to only be effective for displayed views
The feature was introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428.
The feature was introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428.
Make behavior of horizontal scrolling configurable
Requested by bill lam.
Requested by bill lam.
Fix handling of quoted strings in the config file
parse_string() adapts the string length to automatically remove quotation
marks when copying the string. However, when calling string_ncopy_do()
strlen(arg) used to be called again instead of using the adapted value.
This e.g. led to wrong locale settings when using
set commit-encoding = "UTF-8"
and thus a slightly messed up display.
Thanks to Gerfried Fuchs for reporting this.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
parse_string() adapts the string length to automatically remove quotation
marks when copying the string. However, when calling string_ncopy_do()
strlen(arg) used to be called again instead of using the adapted value.
This e.g. led to wrong locale settings when using
set commit-encoding = "UTF-8"
and thus a slightly messed up display.
Thanks to Gerfried Fuchs for reporting this.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tigrc(5): fix error in examples for the set command
Fixes Debian bug #514990 reported by Gerfried Fuchs.
Fixes Debian bug #514990 reported by Gerfried Fuchs.
Tree view: draw submodule entry modes as "m---------"
Inspired by gitweb.
Inspired by gitweb.
Status view: report failures to update a file
Also, wait showing update progress until 5% has been reached.
Also, wait showing update progress until 5% has been reached.
Ignore broken pipe signals
Can be caused if a forked git process exits with an error. Tig should
detect this by checking the exit code of the child using the return
value done_io().
Can be caused if a forked git process exits with an error. Tig should
detect this by checking the exit code of the child using the return
value done_io().
Use putenv instead of setenv
Not all platforms (e.g. Solaris) provide setenv. Based on patch by
SungHyun Nam.
Not all platforms (e.g. Solaris) provide setenv. Based on patch by
SungHyun Nam.
manual: Correct the keys to move the cursor one line up/down
Signed-off-by: Carsten Brockmann <cabro@gmx.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Carsten Brockmann <cabro@gmx.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Status view: upon failure to open a file show error message
Refactor and share view maximization code from view-close handling
Fix io_strerror return type
Add support for handling core.worktree
If this option is found set up GIT_DIR and GIT_WORK_TREE. Also, pass
the known git directory path to git ls-remote.
Requested-by: bill lam
If this option is found set up GIT_DIR and GIT_WORK_TREE. Also, pass
the known git directory path to git ls-remote.
Requested-by: bill lam
Optimize read_repo_config_option to reduce string comparisons
Move setting of remote branch from repo config to separate function
Mark enum_maps and other data tables as const
Use check_blame_commit when handling REQ_ENTER
NEWS: Mention Jeff's uninitialized variable bug fix
From commit 2677b744313c939890a8f6b3316f9d5452581ab8.
From commit 2677b744313c939890a8f6b3316f9d5452581ab8.
Handle blaming beyond the creation of file more gracefully
Currently when you ask to re-blame from the parent of a
commit that created the file, blame_read_file will complain
that it cannot get the file contents ("No blame exist").
At the time we try to read the file, it is too late to abort
the operation, as we have already changed to the new blame
view. However, we can detect this situation early by
limiting the selection of the parent revision to the
particular path of interest: if it returns a parent even
with path-limiting, then we know the path exists; if not,
then we know it doesn't.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Currently when you ask to re-blame from the parent of a
commit that created the file, blame_read_file will complain
that it cannot get the file contents ("No blame exist").
At the time we try to read the file, it is too late to abort
the operation, as we have already changed to the new blame
view. However, we can detect this situation early by
limiting the selection of the parent revision to the
particular path of interest: if it returns a parent even
with path-limiting, then we know the path exists; if not,
then we know it doesn't.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Blame view: add guesstimation of line number when blaming parent commit
... by looking through the commit's diff for the hunk which introduced
the line. Also, try to set the filename properly.
... by looking through the commit's diff for the hunk which introduced
the line. Also, try to set the filename properly.
Use file and line number information when loading blame for commit
This was developed in parallel and is very similar to patch posted by
Jeff King, however, with different goals in mind.
Message-Id: <20090207112613.GA18079@coredump.intra.peff.net>
This was developed in parallel and is very similar to patch posted by
Jeff King, however, with different goals in mind.
Message-Id: <20090207112613.GA18079@coredump.intra.peff.net>
Make the blame view expand tabs at drawing time
Introduce common view position update helper
So jumping to search results and line numbers will work more uniform.
So jumping to search results and line numbers will work more uniform.
Improve restoring of the view position to bound the offset
Jump to line when a number is entered in the prompt
Warn users about integers in ~/.tigrc being out of bound
Fix uninitialized variable in string_expand_length
This led to totally unpredictable results from the function. The style
matches the loop in string_expand.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This led to totally unpredictable results from the function. The style
matches the loop in string_expand.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add support for 256 colors by allowing "colorN" names similar to Mutt
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Improve on branch information in the status view
The file checks was inspired by the prompt code from the git bash
completion script.
The file checks was inspired by the prompt code from the git bash
completion script.
Simplify setting the default for the system configuration file
Refactor and unify timezone parsing
Remove the need for the OPEN_NOMAXIMIZE flag
It was only used for the status view together with the OPEN_RELOAD flag.
However, since reloading and refreshing is the same for the status use
OPEN_REFRESH instead.
It was only used for the status view together with the OPEN_RELOAD flag.
However, since reloading and refreshing is the same for the status use
OPEN_REFRESH instead.
Remove unused OPEN_BACKGROUNDED flag
Use enum_map for handling obsolete color names
Use enum_map for handling obsolete request names
Refactor the int_map interface into new enum_map interface
Renames int_map to enum_map and set_from_int_map to map_enum, which
now uses string_enum_compare instead of strncasecmp.
Renames int_map to enum_map and set_from_int_map to map_enum, which
now uses string_enum_compare instead of strncasecmp.
Cleanup and simplify option file parsing
tig-0.14
Read tigrc(5) options from git configuration files
tig(1): correct info on tree view related environment variables
Was not updated during the introduction of %(directory) and move to the
IO API.
Was not updated during the introduction of %(directory) and move to the
IO API.
Add release script documenting the release procedure
Spell check all text files and add dictionary to speed it up
tigrc(5): document the tree view colors
Also renames the tree-parent line to tree-head.
Also renames the tree-parent line to tree-head.
Refactor file mode drawing; rename tree-mode color to mode
Replace usage of the main-author color with the author color
It is used in draw_author() which is used by the main, blame and tree
views.
It is used in draw_author() which is used by the main, blame and tree
views.
Move usage string near parse_options
Tree view: improve handling of empty trees
Fix reverting of unmerged status entries
... by using update-index --cacheinfo.
... by using update-index --cacheinfo.
Add support for horizontal scrolling
It is still basically a big hack, and might need some tuning.
It is still basically a big hack, and might need some tuning.
Expand tabs in displayed lines to not rely on ncurses to expand them
Treat empty '/' as "find next"
When the user requests a forward or backwards search, if
they provide no search string then we just abort the search.
However, many other programs (such as less and vi) treat
this as "repeat the last search", so users may have their
fingers trained to do this rather than use the explicit
"find next" feature.
This patch causes tig, if there was a previous search, to
find the next (or previous, if "?" was used) match in such a
case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
When the user requests a forward or backwards search, if
they provide no search string then we just abort the search.
However, many other programs (such as less and vi) treat
this as "repeat the last search", so users may have their
fingers trained to do this rather than use the explicit
"find next" feature.
This patch causes tig, if there was a previous search, to
find the next (or previous, if "?" was used) match in such a
case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
TODO: elaborate and regroup into 'before tig-1.0' and 'long term goals'
Move initial view setup into parse_options
Move parse_option so it has access to view definitions
Remove parsing of deprecated option -S and subcommands log and diff
Rename & move read_properties and git_properties
They should be part of the IO API and are now called io_load and
run_io_load.
They should be part of the IO API and are now called io_load and
run_io_load.
Use warn() for warnings emitted during config file loading
Fix scrolling bugs in gnome-terminal and (u)xterm
Introduces workarounds to fix glitches appearing after the recent screen
drawing optimizations.
Introduces workarounds to fix glitches appearing after the recent screen
drawing optimizations.
BUGS: document problem with scrolling in (u)xterm
Tune the view clearing to wait until 2 seconds has passed
The code introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428 broke
the smoothness of updates in some cases.
The code introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428 broke
the smoothness of updates in some cases.
Handle all cursor positioning in get_input
Also fixes use of the C++ true keyword which crept in in commit
babaa6f7a97cbe3948588e5181de0801ce32b792 (Refactor user input handling
into separate function).
Also fixes use of the C++ true keyword which crept in in commit
babaa6f7a97cbe3948588e5181de0801ce32b792 (Refactor user input handling
into separate function).
Optimize drawing by updating the screen in one go
Switch to use wnoutrefresh everywhere and call doupdate in the get_input
loop. This allows multiple updates to be made while only one burst of
IO occurs.
Switch to use wnoutrefresh everywhere and call doupdate in the get_input
loop. This allows multiple updates to be made while only one burst of
IO occurs.
Abbreviate author names to initials when author-width < 6
Refactor author drawing into draw_author
Fix tokenizing when parsing ~/.tigrc
When moving to use argv_from_string() in set_option() a regression was
introduced causing problems with parsing of multiple spaces between
arguments. For example:
color date yellow default
Reported by Clifford Caoile.
When moving to use argv_from_string() in set_option() a regression was
introduced causing problems with parsing of multiple spaces between
arguments. For example:
color date yellow default
Reported by Clifford Caoile.
Workaround bug exposed by the redrawwin removal in do_scroll_view
The bug means that the message from scrolling up one line when
impossible followed by scrolling down one line is not removed by the
next action.
Workaround this by inserting an extra call to report("") before the call
to wrefresh().
The bug means that the message from scrolling up one line when
impossible followed by scrolling down one line is not removed by the
next action.
Workaround this by inserting an extra call to report("") before the call
to wrefresh().
Make cursor updating when resizing the display and loading a view
Change scrollok strategy to leave it off unless when calling wscrl
Should lead to fewer calls.
Should lead to fewer calls.
Initialize status_empty flag to FALSE
Fixes cursor restoring when loading the status view at startup.
Fixes cursor restoring when loading the status view at startup.
Eliminate unneeded calls to redrawwin
This optimize the view drawing especially when scrolling/moving down the
main view with the diff view open. Should make browsing more bareable
over slow links.
This optimize the view drawing especially when scrolling/moving down the
main view with the diff view open. Should make browsing more bareable
over slow links.
TODO: a small commit cache should be employed at some point
Help view: show the action name similar as in Mutt's help view
Remove preallocation of view lines in help_open
corrected doubly used ID view-manipulation in manual.txt
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tigrc(5) & manual: move view specific actions out of the misc group
Add support for loading blame for parent commits
Requested by Jeff King in <20080410040213.GA29618@sigill.intra.peff.net>
Requested by Jeff King in <20080410040213.GA29618@sigill.intra.peff.net>
Refactor prompting for user input
Rename tree-parent action to parent
Minor cleanup of the tree view code; fix enter on the first line
TODO: remove resolved item
Tree view: improve to look less like plumbing
It is now more like `ls` by annotating the output of ls-tree with commit
information.
It is now more like `ls` by annotating the output of ls-tree with commit
information.
Refactor main_read to create parse_author_line
update_view: remove an unneeded goto
Fix floating point bug in the blame reporting
Also call end_update for views with custom open function
Broken by 49dc4030694e22b7f141bfb13565783985c48b77
Broken by 49dc4030694e22b7f141bfb13565783985c48b77
Add -O0 to the debug flags
Rectify arg indexes changes in blame --no-color fix
Introduced in 78685441f4effd81082a53abb4c1246ebd1e0e49
Introduced in 78685441f4effd81082a53abb4c1246ebd1e0e49
Fix status loading of unmerged entries to avoid access to freed memory
Fix kill_io() to only call kill(2) when pid is non-zero
Blame view: fix reloading of the diff view for changes not yet committed
The regression was introduced in e00ea5d (Blame: do to not reload the
diff view for same commits).
The regression was introduced in e00ea5d (Blame: do to not reload the
diff view for same commits).
Oops, always specify --no-color when using git diff
Blame view: fix diffing of lines marked as not yet committed
Add support for restoring the view position in reloadable views
The status view still uses its own more specialized restoring code.
There are still some cases which are not completely handled. For
example, restoring will only be done when the current line is the first
in the view, thus changing the view position will cancel the restoring.
However, if you change back to the first line restoring will be enabled.
The status view still uses its own more specialized restoring code.
There are still some cases which are not completely handled. For
example, restoring will only be done when the current line is the first
in the view, thus changing the view position will cancel the restoring.
However, if you change back to the first line restoring will be enabled.
Fix status_exists to be consistent with data displayed in the stage view
Make it possible to call select_view_line for non-displayed views
Refactor find_next_line into select_view_line
Refactor user input handling into separate function
Fixes resizing while the prompt is open.
Fixes resizing while the prompt is open.
Add support for opening any blob in an editor
Prefer werase to wclear when possible to reduce flickering
Use werase instead of wclear in redraw_view and optionally make
redraw_display use wclear before calling redraw_view. After this, wclear
is only used when there is possibility that the screen could have been
corrupted.
Use werase instead of wclear in redraw_view and optionally make
redraw_display use wclear before calling redraw_view. After this, wclear
is only used when there is possibility that the screen could have been
corrupted.