Improve parent blame to handle line-jumping for renames better
... by using git diff to compare directly the current and parent blob.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
... by using git diff to compare directly the current and parent blob.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Improve parent blame to detect renames by using the previous information
From git commit 96e117099c0e4f7d508eb071f60b6275038f6f37:
It gives the parent commit of the blamed commit, _and_ a path in that
parent commit that corresponds to the blamed path --- in short, it is
the origin that would have been blamed (or passed blame through) for
the line _if_ the blamed commit did not change that line.
This functionality was released in git version 1.6.3 in 2009-05-06.
From git commit 96e117099c0e4f7d508eb071f60b6275038f6f37:
It gives the parent commit of the blamed commit, _and_ a path in that
parent commit that corresponds to the blamed path --- in short, it is
the origin that would have been blamed (or passed blame through) for
the line _if_ the blamed commit did not change that line.
This functionality was released in git version 1.6.3 in 2009-05-06.
Free blame view data when reloading view
Fix clearing of the loading flag in the input select loop
The bug was introduced in 33e10c2599e16ff6690e7b0bbdd7a95e7f97c886.
The bug was introduced in 33e10c2599e16ff6690e7b0bbdd7a95e7f97c886.
Deprecate use of TIG_{MAIN,DIFF,LOG,TREE,BLOB}_CMD environment variables
Add support for splitting command line arguments
Make the branch view always prepare how the main view is loaded
Cleanup initialization of built-in run requests
Make view and run request argv members flexible and allocated
Further cleanup IO startup and initialization; fix io_run_append
Cleanup IO struct initialization
Make argv_copy always allocate its members
Move struct io's argv and dir members to struct view
Remove format_flags enum and its companion format_argv forward declaration
Move and rewrite io_format to become prepare_io
Make argv_copy support allocating argv members
Plug another memory leak and cleanup update start code while at it
Mark the argument array as freed in argv_free
Refactor io_complete into a single backend for {back,fore}ground and append IO
Introduce io_prepare as a fix to plug memory leaks related to argv formatting
Internalize format flags in the IO layer
Make the blame view format its own command arguments
Use view_request to unconditionally refresh views after run requests
Add view_request to call the view request method
Move and rename free_argv to argv_free
Make open_blob_editor use its own argv show and take blob ID as an argument
Use view_is_displayed when figuring setting up the open flags
Restructure option management code to separate section
Only update status view at EOF for displayed views
fix off-by-one on parent selection
Originally, we use "git rev-list -1 --parents" to get the
list of parents, and therefore the 0th slot was the commit
in question, the 1st slot was the 1st parent, and so forth.
Commit 0a46941 switched this to use --pretty=format:%P, so
that the menu-selection code could be easily used (which
counts items starting from 0). However, we only use the menu
code in the case of multiple parents. For a single parent,
this introduced an off-by-one where we look just past the
parent we want.
This patch fixes it by explicitly selecting the 0th parent
for the single parent case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Originally, we use "git rev-list -1 --parents" to get the
list of parents, and therefore the 0th slot was the commit
in question, the 1st slot was the 1st parent, and so forth.
Commit 0a46941 switched this to use --pretty=format:%P, so
that the menu-selection code could be easily used (which
counts items starting from 0). However, we only use the menu
code in the case of multiple parents. For a single parent,
this introduced an off-by-one where we look just past the
parent we want.
This patch fixes it by explicitly selecting the 0th parent
for the single parent case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Simplify handling of REQ_NEXT/REQ_PREVIOUS by using view->parent
Add view->prev to track history leaving view->parent for split views
Color 'Reviewed-by' and 'Tested-by' lines
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Rename the symbols 'reviewed' and 'tested'.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Rename the symbols 'reviewed' and 'tested'.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
When adding a keybinding check if the key is already bound
... and then overwrite it with the new request.
... and then overwrite it with the new request.
Allow built-in run requests to be unbound
By adding built-in run requests after loading config files and checking
if each of them conflicts with an existing keybinding.
Reported by Simon Ruderich.
By adding built-in run requests after loading config files and checking
if each of them conflicts with an existing keybinding.
Reported by Simon Ruderich.
Fix set_keymap to error when resolving an unknown keymap
The underlying interface was changed in commit f50084da to return
TRUE/FALSE instead of OK/ERR, but the only usage of set_keymap was not
updated. This lead to a potential segmentation fault.
Reported by Simon Ruderich.
The underlying interface was changed in commit f50084da to return
TRUE/FALSE instead of OK/ERR, but the only usage of set_keymap was not
updated. This lead to a potential segmentation fault.
Reported by Simon Ruderich.
Added support for displaying dates in localtime.
[ jf: updated documentation and added NEWS entry ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
[ jf: updated documentation and added NEWS entry ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fixed parse_timezone to correctly calculate the offset in seconds.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tigrc(5): fix typo
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix unbind behavoir
Fix problem where binding a key to none to deactivate it did not work.
Furthermore, make it show the usual "Unknown key, press 'h' for help".
Reported by Simon Ruderich.
Fix problem where binding a key to none to deactivate it did not work.
Furthermore, make it show the usual "Unknown key, press 'h' for help".
Reported by Simon Ruderich.
Introduce view->type member
Use foreach_view for the stop loading action
Remove unused VIEW_REQ() macro
Add view flag with information about whether the view supports refreshing
argv: remove now unused FORMAT_DASH
argv: make prepare_update use FORMAT_NONE
Branch view: add %(branch) variable tracking currently selected branch
This makes it possible to easily change branches from the branch view.
[ jf: updated docs, added NEWS entry, added checkout run request ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This makes it possible to easily change branches from the branch view.
[ jf: updated docs, added NEWS entry, added checkout run request ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
argv: move report call to format_arg method
argv: refactor argv_from_env to return an error state
utf8: move unicode related functions below the string helpers
utf8: make utf8_to_unicode return 0 when encountering invalid symbols
... instead of calling die.
... instead of calling die.
io: consolidate formatting into io_format
io: set io->error when syscalls fail and remove calls to report and die
io: rename IO methods to have io_ prefix
io: fix comment in io struct
Rename string_date to mkdate and add incorporate common checks
Move nodelay logic to the get_input read loop
Mark detached heads with [HEAD]; replace opt_head_rev with a struct ref
opt_codeset is only use in main, so make it local
Make utf8_length take opt_tab_size as a parameter
Remove line_graphic enum
Silence warning about unused computed value
Update copyrights
Only draw dates with non-zero seconds
Fix the display of relative date by storing the time zone information
Fix author abbreviation to handle multi-byte and multi-column characters
Use FALSE marco instead of C++ false value
prepare_update_file: assume file is relative to root directory
Status view: limit untracked file by the prefix/subdirectory
This reinstates the original behavior reverted in commit
e7d0ebc0ec190e3a07fc28a2f551426e34a1ee6e.
This reinstates the original behavior reverted in commit
e7d0ebc0ec190e3a07fc28a2f551426e34a1ee6e.
open_editor: always open path relative to the repository root directory
get_author_initials: improve and fix to not read outside of name string
Added FIXME about multi-byte and multi-column characters.
Added FIXME about multi-byte and multi-column characters.
Abbreviation of author names is now configurable and toggleable
Refactor format variable lookup and expansion
Oops, fix enum_equals
Make return value of string_date const
Simplify enum name comparison with enum_equals macro
Define date values in DATE_INFO macro
Refactor toggle_date_option into a generic enum_map based toggler
Introduce parse_enum and use it to parse the show-date option
Refactor help_name into enum_name
Fix parsing of boolean show-date values
It was broken during the introduction of relative dates.
It was broken during the introduction of relative dates.
toggle_date_option: use passed date argument instead of opt_date
Fix usage of the status view from a sub directory
Encode everything internally as UTF-8
Store all strings internally as UTF-8 and convert them when they are
displayed if the locale is non-UTF-8. Improve the install documentation
related to proper support for UTF-8 via ncursesw.
Store all strings internally as UTF-8 and convert them when they are
displayed if the locale is non-UTF-8. Improve the install documentation
related to proper support for UTF-8 via ncursesw.
Branch view: support browsing --all branches
Cleanup bluring of the previous view's title bar
foreach_ref: make ref argument const
Status view: update the file variable when a line is selected
... so %(file) works as expected.
... so %(file) works as expected.
TODO: line wrapping
Requested by Eskild Hustvedt.
Requested by Eskild Hustvedt.
Fix install-release-doc make rules to use origin/release
Thanks to bill lam for spotting this.
Thanks to bill lam for spotting this.
Add make rules to install documentation from the release branch
tig-0.15
Status view: special case revert of unmerged entries with no physical file
io_open: take path as a vararg format
run_io_rd_dir: obsolete by switching call sites to run_io_rd_dir
run_io_dir: take dir argument
begin_update: simplify control flow
Remove build dependency on git from the configure script
tigmanual(7): provide the manual as a man page