Call realloc() less often because it is potentially slow.
Signed-off-by: Dominik Vogt <dvogt@ffm.tc.iot.dtag.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Dominik Vogt <dvogt@ffm.tc.iot.dtag.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
New config options show-author, show-date, show-refs, show-line-numbers.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fixed displaying local tags.
Added a new colour main-local-tag.
Signed-off-by: Dominik Vogt <dvogt@ffm.tc.iot.dtag.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Added a new colour main-local-tag.
Signed-off-by: Dominik Vogt <dvogt@ffm.tc.iot.dtag.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
New actions toggle-date, toggle-author, and toggle-refs.
Signed-off-by: Dominik Vogt <dvogt@ffm.tc.iot.dtag.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Dominik Vogt <dvogt@ffm.tc.iot.dtag.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix index refreshing into separate call so diff-files is always run
draw_text: reduce indentation level
draw_text: minor cleanup to use fewer local variables
utf8_length: add reserve flag for reserving a trailing character
Replace unused coloffset with reserve flag, which will reserve at least
one character cell at the end. Use it for reserving a delimiter character
when use_tilde is TRUE, and avoid a second call to utf8_length().
Replace unused coloffset with reserve flag, which will reserve at least
one character cell at the end. Use it for reserving a delimiter character
when use_tilde is TRUE, and avoid a second call to utf8_length().
TODO: --boundary flag is already used
0.11.git
tig-0.10.1
More verbose diff headers (including dates and committer)
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix drawing "outside" the screen in the status and pager views
It was causing text to wrap to next line, but with the new function to
draw text with limited width this has become much easier.
It was causing text to wrap to next line, but with the new function to
draw text with limited width this has become much easier.
Fixed handling of UTF8 tag names and commit messages.
[ jf: fix off-by-one error for trimmed tilde drawing and bad padding
substraction ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
[ jf: fix off-by-one error for trimmed tilde drawing and bad padding
substraction ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Make configure search for the ncursesw library first
Also (unconditionally) define _XOPEN_SOURCE_EXTENDED before including
curses.h to have extended functions as recommended by ncurses(3).
Also (unconditionally) define _XOPEN_SOURCE_EXTENDED before including
curses.h to have extended functions as recommended by ncurses(3).
Fix compiler warnings: pointer of type ‘void *’ used in arithmetic
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix signed char comparison where char is unsigned by default
tig uses a char as a flag, and expects that to have three
values: TRUE, FALSE, and -1. When char is unsigned char (such
as on PPC), this fails with the compiler warning "comparison is
always false due to limited range of data type".
So explicitly make the flag a signed char.
Detecting the int8_t type with the autoconf macro
AC_CREATE_STDINT_H would probably be a better fix.
Signed-off-by: Russell Steicke <russellsteicke@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig uses a char as a flag, and expects that to have three
values: TRUE, FALSE, and -1. When char is unsigned char (such
as on PPC), this fails with the compiler warning "comparison is
always false due to limited range of data type".
So explicitly make the flag a signed char.
Detecting the int8_t type with the autoconf macro
AC_CREATE_STDINT_H would probably be a better fix.
Signed-off-by: Russell Steicke <russellsteicke@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fixed spurious "/bin/sh: --list: command not found" error
If git has been installed with a separate libexecdir which is not in path
(for example, a standard msysgit installation), tig would not find
"git-config", and we must instead find the "git" binary and call it as
"git config".
Signed-off-by: Peter Karlsson <peter@softwolves.pp.se>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
If git has been installed with a separate libexecdir which is not in path
(for example, a standard msysgit installation), tig would not find
"git-config", and we must instead find the "git" binary and call it as
"git config".
Signed-off-by: Peter Karlsson <peter@softwolves.pp.se>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Refresh the index when opening the status view to avoid "empty diffs"
Add rename support to the status view
Renames are now picked up and displayed with the 'R' flag instead of
being shown as a 'C'opy and 'D'eletion. Remove --find-copies-harder from
the arguments to diff-index and diff-files since this option seem to
interfere with rename detection.
Renames are now picked up and displayed with the 'R' flag instead of
being shown as a 'C'opy and 'D'eletion. Remove --find-copies-harder from
the arguments to diff-index and diff-files since this option seem to
interfere with rename detection.
Make it more clear that use of configure (and autoreconf) is optional
Suggested by Junio.
Suggested by Junio.
Replace SYSCONFDIR value in distributed documentation distributed
.. by defining sysconfdir to ++SYSCONFDIR++ when building documentation
for the release branch. This also improved quoting of paths during
installation.
Reported by Jakub Narebski.
.. by defining sysconfdir to ++SYSCONFDIR++ when building documentation
for the release branch. This also improved quoting of paths during
installation.
Reported by Jakub Narebski.
tig-0.10.1.git
tig-0.10
Make command line parsing more compatible with gitk
Many of the command line arguments are relics from the beginning of the
project and served as a method of configuring tig before support for the
configuration file was introduced. Since then they have become less
useful and make tig less compatible with gitk and other git repo
viewers.
This commit tries to fix this by deprecating all command line arguments
except the very tig specific version and help arguments. The option to
enter the status view (-S) is moved to a new "status" subcommand. Tig
will warn about the deprecation and advise -S users to use the new
subcommand. The handling of "--" is kept as it is for compatibility, but
will be removed in a future version. Finally, the man page and manual
was updated to reflect the new options and subcommands.
So enjoy the new less cludgy `tig --all' ... I will! :)
Many of the command line arguments are relics from the beginning of the
project and served as a method of configuring tig before support for the
configuration file was introduced. Since then they have become less
useful and make tig less compatible with gitk and other git repo
viewers.
This commit tries to fix this by deprecating all command line arguments
except the very tig specific version and help arguments. The option to
enter the status view (-S) is moved to a new "status" subcommand. Tig
will warn about the deprecation and advise -S users to use the new
subcommand. The handling of "--" is kept as it is for compatibility, but
will be removed in a future version. Finally, the man page and manual
was updated to reflect the new options and subcommands.
So enjoy the new less cludgy `tig --all' ... I will! :)
Add system-wide configuration file and new config file environment vars
Introduced envvars TIGRC_USER and TIGRC_SYSTEM to control which config
file is used. The default user specific config file can be overridden
with TIGRC_USER. Before loading the user config file, tig now looks for
a system wide config file ($(sysconfdir)/tirgc by default). This can be
overridden with the environment variable TIGRC_SYSTEM.
Also corrected a small mistake in the Makefile. Instead of setting
CFLAGS for '-D...' compiler options, use CPPFLAGS.
[ The original code from Dominik was changed so that tig always reads
the system-wide configuration file. The documentation was improved
so the configured sysconfdir is used in the generated documentation.
-- jonas ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Introduced envvars TIGRC_USER and TIGRC_SYSTEM to control which config
file is used. The default user specific config file can be overridden
with TIGRC_USER. Before loading the user config file, tig now looks for
a system wide config file ($(sysconfdir)/tirgc by default). This can be
overridden with the environment variable TIGRC_SYSTEM.
Also corrected a small mistake in the Makefile. Instead of setting
CFLAGS for '-D...' compiler options, use CPPFLAGS.
[ The original code from Dominik was changed so that tig always reads
the system-wide configuration file. The documentation was improved
so the configured sysconfdir is used in the generated documentation.
-- jonas ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Make it possible to overwrite the default (terminal) colors
Use the setting of the "default" color pair to set the default colors of
the terminal via assume_default_colors(). Fall back to white on black.
With this it is possible to no longer use the terminal colors if
desired.
This was requested by Sebastian Harl as a way to fix Debian bug 399884.
Use the setting of the "default" color pair to set the default colors of
the terminal via assume_default_colors(). Fall back to white on black.
With this it is possible to no longer use the terminal colors if
desired.
This was requested by Sebastian Harl as a way to fix Debian bug 399884.
Add support for showing boundary commits in the main view
The boundary commits are marked using a "^" character, which hopefully
is somewhat intuitive and familiar since git revision specification uses
it as its cut-off prefix.
The boundary commits are marked using a "^" character, which hopefully
is somewhat intuitive and familiar since git revision specification uses
it as its cut-off prefix.
Drop -B from diff options
My main motivation is a recent (almost) rewrite where I actually wanted
to see a "real" diff instead of a rewrite diff.
My main motivation is a recent (almost) rewrite where I actually wanted
to see a "real" diff instead of a rewrite diff.
Simplify documentation building and fix asciidoc.conf dependency
Replace the manpage XSL workarounds with AsciiDoc conf workarounds
This is a lot simpler and generates better manpages (with the required
documentation tools). The XSL stuff was a nightmarish adventure, anyway.
Of course this probably breaks documentation building on some systems.
This is a lot simpler and generates better manpages (with the required
documentation tools). The XSL stuff was a nightmarish adventure, anyway.
Of course this probably breaks documentation building on some systems.
INSTALL: Document the optional documentation tools
Update manpages to not contain contain so many formatting workarounds
... like indentation. However, the '.git/config' thing no longer works.
... like indentation. However, the '.git/config' thing no longer works.
Added examples to tig(1) manpage
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
TODO: Mention tig.c splitting and revgraph rewrite
Install manpages in $(prefix)/share/man
... instead of just $(prefix)/man. This location is also used by git.
... instead of just $(prefix)/man. This location is also used by git.
Updated .gitignore
[ Also ignore XML files. ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
[ Also ignore XML files. ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Removed trailing whitespace.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Added action tree-parent and bound it to backspace by default.
This allow to leave the current directory in the tree view and change to
the parent tree / directory. At the top of the tree, this closes the tree
view. Bound to ',' by default.
Example:
bind tree Left tree-parent
bind tree Right Enter
bind blob Left view-close
This allows to navigate the tree and blob views just with the cursor keys.
[ Cleanup the patch a bit and mention the default keybinding in
manual.txt --jonas ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This allow to leave the current directory in the tree view and change to
the parent tree / directory. At the top of the tree, this closes the tree
view. Bound to ',' by default.
Example:
bind tree Left tree-parent
bind tree Right Enter
bind blob Left view-close
This allows to navigate the tree and blob views just with the cursor keys.
[ Cleanup the patch a bit and mention the default keybinding in
manual.txt --jonas ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Added color option main-revgraph to color the revision graph.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add documentation for undocumented color options.
pp-refs
tree-dir, tree-file
stat-section, stat-none, stat-staged, stat-unstaged, stat-untracked
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
pp-refs
tree-dir, tree-file
stat-section, stat-none, stat-staged, stat-unstaged, stat-untracked
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Minor formatting and spelling fixes.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Ignore HTML files in general
manual: remove section on porcelains
People should already know git and Cogito is being phased out.
People should already know git and Cogito is being phased out.
Makefile: add ASCIIDOC_FLAGS
... so that under Cygwin it can be set to --unsafe, in order for
asciidoc to work.
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
... so that under Cygwin it can be set to --unsafe, in order for
asciidoc to work.
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Avoid using git-diff since it might run external diff drivers
Relying only on the diff plumbing seems to be the safer thing to do.
Relying only on the diff plumbing seems to be the safer thing to do.
Use --no-color option when calling git-log and git-diff
This fixes problems when user has set color.diff=true. The problem was
first reported for gitk on the git mailing list.
This fixes problems when user has set color.diff=true. The problem was
first reported for gitk on the git mailing list.
Rearrange the order of option parsing
Fix crash when opening mergetool for lines that are not unmerged
Use get_key_name() in get_key()
It was factored out in the external command patch.
It was factored out in the external command patch.
Add missing = for comparison in obsolete actions check
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Collect remaining string in last entry when parsing config file lines
This raises the length of external commands to what fits in the command
buffer (1024 characters).
This raises the length of external commands to what fits in the command
buffer (1024 characters).
Improve sanity check error messages
Obsolete the cherry-pick action and define as builtin external command
Add support binding keys to running external commands
Each command can have replacement string such as %(commit), %(head), and
%(blob), which are substituted before the command is run.
Each command can have replacement string such as %(commit), %(head), and
%(blob), which are substituted before the command is run.
Unify REQ_NONE and REQ_UNKNOWN by moving REQ_NONE to be the last request
tig-0.10.git
tig-0.9.1
SITES: 'Tarballs' is a bit more telling than 'Releases'
Cleanup status_request to make it reload the status view by default
Add support for launching git-mergetool from the status view
Unmerged entries now suggests to press M to resolve merge conflicts.
Unmerged entries are no longer shown for the "staged changes"; the same
goes for 'M'odified entries following an 'U'nmerged entry.
Unmerged entries now suggests to press M to resolve merge conflicts.
Unmerged entries are no longer shown for the "staged changes"; the same
goes for 'M'odified entries following an 'U'nmerged entry.
Refactor code to open_external_viewer
This way there is only one place calling system. In addition, files
opened in an editor will now wait for the user to press Enter to
continue. Whether this is good or bad can be discussed but it feels more
consistent and could help the user spot any errors printed by the
editor.
This way there is only one place calling system. In addition, files
opened in an editor will now wait for the user to press Enter to
continue. Whether this is good or bad can be discussed but it feels more
consistent and could help the user spot any errors printed by the
editor.
Detect working trees and disable the status view when it is missing
In the process, make any call to report() before a view has been
set end up in die() to avoid problems with uninitialized views.
In the process, make any call to report() before a view has been
set end up in die() to avoid problems with uninitialized views.
Document the refresh request
Ignore REQ_NONE in the help view and improve unbound request handling
Never put the release number in the tarball name for tagged versions
... when the version is given using DIST_VERSION!
... when the version is given using DIST_VERSION!
Also ignore generated .md5 files for tarballs
Add support for refreshing/reloading the status view
... and also refresh it after edits to capture any changes in the
working tree.
... and also refresh it after edits to capture any changes in the
working tree.
Remove unused 'view' argument from open_editor
Include autoconf file for 'make dist'
Fix the clean rule to never remove generated doc files
... this is now done by new distclean rule, which will also
purge autoconf files.
... this is now done by new distclean rule, which will also
purge autoconf files.
Fix out-of-range lineno when reloading the status view
Reproducable when standing on the last line of the status view with no
staged files and pressing 'u' twice. The first will make the current
line point outside the range of lines in the view, making the second
update read garbage memory and calling die because of an unknown status
line ID.
Restore previous line number if possible else move make the current
line index be that of the last line in the updated view.
Reproducable when standing on the last line of the status view with no
staged files and pressing 'u' twice. The first will make the current
line point outside the range of lines in the view, making the second
update read garbage memory and calling die because of an unknown status
line ID.
Restore previous line number if possible else move make the current
line index be that of the last line in the updated view.
Fix open_editor to make the file path relative to the project root
.. by prefixing the file path with opt_cdup if requested.
.. by prefixing the file path with opt_cdup if requested.
Handle REQ_NONE upfront in view_driver
It is very common during loading from pipe so deserves the small
optimization.
It is very common during loading from pipe so deserves the small
optimization.
Support cherry-picking commits in main view to current branch
Bound to 'C' by default. Idea by krh on #git.
Bound to 'C' by default. Idea by krh on #git.
Oops, always ensure that ICONV_CONST is defined
Use the more advanced iconv.m4 script from ELinks
tig-0.9.1.git
tig-0.9
Change the default styles for the status view
It now uses cyan for the section headers. Mentioned by Miciah.
It now uses cyan for the section headers. Mentioned by Miciah.
Update documentation
... to list search option in tigrc and mention the stage view
in the manual.
... to list search option in tigrc and mention the stage view
in the manual.
Force adding of doc files in the release-doc rule
Fix INSTALL
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Update Makefile to also use autoreconf for `make configure`.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Update Makefile to also use autoreconf for `make configure`.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Build intermediate tig.o file to fix tig dependency on config.h
Ensure ICONV_INBUF_TYPE is always defined; fix GIT_CONFIG define
Guard config.h include with HAVE_CONFIG_H
... and add -DHAVE_CONFIG_H to CPPFLAGS in config.make.in.
... and add -DHAVE_CONFIG_H to CPPFLAGS in config.make.in.
Define TIG_VERSION as intended when autoconf was introduced
Change last commit to make tig depend on config.h
Make tig.c depend on config.h when using configure
Add CC to the list of expanded symbols by configure
Also rearrange the list a bit.
Also rearrange the list a bit.
Allow LDLIBS to be overriden by configure
Fix warning from blob_read returning pointer instead of bool
stage: add request handler supporting file edits and chunk staging
This adds and interface (idea from git-gui) allowing a diff chunk to be
staged/unstaged for the next commit. It should also make it more
pleasant to make status updates when in the stage view.
This adds and interface (idea from git-gui) allowing a diff chunk to be
staged/unstaged for the next commit. It should also make it more
pleasant to make status updates when in the stage view.
Add stage view, which is used for showing status changes
autoconf: check for the AsciiDoc and XmlTo document tools
autoconf: check whether to use git-config or git-repo-config
Add autoconf-based build infrastructure for tig
This is a first cut at building tig using autoconf. With this patch, tig
configures and builds on both Linux (FC4) and OS X.
Signed-off-by: Steven Grimm <koreth@midwinter.com>
Reworked to not use aclocal+automake and external scripts for
bootstrapping. Instead, run `make configure` to generate the configure
script. It will create a config.make file from config.make.in, which
contains variables set by the configure script. Update .gitignore to
list generated files.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This is a first cut at building tig using autoconf. With this patch, tig
configures and builds on both Linux (FC4) and OS X.
Signed-off-by: Steven Grimm <koreth@midwinter.com>
Reworked to not use aclocal+automake and external scripts for
bootstrapping. Instead, run `make configure` to generate the configure
script. It will create a config.make file from config.make.in, which
contains variables set by the configure script. Update .gitignore to
list generated files.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tree: use simple stack to remember the previous subtree line numbers
Only show the command being loaded from for the pager view
This feature was introduced in 035ba11f40c0a045989ed861e72327012af022b4.
This feature was introduced in 035ba11f40c0a045989ed861e72327012af022b4.
TODO: tig now has a status view