Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
1085b8b
Move cursor to the first line when :0 is entered
jonas May 7, 2014
7724e4e
Fix documentation of author width option
jonas May 9, 2014
3cfa9ad
Fix release script to work for patch versions
jonas May 9, 2014
c43e755
tig-2.0.2
jonas May 9, 2014
a6745fe
argv: ensure closing parenthesis in variables
vivien May 14, 2014
c806cc2
Merge pull request #291 from vivien/argv/closing-parenthesis
jonas May 15, 2014
3a8df04
Move enum input_status to prompt header
jonas May 15, 2014
343844b
Add :save-display command
jonas May 15, 2014
6628083
Add support for running scripts using :script <file>
jonas May 15, 2014
65a4b54
Add TIG_SCRIPT and TIG_NO_DISPLAY environment variables
jonas May 15, 2014
4295ede
Add test framework
jonas May 15, 2014
b790822
Add test for tigrc compat errors
jonas May 15, 2014
43efbf9
Add test for tigrc parsing errors
jonas May 20, 2014
8247276
Add test for the main view
jonas May 18, 2014
61b2610
Fix the VERSION variable in Makefile
jonas May 12, 2014
99815b9
Fix documentation for toggle command examples
hamaco May 21, 2014
6f90346
Add test to check tigrc(5) examples for errors
jonas May 22, 2014
913bbfe
Ensure that tests reads tigrc from the default location
jonas May 22, 2014
1da889c
Extend tigrc parse test to check parsed bindings via the help view
jonas May 23, 2014
d97e7d0
Add test for TIGRC_USER and TIGRC_SYSTEM env variables
jonas May 23, 2014
61e8ee6
Document the test framework and improve the test output
jonas May 23, 2014
78abe4a
blame: treat HEAD as the parent of not-committed-yet
johnkeeping May 23, 2014
e4cff4f
Merge pull request #295 from johnkeeping/blame-head-parent-of-not-com…
jonas May 24, 2014
b4760a9
Use string_ncopy when copying ref names
jonas May 30, 2014
ec8f5de
Clearify that Tig always uses author date
jonas Jun 17, 2014
d3d40a3
Fix spurious failure in main/default-test
jonas Jun 17, 2014
f5a27c4
Fix readline support
jonas Jun 17, 2014
5c5487f
Allow scripts to go through the readline backend
jonas Jun 17, 2014
dad85de
Fix '/' to redo previous search when readline support is enabled
jonas Jun 17, 2014
f1f32f9
Fix readline prompt to correctly handle UTF-8 characters
jonas Jun 18, 2014
0ebb9a4
Make blame ID colors predictable across reloads
jonas Jun 18, 2014
bac9dce
Add test for displayment of index changes in the main view
jonas Jun 15, 2014
0b14cce
prompt: fix memleak of empty strings
vivien Jun 18, 2014
ee62059
Fix test result summary to only count succeeded and failed assertions
jonas Jun 21, 2014
2c8c7d1
Add test option to start tig inside a debugger
jonas Jun 21, 2014
f091db0
Move repo setup method from main/show-changes-test to libgit
jonas Jun 21, 2014
021dcd7
Reorder test directory setup and TEST_OPTS parsing
jonas Jun 21, 2014
78a32fa
Add test option to show tig trace information
jonas Jun 23, 2014
e56765a
Partly restore old refresh behavior
jonas Jul 1, 2014
290d543
Unify the color palette used for graph and ID drawing
jonas Jul 1, 2014
fc47f91
Add workaround for system dependent date comparison
jonas Jul 1, 2014
808dd91
Refresh the view after executing a backgrounded command
jonas Jul 1, 2014
d877cf0
Fix and improve status/refresh-test
jonas Jul 1, 2014
6f6c01f
Change test scripts to always wait for previous command to finish
jonas Jul 1, 2014
1cd613c
Add refs/default-test
jonas Jul 1, 2014
0bba7c5
draw_text_overflow: fix wrong offsets for multibyte text.
avm Jul 1, 2014
c155aaf
Add command-line option for starting in refs view
swegener Jul 6, 2014
73478d9
Fix installation directory permissions
Ferada Jul 11, 2014
2c16203
Improve use_scroll_status_wclear comment
jonas Jul 29, 2014
286a7aa
Handle binary files matches reported by git-grep
jonas Jul 29, 2014
1023302
Add view-split-width setting for controlling vertical splits
jonas Jul 29, 2014
6e7d1c9
Bind K and J to previous and next
jonas Jul 29, 2014
8009e23
Expose settings holding the filtered command line arguments
jonas Jul 31, 2014
dd76ecc
Add workaround for git pretty.format settings that break the log view
jonas Jul 31, 2014
eb8e382
Add submodule tests
jonas Aug 5, 2014
67bb12d
blame: fix invocation of diff for line tracking
johnkeeping Aug 3, 2014
c72aa4d
completion: don't use _tigcomp for filenames in blame
johnkeeping Aug 3, 2014
891a253
Show more main view info for the submodule tests
jonas Aug 5, 2014
213348a
Make the submodule test URLs relative
jonas Aug 5, 2014
f206f2e
Fix display of conflicts in the main view when 'show-changes' is enabled
jonas Aug 6, 2014
b6ee04a
Add tests for the grep view
jonas Aug 6, 2014
a6b3a1c
Improve error reporting for :set commands in the prompt
jonas Aug 14, 2014
6068808
Improve view reload after :set commands
jonas Aug 14, 2014
adb362b
Force --topo-order when graph is enabled and no commit order is set
jonas Aug 14, 2014
755736d
Remove unused variable in run_prompt_command()
jonas Aug 16, 2014
bc4f8e8
Fix segfault when running TIG_SCRIPT with no stdin given
jonas Aug 20, 2014
d2b6540
Remove unnecessary :wait from refs/default-test steps
jonas Aug 20, 2014
6f88af1
Fix bogus comparison in load_options
jonas Aug 21, 2014
0889dd1
Fix a couple of pedantic warnings
jonas Aug 21, 2014
92d006b
Add test for segfault related to TIG_SCRIPT usage
jonas Aug 21, 2014
6b80bb5
Add status test for file names
jonas Aug 26, 2014
1766e76
Refactor helper to create git repo from tgz
jonas Aug 27, 2014
49f8dc7
Use the unofficial bash strict mode for the test scripts
jonas Aug 27, 2014
d960c1c
Add dash compatibility for /bin/sh
jonas Aug 27, 2014
c2bb8fc
More test fixes for dash and the strict mode
jonas Aug 27, 2014
ee59b8f
Configure travis to run test both with default sh and bash
jonas Aug 27, 2014
1fa3d0a
Add basic tests for the blame and tree views
jonas Aug 28, 2014
98e692b
Ensure a stable view column search
jonas Aug 29, 2014
133b7eb
tig-2.0.3
jonas Aug 29, 2014
5d53d2d
Add move-half-page-up and move-half-page-down actions
aclindsa Aug 21, 2014
b08718d
Allow tests to invoke tig with view arguments
jonas Aug 30, 2014
3fc45bf
Change blame test to invoke the view directly
jonas Aug 30, 2014
1d6b7df
Preserve the cursor position when changing the diff context
jonas May 7, 2014
4028125
Fix diff context restoring for diff opened directly via 'tig show'
jonas Sep 4, 2014
a28b527
Update manual to reflect default keybinding changes
jonas Sep 4, 2014
722077a
Disable the graph when --first-parent is passed to the main view
jonas Sep 12, 2014
ff97609
Rework last commit to show the simplified graph for --first-parent
jonas Sep 12, 2014
079f17b
Fix off-by-one error when opening editor from the grep view
jonas Sep 14, 2014
b0e2c2d
Print expected arguments when debugging a test
jonas Sep 14, 2014
dcb19ec
compact prefix -/+ instead of verbose ago/forward sulfix.
gcb Sep 17, 2014
0817d77
Revert "compact prefix -/+ instead of verbose ago/forward sulfix."
jasonchang2082 May 23, 2015
861ab90
Revert "Revert "compact prefix -/+ instead of verbose ago/forward sul…
jasonchang2082 May 23, 2015
5354d95
Revert "Revert "Revert "compact prefix -/+ instead of verbose ago/for…
jasonchang2082 May 23, 2015
f2ca09a
Revert "Revert "compact prefix -/+ instead of verbose ago/forward sul…
jasonchang2082 May 23, 2015
c275280
Revert "Revert "Revert "compact prefix -/+ instead of verbose ago/for…
jasonchang2082 May 23, 2015
f8eca4f
IOS
jasonchang2082 May 23, 2015
9bd09ad
Revert "Revert "Revert "Revert "compact prefix -/+ instead of verbose…
jasonchang2082 May 23, 2015
2f60ff4
Revert "Revert "Revert "Revert "Revert "compact prefix -/+ instead of…
jasonchang2082 May 23, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ doc/release-docs/
src/builtin-config.c
src/tig
tags
test/test-graph
test/tools/test-graph
test/tmp
tig-*.tar.gz
tig-*.tar.gz.md5
tig.spec
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ compiler:
- gcc

