Jonas Fonseca [Wed, 18 Feb 2009 11:09:12 +0000 (12:09 +0100)]
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.
Jonas Fonseca [Wed, 18 Feb 2009 10:56:31 +0000 (11:56 +0100)]
Remove the need for alloc variables
Jonas Fonseca [Wed, 18 Feb 2009 10:47:58 +0000 (11:47 +0100)]
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.
Jonas Fonseca [Tue, 17 Feb 2009 03:07:28 +0000 (04:07 +0100)]
Define a tree_grep and fixing searching
It was broken by the move to the annotated tree view.
Jonas Fonseca [Tue, 17 Feb 2009 03:07:02 +0000 (04:07 +0100)]
Simplify searching in view lines by defining grep_text utility
Jonas Fonseca [Tue, 17 Feb 2009 01:00:45 +0000 (02:00 +0100)]
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
Jonas Fonseca [Tue, 17 Feb 2009 00:51:26 +0000 (01:51 +0100)]
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
Jonas Fonseca [Sun, 15 Feb 2009 23:02:00 +0000 (00:02 +0100)]
tig-0.14.1
Jonas Fonseca [Sun, 15 Feb 2009 22:21:23 +0000 (23:21 +0100)]
Remove unneeded doupdate from view_driver
Jonas Fonseca [Sun, 15 Feb 2009 22:20:46 +0000 (23:20 +0100)]
Keep the cursor fixed while initial stage progress is reported
Jonas Fonseca [Sun, 15 Feb 2009 17:23:44 +0000 (18:23 +0100)]
Fix draw_lineno to always set the static format buffer
Jonas Fonseca [Sun, 15 Feb 2009 17:10:05 +0000 (18:10 +0100)]
Fix bug in draw_space to not access memory outside the space buffer
Jonas Fonseca [Sun, 15 Feb 2009 16:35:34 +0000 (17:35 +0100)]
Refactor draw_lineno to use draw_graphic
Jonas Fonseca [Sun, 15 Feb 2009 16:22:23 +0000 (17:22 +0100)]
Fix horizontal scrolling
... to not be limited to the view width and to account for
view->yoffset.
Jonas Fonseca [Sun, 15 Feb 2009 16:28:12 +0000 (17:28 +0100)]
Remove limitation of horizontal scrolling
Tig now behaves similar to less in that the user can scroll without
limit to the right.
Jonas Fonseca [Fri, 13 Feb 2009 17:08:36 +0000 (18:08 +0100)]
tigrc(5): suggest git aliases for external commands requiring shell ops
Jonas Fonseca [Fri, 13 Feb 2009 13:41:40 +0000 (14:41 +0100)]
Fix the view clearing to only be effective for displayed views
The feature was introduced in
ec9aa4f62ae2977d598dda865e6a50b9fc799428.
Jonas Fonseca [Fri, 13 Feb 2009 13:38:00 +0000 (14:38 +0100)]
Make behavior of horizontal scrolling configurable
Requested by bill lam.
Sebastian Harl [Fri, 13 Feb 2009 13:10:26 +0000 (14:10 +0100)]
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>
Jonas Fonseca [Thu, 12 Feb 2009 14:31:18 +0000 (15:31 +0100)]
tigrc(5): fix error in examples for the set command
Fixes Debian bug #514990 reported by Gerfried Fuchs.
Jonas Fonseca [Tue, 10 Feb 2009 20:31:40 +0000 (21:31 +0100)]
Tree view: draw submodule entry modes as "m---------"
Inspired by gitweb.
Jonas Fonseca [Tue, 10 Feb 2009 11:06:35 +0000 (12:06 +0100)]
Status view: report failures to update a file
Also, wait showing update progress until 5% has been reached.
Jonas Fonseca [Tue, 10 Feb 2009 11:02:42 +0000 (12:02 +0100)]
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().
Jonas Fonseca [Tue, 10 Feb 2009 10:50:59 +0000 (11:50 +0100)]
Use putenv instead of setenv
Not all platforms (e.g. Solaris) provide setenv. Based on patch by
SungHyun Nam.
Carsten Brockmann [Mon, 9 Feb 2009 19:04:23 +0000 (19:04 +0000)]
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>
Jonas Fonseca [Mon, 9 Feb 2009 03:04:40 +0000 (04:04 +0100)]
Status view: upon failure to open a file show error message
Jonas Fonseca [Mon, 9 Feb 2009 03:02:33 +0000 (04:02 +0100)]
Refactor and share view maximization code from view-close handling
Jonas Fonseca [Mon, 9 Feb 2009 03:01:48 +0000 (04:01 +0100)]
Fix io_strerror return type
Jonas Fonseca [Mon, 9 Feb 2009 00:55:40 +0000 (01:55 +0100)]
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
Jonas Fonseca [Mon, 9 Feb 2009 00:54:41 +0000 (01:54 +0100)]
Optimize read_repo_config_option to reduce string comparisons
Jonas Fonseca [Mon, 9 Feb 2009 00:49:32 +0000 (01:49 +0100)]
Move setting of remote branch from repo config to separate function
Jonas Fonseca [Sun, 8 Feb 2009 19:37:11 +0000 (20:37 +0100)]
Mark enum_maps and other data tables as const
Jonas Fonseca [Sun, 8 Feb 2009 19:36:28 +0000 (20:36 +0100)]
Use check_blame_commit when handling REQ_ENTER
Jonas Fonseca [Sun, 8 Feb 2009 19:35:14 +0000 (20:35 +0100)]
NEWS: Mention Jeff's uninitialized variable bug fix
From commit
2677b744313c939890a8f6b3316f9d5452581ab8.
Jeff King [Sun, 8 Feb 2009 11:00:42 +0000 (06:00 -0500)]
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>
Jonas Fonseca [Sat, 7 Feb 2009 15:22:56 +0000 (16:22 +0100)]
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.
Jonas Fonseca [Sat, 7 Feb 2009 13:57:58 +0000 (14:57 +0100)]
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>
Jonas Fonseca [Sat, 7 Feb 2009 15:22:27 +0000 (16:22 +0100)]
Make the blame view expand tabs at drawing time
Jonas Fonseca [Sat, 7 Feb 2009 20:21:43 +0000 (21:21 +0100)]
Introduce common view position update helper
So jumping to search results and line numbers will work more uniform.
Jonas Fonseca [Sat, 7 Feb 2009 15:25:54 +0000 (16:25 +0100)]
Improve restoring of the view position to bound the offset
Jonas Fonseca [Sat, 7 Feb 2009 14:20:57 +0000 (15:20 +0100)]
Jump to line when a number is entered in the prompt
Jonas Fonseca [Sat, 7 Feb 2009 14:19:19 +0000 (15:19 +0100)]
Warn users about integers in ~/.tigrc being out of bound
Jeff King [Sat, 7 Feb 2009 10:37:23 +0000 (05:37 -0500)]
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>
Witold Filipczyk [Sat, 7 Feb 2009 00:16:35 +0000 (01:16 +0100)]
Add support for 256 colors by allowing "colorN" names similar to Mutt
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Jonas Fonseca [Thu, 5 Feb 2009 13:09:46 +0000 (14:09 +0100)]
Improve on branch information in the status view
The file checks was inspired by the prompt code from the git bash
completion script.
Jonas Fonseca [Thu, 5 Feb 2009 17:38:47 +0000 (18:38 +0100)]
Simplify setting the default for the system configuration file
Jonas Fonseca [Wed, 4 Feb 2009 16:10:04 +0000 (17:10 +0100)]
Refactor and unify timezone parsing
Jonas Fonseca [Wed, 4 Feb 2009 13:59:55 +0000 (14:59 +0100)]
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.
Jonas Fonseca [Wed, 4 Feb 2009 13:35:44 +0000 (14:35 +0100)]
Remove unused OPEN_BACKGROUNDED flag
Jonas Fonseca [Wed, 4 Feb 2009 13:25:29 +0000 (14:25 +0100)]
Use enum_map for handling obsolete color names
Jonas Fonseca [Wed, 4 Feb 2009 13:25:06 +0000 (14:25 +0100)]
Use enum_map for handling obsolete request names
Jonas Fonseca [Wed, 4 Feb 2009 13:23:10 +0000 (14:23 +0100)]
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.
Jonas Fonseca [Wed, 4 Feb 2009 08:29:49 +0000 (09:29 +0100)]
Cleanup and simplify option file parsing
Jonas Fonseca [Thu, 5 Feb 2009 20:20:34 +0000 (21:20 +0100)]
tig-0.14
Jonas Fonseca [Thu, 5 Feb 2009 11:47:48 +0000 (12:47 +0100)]
Read tigrc(5) options from git configuration files
Jonas Fonseca [Thu, 5 Feb 2009 11:43:24 +0000 (12:43 +0100)]
tig(1): correct info on tree view related environment variables
Was not updated during the introduction of %(directory) and move to the
IO API.
Jonas Fonseca [Wed, 4 Feb 2009 17:41:12 +0000 (18:41 +0100)]
Add release script documenting the release procedure
Jonas Fonseca [Wed, 4 Feb 2009 22:20:31 +0000 (23:20 +0100)]
Spell check all text files and add dictionary to speed it up
Jonas Fonseca [Wed, 4 Feb 2009 10:11:24 +0000 (11:11 +0100)]
tigrc(5): document the tree view colors
Also renames the tree-parent line to tree-head.
Jonas Fonseca [Wed, 4 Feb 2009 17:40:15 +0000 (18:40 +0100)]
Refactor file mode drawing; rename tree-mode color to mode
Jonas Fonseca [Wed, 4 Feb 2009 12:09:12 +0000 (13:09 +0100)]
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.
Jonas Fonseca [Wed, 4 Feb 2009 13:59:23 +0000 (14:59 +0100)]
Move usage string near parse_options
Jonas Fonseca [Tue, 3 Feb 2009 21:34:44 +0000 (22:34 +0100)]
Tree view: improve handling of empty trees
Jonas Fonseca [Tue, 3 Feb 2009 14:46:07 +0000 (15:46 +0100)]
Fix reverting of unmerged status entries
... by using update-index --cacheinfo.
Jonas Fonseca [Mon, 2 Feb 2009 23:34:43 +0000 (00:34 +0100)]
Add support for horizontal scrolling
It is still basically a big hack, and might need some tuning.
Jonas Fonseca [Tue, 3 Feb 2009 11:50:52 +0000 (12:50 +0100)]
Expand tabs in displayed lines to not rely on ncurses to expand them
Jeff King [Tue, 3 Feb 2009 05:49:08 +0000 (00:49 -0500)]
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>
Jonas Fonseca [Tue, 3 Feb 2009 10:33:56 +0000 (11:33 +0100)]
TODO: elaborate and regroup into 'before tig-1.0' and 'long term goals'
Jonas Fonseca [Sun, 18 Jan 2009 13:47:06 +0000 (14:47 +0100)]
Move initial view setup into parse_options
Jonas Fonseca [Sun, 18 Jan 2009 13:14:17 +0000 (14:14 +0100)]
Move parse_option so it has access to view definitions
Jonas Fonseca [Fri, 30 Jan 2009 08:43:56 +0000 (09:43 +0100)]
Remove parsing of deprecated option -S and subcommands log and diff
Jonas Fonseca [Tue, 3 Feb 2009 14:01:47 +0000 (15:01 +0100)]
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.
Jonas Fonseca [Tue, 3 Feb 2009 13:47:04 +0000 (14:47 +0100)]
Use warn() for warnings emitted during config file loading
Jonas Fonseca [Mon, 2 Feb 2009 14:18:12 +0000 (15:18 +0100)]
Fix scrolling bugs in gnome-terminal and (u)xterm
Introduces workarounds to fix glitches appearing after the recent screen
drawing optimizations.
Jonas Fonseca [Mon, 2 Feb 2009 08:24:51 +0000 (09:24 +0100)]
BUGS: document problem with scrolling in (u)xterm
Jonas Fonseca [Sat, 31 Jan 2009 09:06:30 +0000 (10:06 +0100)]
Tune the view clearing to wait until 2 seconds has passed
The code introduced in
ec9aa4f62ae2977d598dda865e6a50b9fc799428 broke
the smoothness of updates in some cases.
Jonas Fonseca [Sat, 31 Jan 2009 10:41:01 +0000 (11:41 +0100)]
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).
Jonas Fonseca [Sat, 31 Jan 2009 09:01:04 +0000 (10:01 +0100)]
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.
Jonas Fonseca [Fri, 30 Jan 2009 23:49:25 +0000 (00:49 +0100)]
Abbreviate author names to initials when author-width < 6
Jonas Fonseca [Fri, 30 Jan 2009 21:46:47 +0000 (22:46 +0100)]
Refactor author drawing into draw_author
Jonas Fonseca [Mon, 2 Feb 2009 08:08:46 +0000 (09:08 +0100)]
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.
Jonas Fonseca [Fri, 30 Jan 2009 08:24:24 +0000 (09:24 +0100)]
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().
Jonas Fonseca [Fri, 30 Jan 2009 08:12:26 +0000 (09:12 +0100)]
Make cursor updating when resizing the display and loading a view
Jonas Fonseca [Fri, 30 Jan 2009 08:03:11 +0000 (09:03 +0100)]
Change scrollok strategy to leave it off unless when calling wscrl
Should lead to fewer calls.
Jonas Fonseca [Fri, 30 Jan 2009 07:54:19 +0000 (08:54 +0100)]
Initialize status_empty flag to FALSE
Fixes cursor restoring when loading the status view at startup.
Jonas Fonseca [Wed, 28 Jan 2009 22:10:10 +0000 (23:10 +0100)]
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.
Jonas Fonseca [Wed, 28 Jan 2009 22:10:45 +0000 (23:10 +0100)]
TODO: a small commit cache should be employed at some point
Jonas Fonseca [Wed, 28 Jan 2009 18:30:17 +0000 (19:30 +0100)]
Help view: show the action name similar as in Mutt's help view
Jonas Fonseca [Wed, 28 Jan 2009 18:28:03 +0000 (19:28 +0100)]
Remove preallocation of view lines in help_open
Stefan Naewe [Wed, 28 Jan 2009 15:44:31 +0000 (16:44 +0100)]
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>
Jonas Fonseca [Sat, 24 Jan 2009 11:51:38 +0000 (12:51 +0100)]
tigrc(5) & manual: move view specific actions out of the misc group
Jonas Fonseca [Thu, 15 Jan 2009 21:41:58 +0000 (22:41 +0100)]
Add support for loading blame for parent commits
Requested by Jeff King in <
20080410040213.GA29618@sigill.intra.peff.net>
Jonas Fonseca [Fri, 16 Jan 2009 13:27:13 +0000 (14:27 +0100)]
Refactor prompting for user input
Jonas Fonseca [Sat, 24 Jan 2009 11:36:03 +0000 (12:36 +0100)]
Rename tree-parent action to parent
Jonas Fonseca [Tue, 27 Jan 2009 12:51:12 +0000 (13:51 +0100)]
Minor cleanup of the tree view code; fix enter on the first line
Jonas Fonseca [Tue, 27 Jan 2009 12:51:20 +0000 (13:51 +0100)]
TODO: remove resolved item
Jonas Fonseca [Mon, 26 Jan 2009 11:51:40 +0000 (12:51 +0100)]
Tree view: improve to look less like plumbing
It is now more like `ls` by annotating the output of ls-tree with commit
information.
Jonas Fonseca [Tue, 27 Jan 2009 10:17:44 +0000 (11:17 +0100)]
Refactor main_read to create parse_author_line
Jonas Fonseca [Mon, 26 Jan 2009 11:52:56 +0000 (12:52 +0100)]
update_view: remove an unneeded goto
Jonas Fonseca [Sat, 24 Jan 2009 12:24:04 +0000 (13:24 +0100)]
Fix floating point bug in the blame reporting