summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53c0894)
raw | patch | inline | side by side (parent: 53c0894)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 5 Jun 2010 04:23:09 +0000 (00:23 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 5 Jun 2010 04:27:31 +0000 (00:27 -0400) |
NEWS | patch | blob | history | |
manual.txt | patch | blob | history | |
tig.1.txt | patch | blob | history | |
tig.c | patch | blob | history |
index 50f555c235b6ad47f646cfec43baae84ba3e91ca..190e5dcee78ae3ede429e24085e75c37f9baddac 100644 (file)
--- a/NEWS
+++ b/NEWS
but should in general improve handling of character lengths etc.
Also, to properly handle UTF-8 environments use ncurses with wide
character support.
+ - The use of TIG_{MAIN,DIFF,LOG,TREE,BLOB}_CMD environment variables
+ has been deprecated. To allow configuration of the diff view,
+ TIG_DIFF_OPTS can be used.
Improvements:
diff --git a/manual.txt b/manual.txt
index b8536da6242efc12078603a26ed5381658cabaae..acfe9fd6e441071ab0f733521c5d33a983482db1 100644 (file)
--- a/manual.txt
+++ b/manual.txt
--
-[[history-commands]]
-History Commands
-~~~~~~~~~~~~~~~~
+[[diff-options]]
+Diff options
+~~~~~~~~~~~~
-It is possible to alter which commands are used for the different views. If
-for example you prefer commits in the main view to be sorted by date and only
-show 500 commits, use:
+It is possible to alter how diffs are shown by the diff view. If for example
+you prefer to have commit and author dates shown as relative dates, use:
-----------------------------------------------------------------------------
-$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %(head)" tig
+$ TIG_DIFF_OPTS="--relative-date" tig
-----------------------------------------------------------------------------
Or set the variable permanently in your environment.
-Notice, how `%(head)` is used to specify the commit reference.
-
---
-
-TIG_DIFF_CMD::
-
- The command used for the diff view. Defaults to:
------------------------------------------------------------------------------
-git show --pretty=fuller --no-color --root
- --patch-with-stat --find-copies-harder -C %(commit)
------------------------------------------------------------------------------
-
-TIG_LOG_CMD::
-
- The command used for the log view. If you prefer to have both
- author and committer shown in the log view be sure to pass
- `--pretty=fuller` to git log. Defaults to:
------------------------------------------------------------------------------
-git log --no-color --cc --stat -n100 %(head)
------------------------------------------------------------------------------
-
-TIG_MAIN_CMD::
-
- The command used for the main view. Note, you must always specify
- the option: `--pretty=raw` since the main view parser expects to
- read that format.
------------------------------------------------------------------------------
-git log --no-color --pretty=raw --parents --topo-order %(head)
------------------------------------------------------------------------------
-
---
-
-[[tree-commands]]
-Tree Commands
-~~~~~~~~~~~~~
-
---
-
-TIG_TREE_CMD::
-
- The command used for the tree view. Defaults to:
------------------------------------------------------------------------------
-git ls-tree %(commit) %(directory)
------------------------------------------------------------------------------
-
-TIG_BLOB_CMD::
-
- The command used for the blob view. Defaults to:
------------------------------------------------------------------------------
-git cat-file blob %(blob)
------------------------------------------------------------------------------
-
---
-
[[keys]]
Default Keybindings
-------------------
diff --git a/tig.1.txt b/tig.1.txt
index 30acf7c088190493a4cb8f4c87f9dcf321b6ad87..3e2ffdf59721072b5e7856da0532387bb2d5bd5b 100644 (file)
--- a/tig.1.txt
+++ b/tig.1.txt
Set command for retrieving all repository references. The command
should output data in the same format as git-ls-remote(1).
-TIG_DIFF_CMD::
- The command used for the diff view. By default, git show is used
- as a backend.
-
-TIG_LOG_CMD::
- The command used for the log view. If you prefer to have both
- author and committer shown in the log view be sure to pass
- `--pretty=fuller` to git log.
-
-TIG_MAIN_CMD::
- The command used for the main view. Note, you must always specify
- the option: `--pretty=raw` since the main view parser expects to
- read that format.
-
-Tree commands
-~~~~~~~~~~~~~
-TIG_TREE_CMD::
- The command used for the tree view. By default, git-ls-tree(1) is
- used.
-
-TIG_BLOB_CMD::
- The command used for the blob view. By default, git-cat-file(1) is
- used.
+TIG_DIFF_OPTS::
+ The diff options to use in the diff view. The diff view uses
+ git-show(1) for formatting and always passes --patch-with-stat,
+ --find-copies-harder, and -C.
FILES
-----
index a2fe255bfda8599b94c1d05c4d079cc01043ec35..01f48c35766cdcb1541513eef7f48d078cd6f0dc 100644 (file)
--- a/tig.c
+++ b/tig.c
if (load_refs() == ERR)
die("Failed to load refs.");
- foreach_view (view, i)
+ foreach_view (view, i) {
+ if (getenv(view->cmd_env))
+ warn("Use of the %s environment variable is deprecated,"
+ " use options or TIG_DIFF_ARGS instead",
+ view->cmd_env);
if (!argv_from_env(view->ops->argv, view->cmd_env))
die("Too many arguments in the `%s` environment variable",
view->cmd_env);
+ }
init_display();