env:
- TEST=autoconf VERBOSE=1
- TEST=autoconf VERBOSE=1 TEST_SHELL=bash
- TEST=make VERBOSE=@

before_install: sudo apt-get update -qq
Expand All @@ -15,4 +15,4 @@ install: sudo apt-get install -qq --no-install-recommends asciidoc xmlto docbook
script:
- if [ "$TEST" = autoconf ]; then ./autogen.sh && ./configure; fi
- if [ "$TEST" = make ]; then cp contrib/config.make .; fi
- make V=$VERBOSE DESTDIR=/tmp all test install install-doc
- make V=$VERBOSE DESTDIR=/tmp TEST_SHELL=$TEST_SHELL all test install install-doc
30 changes: 21 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# The last tagged version. Can be overridden either by the version from
# git or from the value of the DIST_VERSION environment variable.
VERSION = 2.0.1
VERSION = 2.0.3

all:

Expand Down Expand Up @@ -41,7 +41,7 @@ LDLIBS ?= -lcurses
CFLAGS ?= -Wall -O2
DFLAGS = -g -DDEBUG -Werror -O0
EXE = src/tig
TOOLS = test/test-graph tools/doc-gen
TOOLS = test/tools/test-graph tools/doc-gen
TXTDOC = doc/tig.1.adoc doc/tigrc.5.adoc doc/manual.adoc NEWS.adoc README.adoc INSTALL.adoc
MANDOC = doc/tig.1 doc/tigrc.5 doc/tigmanual.7
HTMLDOC = doc/tig.1.html doc/tigrc.5.html doc/manual.html README.html INSTALL.html NEWS.html
Expand Down Expand Up @@ -103,7 +103,7 @@ install-release-doc-html:
install-doc: install-doc-man install-doc-html
install-release-doc: install-release-doc-man install-release-doc-html

