Remove unnecessary braces
Reduce the number of windows to max two by sharing them between all views
Use AX_WITH_CURSES from GNU autoconf archive to detect ncurses
configure.ac: Set value-if-not-found, don't check for program 'false'
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Unify option toggling
Refactor option parsing error handling to use error codes
Add possiblity to pass data to io_load property reader
Rename opt_*_args to opt_*_argv
Improve viewing of diffs when browsing branches
tig-0.16.2
Fix 'tig show <commit>' fix which causes empty tree views
Introduced by 80e97cdd456dfe71d0dbf32d77a73bb5a2ab158e.
Introduced by 80e97cdd456dfe71d0dbf32d77a73bb5a2ab158e.
Check the ncurses version before using set_tabsize
This patch checks the ncurses patch level to decide if set_tabsize is
to be used in place of the TABSIZE macro, for setting the tab size.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This patch checks the ncurses patch level to decide if set_tabsize is
to be used in place of the TABSIZE macro, for setting the tab size.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig-0.16.1
Fix tig show by replacing %(commit) with %(revargs) on first display
Broken in commit 53c089443cd9885fa677becee4bf7ffd56c3c357.
Broken in commit 53c089443cd9885fa677becee4bf7ffd56c3c357.
Use function set_tabsize()
this fixes the following compile error on cygwin:
tig.c: In function `init_display':
tig.c:7112: error: invalid lvalue in assignment
Signed-off-by: Stefan Naewe <stefan.naewe@googlemail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
this fixes the following compile error on cygwin:
tig.c: In function `init_display':
tig.c:7112: error: invalid lvalue in assignment
Signed-off-by: Stefan Naewe <stefan.naewe@googlemail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Don't show out-of-sight tildes
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add an option to ignore unknown directories contents in the status view
Similar to git ls-files --directory
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Similar to git ls-files --directory
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Remove remains from the obsoleted toggle-date-short action
The default keybinding and handling code was removed in commit
b9247a4639adcfa4e8f816d75c62917575757619
The default keybinding and handling code was removed in commit
b9247a4639adcfa4e8f816d75c62917575757619
Actually add the ^D binding to move-page-down
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add a scroll-first-col command
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
[ jf: fix built-in description and add entry to the manual ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
[ jf: fix built-in description and add entry to the manual ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add vi-like ^ bindings
^N/^P for previous/next
^Y/^E for scroll_up/scroll_down
^D/^U for page_up/page_down
^L for redraw
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
^N/^P for previous/next
^Y/^E for scroll_up/scroll_down
^D/^U for page_up/page_down
^L for redraw
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Allow tig to parse control-modified chars in tigrc
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
[ jf: s/0x32/0x20/ per request from Pierre ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
[ jf: s/0x32/0x20/ per request from Pierre ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix segfault when starting tig in pager mode
Thanks to Pierre Habouzit and Tobias Heinlein for reporting this.
Thanks to Pierre Habouzit and Tobias Heinlein for reporting this.
Fall back to retry if no diff will be shown
This can happen if a file spec was passed on the command line and
the diff view is opened from the blame view with a different path.
This can happen if a file spec was passed on the command line and
the diff view is opened from the blame view with a different path.
Refactor argv_size out from argv_append
tig-0.16
Fix missing ID reference
... the original ID was removed in commit
b00784cc39b2d7b6069d382a2405fb3e117386d1.
... the original ID was removed in commit
b00784cc39b2d7b6069d382a2405fb3e117386d1.
Rename {diff,file,rev}-args to {diff,file,rev}args
Load diff arguments from TIG_DIFF_OPTS if defined and no diff args was passed
This is the missing part of 53c089443cd9885fa677becee4bf7ffd56c3c357.
This is the missing part of 53c089443cd9885fa677becee4bf7ffd56c3c357.
Move application of string_expand to draw_text
... fixes bug which truncated long lines to a fixed number of chars.
... fixes bug which truncated long lines to a fixed number of chars.
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