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
Add simple support for showing menues and use it for showing option menu
The general goal is to have certain lesser used options not take up a
key for toggling.
The general goal is to have certain lesser used options not take up a
key for toggling.
Restore the branch view position after refreshing
Fix reloading of references to not cause access to freed memory
Make the allocation of refs stable across reloads (of either the main,
branch or log view) by changing the storage method and introducing a
struct ref_list to keep track of lists of references.
read_ref now always scans the already allocated refs. To speed this up
keep the list sorted and use binary search when inserting and updating.
Make the allocation of refs stable across reloads (of either the main,
branch or log view) by changing the storage method and introducing a
struct ref_list to keep track of lists of references.
read_ref now always scans the already allocated refs. To speed this up
keep the list sorted and use binary search when inserting and updating.
Predefined external command: git commit
Status view allows management of the stage area, and the user is likely
to issue a commit as soon as (s)he's satisfied with the result. Mapping
'git commit' to the 'C' key in status view makes this straightforward
and allows a very streamlined workflow from within git.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Status view allows management of the stage area, and the user is likely
to issue a commit as soon as (s)he's satisfied with the result. Mapping
'git commit' to the 'C' key in status view makes this straightforward
and allows a very streamlined workflow from within git.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix previous/next with branch+main view
If the main view was opened as a child window of branch view, the
previous/next key would scroll the child window instead of the parent
one, which was not consistent with other dual-window situations.
Fix by checking for a branch+main too when delegating the request.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
If the main view was opened as a child window of branch view, the
previous/next key would scroll the child window instead of the parent
one, which was not consistent with other dual-window situations.
Fix by checking for a branch+main too when delegating the request.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add support for sorting branch entries by name, date and author
Add support for sorting tree entries by name, date or author
Branch view: fix loading to handle when two branches have same commit
Use temporary variable in refs loop in main_draw
Minor fix to always sort even if allocation fails in get_refs
Add primitive branch view
For now it let's you browse the branches and choose one to show in the
main view.
For now it let's you browse the branches and choose one to show in the
main view.
Add missing NULL in blame_grep
Commit 436674f introduced a grep_text utility function which
takes a NULL-terminated list; the callsite in blame_grep
forgot to put in a NULL, leading to segmentation faults.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Commit 436674f introduced a grep_text utility function which
takes a NULL-terminated list; the callsite in blame_grep
forgot to put in a NULL, leading to segmentation faults.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix a potential problem with reading tokens larger then BUFSIZ
If io_get() is not able to find the end marker it will go into
an infinite loop. To fix this make it possible to reallocate and
increase the buffer if necessary.
To avoid problems with callers reading into a stack allocated buffer,
change these to no longer use the "zero-copy" strategy. This in turns
cleans the callers up a bit.
If io_get() is not able to find the end marker it will go into
an infinite loop. To fix this make it possible to reallocate and
increase the buffer if necessary.
To avoid problems with callers reading into a stack allocated buffer,
change these to no longer use the "zero-copy" strategy. This in turns
cleans the callers up a bit.
Update the current branch information when reloading all references
Fixes problem of improper highlighting of current branch after switching
branch and reloading.
Fixes problem of improper highlighting of current branch after switching
branch and reloading.
Define an allocator for run requests
Comparing the size of the binary before and after this change, shows
that the size does not increase when -02 is used.
Comparing the size of the binary before and after this change, shows
that the size does not increase when -02 is used.
Remove the need for alloc variables
Make the granular allocators more customizable using macros
Add a DEFINE_ALLOCATOR macro which can be used to define a custom
allocator which is more type safe than the current realloc_items and
which removed the need for using temporary variables for holding the
newly allocated chunk. The custom allocator also allows the allocation
granularity to be tweaked to the need of the user instead of being
hardcoded to 256 chunks for all.
Add a DEFINE_ALLOCATOR macro which can be used to define a custom
allocator which is more type safe than the current realloc_items and
which removed the need for using temporary variables for holding the
newly allocated chunk. The custom allocator also allows the allocation
granularity to be tweaked to the need of the user instead of being
hardcoded to 256 chunks for all.
Define a tree_grep and fixing searching
It was broken by the move to the annotated tree view.
It was broken by the move to the annotated tree view.
Simplify searching in view lines by defining grep_text utility
Reduce memory and startup time by storing author times as time_t
Which means that drawing will have to do some more formatting, however,
the startup time is shorter since gmtime_r() is no longer called. Same
repository as last commit.
18980 fonseca 20 0 17776 15m 872 S 0 0.8 0:01.26 tig
18630 fonseca 20 0 23224 20m 868 S 0 1.0 0:01.26 tig-0.14.1
Which means that drawing will have to do some more formatting, however,
the startup time is shorter since gmtime_r() is no longer called. Same
repository as last commit.
18980 fonseca 20 0 17776 15m 872 S 0 0.8 0:01.26 tig
18630 fonseca 20 0 23224 20m 868 S 0 1.0 0:01.26 tig-0.14.1
Add small cache for author names to reduce memory foot-print
Numbers from an old linux kernel repository with 2740 unique authors
shows that it takes a little longer time to start up but the gain is
quite good. Furthermore, it lifts the name length restriction.
18191 fonseca 20 0 19712 17m 872 S 3 0.8 0:01.34 tig
18180 fonseca 20 0 23224 20m 868 S 0 1.0 0:01.26 tig-0.14.1
Numbers from an old linux kernel repository with 2740 unique authors
shows that it takes a little longer time to start up but the gain is
quite good. Furthermore, it lifts the name length restriction.
18191 fonseca 20 0 19712 17m 872 S 3 0.8 0:01.34 tig
18180 fonseca 20 0 23224 20m 868 S 0 1.0 0:01.26 tig-0.14.1
tig-0.14.1
Remove unneeded doupdate from view_driver
Keep the cursor fixed while initial stage progress is reported
Fix draw_lineno to always set the static format buffer
Fix bug in draw_space to not access memory outside the space buffer
Refactor draw_lineno to use draw_graphic
Fix horizontal scrolling
... to not be limited to the view width and to account for
view->yoffset.
... to not be limited to the view width and to account for
view->yoffset.
Remove limitation of horizontal scrolling
Tig now behaves similar to less in that the user can scroll without
limit to the right.
Tig now behaves similar to less in that the user can scroll without
limit to the right.
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.