Refactor draw_refs out from main_draw
Merge prepare_update into open_argv; make open_file call open_argv
Use begin_update to load data in the tree and branch views
Deletes the now unused start_update.
Deletes the now unused start_update.
Fix blame view regression
Makes it possible to use begin_update to load extra view data, which
allows the argv argument to be properly formatted.
Makes it possible to use begin_update to load extra view data, which
allows the argv argument to be properly formatted.
io_run: make it possible to open file
Simplify format_argv to always replace
Rename prepare_io to prepare_update and make it more specialized
Move view splitting code to separate split_view
open_view: Use maximize_view to prepare non-split displays
open_view: gather split view code in the same branch
Introduce refresh_view based on load_view
Refactor view loading from open_view into load_view
Add open_argv and open_file to wrap update preparation and open_view call
Enhance prepare_update_file to add support for refreshable file IO
Simplify draw_author and draw_date logic
Make the low-level drawing functions update the view column
Add specialized open methods for each view
... which provide the argv to begin_update
... which provide the argv to begin_update
Convert tree_prepare to tree_open
Convert begin_update to act as a view_ops open function
Extend open() view ops to accept the open flags as an argument
Add VIEW_MAX_LEN macro to aid when drawing
Remove support for the deprecated TIG_{MAIN,DIFF,LOG,TREE,BLOB}_CMD env vars
Do not install test-graph
Improve parsing of the set command and variable arguments options
[GH-6] Make blame configurable via options from ~/.tigrc and the command line
tigrc(5): sort options alphabetically
Update and fix a few NEWS entries
[GH-3] Expand %(directory) to . for the root directory
tig-0.17
Rewrite the revision graph renderer
The new renderer is more 'square' but comes with three modes: UTF-8,
ncurses (using chtype graphical characters), and ASCII. The three modes
can be toggled. Enable revision graph rendering by default.
The new renderer is more 'square' but comes with three modes: UTF-8,
ncurses (using chtype graphical characters), and ASCII. The three modes
can be toggled. Enable revision graph rendering by default.
Move IO API to src/io.[ch]
Move includes, macros and core utilities to tig.h
Initialise views and screens with nonzero size.
This fixes problems with ncurses 2.8
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This fixes problems with ncurses 2.8
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Remove draw_text()s trim parameter
... it's TRUE at all call sites.
... it's TRUE at all call sites.
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.