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
Update asciidoc table syntax to the one supported by version 8.4.4
Also, fix README.html dependencies.
Also, fix README.html dependencies.
NEWS: Improve bug fix description
Fix loading of blame data when opened from the tree view
... and CWD is a subdirectory (Debian bug 540766). Also, improve the
tree view to allow entering the parent directory.
... and CWD is a subdirectory (Debian bug 540766). Also, improve the
tree view to allow entering the parent directory.
Fix draw_date to not format anything when time arg is NULL
Fix whitespace
There is whitespaces on 2 of the original source line.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
There is whitespaces on 2 of the original source line.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add support for displaying relative dates
Also unifies all date formats to use the show-date option and the
toggle-date action.
Also unifies all date formats to use the show-date option and the
toggle-date action.
NEWS: Mention date-shorten feature
Merge remote branch 'samb/short-dates'
Show the active (instead of the default) keybindings in the help view
Furthermore, honor the keymap when suggesting actions in the help
messages.
Furthermore, honor the keymap when suggesting actions in the help
messages.
Add an option (and toggle) for shortening the date column by skipping the time.
Signed-off-by: Samuel Bronson <naesten@gmail.com>
Signed-off-by: Samuel Bronson <naesten@gmail.com>
Build with asciidoc-8.4.5
This version seems to be stricter about presubs attributes:
asciidoc -aversion=0.14.1-28-gac66fdb -asysconfdir=/usr/local/etc -b docbook -d manpage tigrc.5.txt
ERROR: tigrc.5.txt: line 12: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 41: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 149: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 366: malformed presubs attribute: normal
make: *** [tigrc.5.xml] Error 1
Based on patch by Ingmar Vanhassel.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This version seems to be stricter about presubs attributes:
asciidoc -aversion=0.14.1-28-gac66fdb -asysconfdir=/usr/local/etc -b docbook -d manpage tigrc.5.txt
ERROR: tigrc.5.txt: line 12: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 41: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 149: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 366: malformed presubs attribute: normal
make: *** [tigrc.5.xml] Error 1
Based on patch by Ingmar Vanhassel.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fixed some uninitialized variable warnings
GCC 4.3.3, when used with -Wall, emits warnings that those variables "may be
used uninitialized in this function".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
GCC 4.3.3, when used with -Wall, emits warnings that those variables "may be
used uninitialized in this function".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Allow multiple text attributes for color commands
This also fixes lazy behavior so that setting the cursor color no longer
automatically sets the text to bold.
This also fixes lazy behavior so that setting the cursor color no longer
automatically sets the text to bold.
Remove macros which are only used for default option values
Make height of split view configurable
Signed-off-by: Tilo Schwarz <tilo@tilo-schwarz.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Tilo Schwarz <tilo@tilo-schwarz.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Manual: document that :<number> jumps to the line number
Fix memory allocation check in open_commit_parent_menu
The check was not converted when the code was moved to a separate
function before the commit. To test the menu using the tig repository
start tig using:
tig blame cf63d30cbc4efb2bb87e52c4e54366751bb958fa Makefile
Then go to line 80 (type ":80<enter>") and press the key for moving to
the parent (bound to ',' by default).
The check was not converted when the code was moved to a separate
function before the commit. To test the menu using the tig repository
start tig using:
tig blame cf63d30cbc4efb2bb87e52c4e54366751bb958fa Makefile
Then go to line 80 (type ":80<enter>") and press the key for moving to
the parent (bound to ',' by default).
Use menus with the commit subject to present selectable commit parents