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
Make it possible to browse all status changes once the diff view is open
Fix handling of REQ_NEXT/REQ_PREVIOUS
The special browsing of the main view was broken by commit
586c423dd99238a85c556df86e043dcfacffe277, when the REQ_ENTER
case was removed.
The special browsing of the main view was broken by commit
586c423dd99238a85c556df86e043dcfacffe277, when the REQ_ENTER
case was removed.
Fix updating of the view title to show the current position in the view
It regressed in 11359638c5dfc91b4b14a003a0519b2a5bc7f89d.
It regressed in 11359638c5dfc91b4b14a003a0519b2a5bc7f89d.
Warn about nothing to enter if REQ_ENTER reaches the view_driver switch
status: implement support for opening files in editor
status: cleanup status_request by resurrection status_enter
status: "wire" REQ_STATUS_UPDATE handling through status_request
Add view request operation for handling view specific requests
For now <view>_enter is replaced with <view>_request.
For now <view>_enter is replaced with <view>_request.
status: fix switching to the main view when starting in status view
status: improve title and report messages
status: make it possible to batch updates by pressing on the section line
status: assert that there are always view lines in the status view
status: make it possible to see all changes for a status section
... except untracked files.
... except untracked files.
status window: mention 'u' instead of Enter
Commits ca1d71ea and 89d917a bound the Enter functionality
to 'u' (and Enter now shows the diff).
[ Slightly changed to use get_key(). --jonas ]
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Commits ca1d71ea and 89d917a bound the Enter functionality
to 'u' (and Enter now shows the diff).
[ Slightly changed to use get_key(). --jonas ]
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add support for showing staged/unstaged changes and untracked files
When pressing enter on a file in the status view either a diff or the
content of the untracked file will be shown.
When pressing enter on a file in the status view either a diff or the
content of the untracked file will be shown.
Introduce status-update action bound to 'u' by default
For now this obsoletes the action triggered when pressing Enter.
For now this obsoletes the action triggered when pressing Enter.
Avoid flickering when moving past the main view's first and last line
In diff mode when first or last item is displayed KEY_UP or KEY_DOWN
respectively cause flickering. I know that I should not press
those keys in that situation, but this annoys me anyway.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
In diff mode when first or last item is displayed KEY_UP or KEY_DOWN
respectively cause flickering. I know that I should not press
those keys in that situation, but this annoys me anyway.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Ignore generated HTML pages
Also ':sort u' the .gitignore file.
Also ':sort u' the .gitignore file.
Ignore generated manpages.
Adds tig.1 and tigrc.5 to .gitignore
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Adds tig.1 and tigrc.5 to .gitignore
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Include the tig bash completion script as documentation
Rename contrib/tig-completion.sh to contrib/tig-completion.bash
Fix a few typos in the bash completion
Simplify naming (versioning) of non-release tig tarball and rpm file
Use the tag part of git-describe output, with `tig-' prefix stripped
off, as version number. Use number of commits since given tag as
release number, using 0 if we are at tagged version, and adding
'.dirty' suffix if working directory is dirty. Do not use 'g<sha 1>'
part of git-describe output.
For example, when git-describe output was tig-0.7-8-g26d0386, before
this commit tarball was named tig-0.7.8.g26d0386.tar.gz and rpm was
named tig-0.7.8.g26d0386-1.src.rpm (for dirty tree tarball was
tig-0.7.8.g26d0386.dirty.tar.gz), now tarball is named
tig-0.7-8.tar.gz and rpm is named tig-0.7-8.src.rpm (for dirty tree
tarball is tig-0.7-8.dirty.tar.gz).
[ Simplify the version extraction a bit. --jonas ]
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Use the tag part of git-describe output, with `tig-' prefix stripped
off, as version number. Use number of commits since given tag as
release number, using 0 if we are at tagged version, and adding
'.dirty' suffix if working directory is dirty. Do not use 'g<sha 1>'
part of git-describe output.
For example, when git-describe output was tig-0.7-8-g26d0386, before
this commit tarball was named tig-0.7.8.g26d0386.tar.gz and rpm was
named tig-0.7.8.g26d0386-1.src.rpm (for dirty tree tarball was
tig-0.7.8.g26d0386.dirty.tar.gz), now tarball is named
tig-0.7-8.tar.gz and rpm is named tig-0.7-8.src.rpm (for dirty tree
tarball is tig-0.7-8.dirty.tar.gz).
[ Simplify the version extraction a bit. --jonas ]
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Move tig.spec.in to the contrib area
Move tigrc to the contrib area
Add tig bash completion script
Based on git-completion.sh by Shawn Pearce.
Based on git-completion.sh by Shawn Pearce.
Delete the old VERSION file before appending the new one in make dist
Use $(MAKE) instead of 'make' and 'git *' instead of 'git-*'
tig-0.8.git
tig-0.8
Fix pager mode regressions
This fixes both a segfault when starting tig in pager mode, caused by no
view being setup before calling report(). Introduced in: "Add notice
about empty pager view" (5c4358d1b309381997a5c4780a432140fefa5bcb).
Reported by Lars Noschinski in debian bug 429448.
Also, a fix for actually reading from stdin, caused by comparison of
view->vid and view->id being reported as equal leading to no actual
update. Introduced in: "Improve management of view->ref and the title
line" (035ba11f40c0a045989ed861e72327012af022b4). Now, the title line in
pager mode will say "stdin" when reading from externally piped input.
This fixes both a segfault when starting tig in pager mode, caused by no
view being setup before calling report(). Introduced in: "Add notice
about empty pager view" (5c4358d1b309381997a5c4780a432140fefa5bcb).
Reported by Lars Noschinski in debian bug 429448.
Also, a fix for actually reading from stdin, caused by comparison of
view->vid and view->id being reported as equal leading to no actual
update. Introduced in: "Improve management of view->ref and the title
line" (035ba11f40c0a045989ed861e72327012af022b4). Now, the title line in
pager mode will say "stdin" when reading from externally piped input.
Fix (another) integer type mismatch on 64-bit systems
Similar to previous commit, use int type as the first parameter to
printf field width specifier (%.*s).
Similar to previous commit, use int type as the first parameter to
printf field width specifier (%.*s).
Fix integer type mismatch on 64-bit systems
fprintf wants an int parameter for the field width of a "%.*s" expression, but
the code was passing a size_t instead. This potentially broke systems where
sizeof(size_t) != sizeof(int). And even on systems where it did't break,
it still caused a compiler warning.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
fprintf wants an int parameter for the field width of a "%.*s" expression, but
the code was passing a size_t instead. This potentially broke systems where
sizeof(size_t) != sizeof(int). And even on systems where it did't break,
it still caused a compiler warning.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Add TODO about using non-blocking I/O for incremental view loading
Seems to be the fix for debian bug #427093.
Seems to be the fix for debian bug #427093.
Only emit one "Not a git repository" error message
Allow CFLAGS to be overridden while preserving VERSION
If someone defined their own CFLAGS, they would have to include a -DVERSION=
as well (or else get unknown-version as the version).
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
If someone defined their own CFLAGS, they would have to include a -DVERSION=
as well (or else get unknown-version as the version).
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Grab path to the git directory; use it when listing untracked files
read_properties: use size_t instead of int for callback
Fix wrong uses of string_copy() with pointer instead of buffer
Follow up to commit 751e27c90eea47b4eacdd7b657731712712f7356 that
caused these bugs to be revealed.
Follow up to commit 751e27c90eea47b4eacdd7b657731712712f7356 that
caused these bugs to be revealed.
Fix use of the status view from subdirectories
Fix string_copy macro to use sizeof(src) for the source buffer
Merge branch 'jn/rpm-updates'
Conflicts:
Makefile
Conflicts:
Makefile
Refresh VERSION file when building distribution tarball in "make dist"
Overwrite contents of VERSION file from the HEAD revision with the
current version (at the time of building), so VERSION file in the
tarball generated by "make dist" (and which follows also rpm package
generated by "make rpm") is up to date.
Otherwise for example when building rpm it will be compiled with wrong
version string.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Overwrite contents of VERSION file from the HEAD revision with the
current version (at the time of building), so VERSION file in the
tarball generated by "make dist" (and which follows also rpm package
generated by "make rpm") is up to date.
Otherwise for example when building rpm it will be compiled with wrong
version string.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Include documentation sources for rpmbuild with '--without docs'
This includes _all_ documentation sources (and not only manual.txt) in
the rpm file build with '--without docs' option.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
This includes _all_ documentation sources (and not only manual.txt) in
the rpm file build with '--without docs' option.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Remove PDF version of manual from being build and installed
Because PDF version of "The tig Manual" doesn't offer anything new
that is not present in HTML version, and building PDF requires
additional tools (docbook2pdf) and their dependencies present, remove
it from tig rpm.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Because PDF version of "The tig Manual" doesn't offer anything new
that is not present in HTML version, and building PDF requires
additional tools (docbook2pdf) and their dependencies present, remove
it from tig rpm.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Make dist rule more robust using '&&'; create .tar.gz.md5 file
Fix typo the INSTALL file
The make command to build the documentation "make install-doc", not
"make install-docs".
Kindly pointed out by Michael G. Noll.
The make command to build the documentation "make install-doc", not
"make install-docs".
Kindly pointed out by Michael G. Noll.
Supply explicit permission bits to 'install'
'install' will install files with permissions set to '0755' if the
permissions are not specified on the command line. Having the execute
bits set on non-executable content is not desireable. Specify mode
0644 for non-executable content as well as specify mode 0755 for
executable content (in case the defaults change or are different on
different systems). Also tell 'install' to preserve timestamps.
[ Updated to also do it when installing HTML files. --jonas ]
Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
'install' will install files with permissions set to '0755' if the
permissions are not specified on the command line. Having the execute
bits set on non-executable content is not desireable. Specify mode
0644 for non-executable content as well as specify mode 0755 for
executable content (in case the defaults change or are different on
different systems). Also tell 'install' to preserve timestamps.
[ Updated to also do it when installing HTML files. --jonas ]
Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig-0.7.git
tig-0.7