clean:
clean: clean-test
$(RM) -r $(TARNAME) *.spec tig-*.tar.gz tig-*.tar.gz.md5 .deps
$(RM) $(EXE) $(TOOLS) $(OBJS) core doc/*.xml src/builtin-config.c

Expand Down Expand Up @@ -153,16 +153,26 @@ dist: configure tig.spec
rpm: dist
rpmbuild -ta $(TARNAME).tar.gz

test: $(TOOLS)
test/unit-test-graph.sh
test/builtin-config.sh
TESTS = $(sort $(shell find test -type f -name '*-test'))

clean-test:
$(Q)$(RM) -r test/tmp

test: clean-test $(TESTS)
$(QUIET_SUMMARY)test/tools/show-results.sh

export TEST_OPTS ?= $(V:1=no-indent)

$(TESTS): PATH := $(CURDIR)/test/tools:$(CURDIR)/src:$(PATH)
$(TESTS): $(EXE) test/tools/test-graph
$(QUIET_TEST)$(TEST_SHELL) $@

# Other autoconf-related rules are hidden in config.make.in so that
# they don't confuse Make when we aren't actually using ./configure
configure: configure.ac acinclude.m4 tools/*.m4
./autogen.sh

.PHONY: all all-debug doc doc-man doc-html install install-doc \
.PHONY: all all-debug doc doc-man doc-html install install-doc $(TESTS) \
install-doc-man install-doc-html clean spell-check dist rpm test

ifdef NO_MKSTEMPS
Expand Down Expand Up @@ -222,8 +232,8 @@ TIG_OBJS = \

src/tig: $(TIG_OBJS)

TEST_GRAPH_OBJS = test/test-graph.o src/string.o src/util.o src/io.o src/graph.o $(COMPAT_OBJS)
test/test-graph: $(TEST_GRAPH_OBJS)
TEST_GRAPH_OBJS = test/tools/test-graph.o src/string.o src/util.o src/io.o src/graph.o $(COMPAT_OBJS)
test/tools/test-graph: $(TEST_GRAPH_OBJS)

DOC_GEN_OBJS = tools/doc-gen.o src/string.o src/types.o src/util.o src/request.o
tools/doc-gen: $(DOC_GEN_OBJS)
Expand Down Expand Up @@ -317,6 +327,8 @@ QUIET_DB2PDF = $(Q:@=@echo ' DB2PDF '$@;)
# tools/install.sh will print 'file -> $install_dir/file'
QUIET_INSTALL = $(Q:@=@printf ' INSTALL ';)
QUIET_INSTALL_EACH = $(Q:@=printf ' INSTALL ';)
QUIET_TEST = $(Q:@=@echo ' TEST '$@;)
QUIET_SUMMARY = $(Q:@=@printf ' SUMMARY ';)

export V
endif
64 changes: 64 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,75 @@ Release notes
master
------

Improvements:

- Add move-half-page-up and move-half-page-down actions. (GH #323)
- Preserve the cursor position when changing the diff context.

Bug fixes:

- Update manual to reflect default keybinding changes. (GH #325)
- Fix graph support for `--first-parent`. (GH #326)
- Fix off-by-one error when opening editor from the grep view.

tig-2.0.3
---------

Improvements:

- Add `:save-display <file>` prompt command to save the current display.
- Add `:script <file>` prompt command for scripting the Tig UI.
- Add test framework and convert existing tests to use it.
- Add command-line option for starting in refs view: `tig refs`. (GH #309)
- Make blame commit ID colors stable across reloads. (GH #303)
- Increase blame ID and graph rendering color palette to 14 colors.
- New setting 'split-view-width' controls the width for vertical splits. It
takes the width of the right-most view either as a number or a percentage.
- Expose settings holding command line argument lists: `file-args`, `rev-args`,
and `cmdline-args`. They are mainly intended for testing purposes but also
allows to change the filtering arguments dynamically. (GH #306)
- Add `log-options` setting for specifying default log view options.
Example: `set log-options = --pretty=fuller`.
- Use option specific view flags to reload view after `:set` commands.

Bug fixes:

- Refresh the current view when returning from an external command and
`refresh-mode=after-command`. (GH #289)
- Fix readline completion.
- Fix '/' to `find-next` when readline support is enabled. (GH #302)
- Fix readline prompt to correctly handle UTF-8 characters.
- Add warnings for more obsolete actions and colors.
- Fix passing of commit IDS via stdin to the main view.
- Fix commit title overflow drawing for multibyte text. (GH #307)
- Fix installation directory permissions.
- Handle binary files matches reported by git-grep.
- Toggling of "args"-typed options without any arguments will clear the current
arguments. Example: `:toggle blame-options`.
- Detect custom `pretty.format` settings that break the log view and fallback
to use the `medium` format. (GH #225)
- Fix invocation of git-diff for the blame view's line tracking. (GH #316)
- Fix blame completion of directory names. (GH #317)
- Fix display of conflicts in the main view when 'show-changes' is enabled.
- Fix off-by-one error when displaying line numbers in the grep view.
- When showing the commit graph ensure that either topo, date or author-date
commit order is used. (Debian #757692) (GH #238)

tig-2.0.2
---------

Improvements:

- Use git-status for diffing the index.
- Group toggle options together in the help view.

Bug fixes:

- Fix refs, main and grep loading when 'gui.encoding' is set. (GH #287)
- Ignore 'gui.encoding' and 'i18n.commitencoding' when set to 'UTF-8'.
- Add work-around for missing strndup() on Mac OS X v10.6. (GH #286)
- Fix spurious abbreviation of author names. (GH #288)
- Don't show empty action groups in the help view.

tig-2.0.1
---------
Expand Down
38 changes: 28 additions & 10 deletions contrib/tig-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,40 @@ _tig_options ()

_tig_blame ()
{
local reply="" ref=HEAD cur="${COMP_WORDS[COMP_CWORD]}"
local reply="" ref=HEAD cur="${COMP_WORDS[COMP_CWORD]}" p=""
local pfx=$(git rev-parse --show-prefix 2>/dev/null)

if test "$COMP_CWORD" -lt 3; then
reply="$(__tig_refs)"
_tigcomp "$(__tig_refs)"
else
ref="${COMP_WORDS[2]}"
fi

reply="$reply $(git --git-dir="$(__tigdir)" ls-tree "$ref" \
| sed '/^100... blob /s,^.* ,,
/^040000 tree /{
s,^.* ,,
s,$,/,
}
s/^.* //')"
_tigcomp "$reply"
case "$cur" in
*/) p=${cur%/} ;;
*/*) p=${cur%/*} ;;
*) p= ;;
esac

i=${#COMPREPLY[@]}
local IFS=$'\n'
for c in $(git --git-dir="$(__tigdir)" ls-tree "$ref:$pfx$p" 2>/dev/null |
sed -n '/^100... blob /{
s,^.* ,,
s,$, ,
p
}
/^040000 tree /{
s,^.* ,,
s,$,/,
p
}')
do
c="${p:+$p/}$c"
if [[ "$c" == "$cur"* ]]; then
COMPREPLY[i++]=$c
fi
done
}

_tig_show ()
Expand Down
19 changes: 10 additions & 9 deletions doc/manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ from an external command, most often 'git log', 'git diff', or 'git show'.

The main view::
Is the default view, and it shows a one line summary of each commit
in the chosen list of revisions. The summary includes commit date,
in the chosen list of revisions. The summary includes author date,
author, and the first line of the log message. Additionally, any
repository references, such as tags, will be shown.

Expand Down Expand Up @@ -301,11 +301,12 @@ View Switching
|p |Switch to pager view.
|t |Switch to (directory) tree view.
|f |Switch to (file) blob view.
|B |Switch to blame view.
|H |Switch to refs view.
|g |Switch to grep view.
|b |Switch to blame view.
|r |Switch to refs view.
|y |Switch to stash view.
|h |Switch to help view
|S |Switch to status view
|s |Switch to status view
|c |Switch to stage view
|=============================================================================

Expand Down Expand Up @@ -384,8 +385,8 @@ Scrolling
|Key |Action
|Insert |Scroll view one line up.
|Delete |Scroll view one line down.
|w |Scroll view one page up.
|s |Scroll view one page down.
|ScrBack|Scroll view one page up.
|ScrFwd |Scroll view one page down.
|Left |Scroll view one column left.
|Right |Scroll view one column right.
|\| |Scroll view to the first column.
Expand All @@ -412,16 +413,16 @@ Misc
|=============================================================================
|Key |Action
|Q |Quit.
|r |Redraw screen.
|<C-L> |Redraw screen.
|z |Stop all background loading. This can be useful if you use
Tig in a repository with a long history without limiting
the revision log.
|v |Show version.
|o |Open option menu
|. |Toggle line numbers on/off.
|# |Toggle line numbers on/off.
|D |Toggle date display on/off/short/relative/local.
|A |Toggle author display on/off/abbreviated/email/email user name.
|g |Toggle revision graph visualization on/off.
|G |Toggle revision graph visualization on/off.
|~ |Toggle (line) graphics mode
|F |Toggle reference display on/off (tag and branch names).
|W |Toggle ignoring whitespace on/off for diffs
Expand Down
19 changes: 19 additions & 0 deletions doc/tig.1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tig log [options] [revisions] [--] [paths]
tig show [options] [revisions] [--] [paths]
tig blame [options] [rev] [--] path
tig grep [options] [pattern]
tig refs
tig stash
tig status
tig < [Git command output]
Expand Down Expand Up @@ -52,6 +53,9 @@ status::
log::
Start up in log view, displaying git-log(1) output.

refs::
Start up in refs view.

stash::
Start up in stash view.

Expand Down Expand Up @@ -167,6 +171,11 @@ Grep all files for lines containing `DEFINE_ENUM`:
$ tig grep -p DEFINE_ENUM
-----------------------------------------------------------------------------

Show references (branches, remotes and tags):
-----------------------------------------------------------------------------
$ tig refs
-----------------------------------------------------------------------------

ENVIRONMENT VARIABLES
---------------------

Expand Down Expand Up @@ -201,6 +210,16 @@ TIG_DIFF_OPTS::
TIG_TRACE::
Path for trace file where information about Git commands are logged.

TIG_SCRIPT::
Path to script that should be executed automatically on startup. If this
environment variable is defined to the empty string, the script is read
from stdin. The script is interpreted line-by-line and can contain
prompt commands and key mappings.

TIG_NO_DISPLAY::
Open Tig without rendering anything to the terminal. This force Ncurses
to write to /dev/null. The main use is for automated testing of Tig.

FILES
-----
'~/.tigrc'::
Expand Down
Loading