From ac02669e69c583b09ce6fe4c19f0f29b6392e151 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 12 Jun 2010 10:36:28 -0400 Subject: [PATCH] Rename {diff,file,rev}-args to {diff,file,rev}args --- NEWS | 4 ++-- manual.txt | 6 +++--- tig.c | 12 ++++++------ tigrc.5.txt | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 9f44a9f..17424ca 100644 --- a/NEWS +++ b/NEWS @@ -18,8 +18,8 @@ Improvements: - Plug several memory leaks. - Command line arguments are split into diff, revision, and file - arguments and made available as %(diff-args), %(rev-args), and - %(file-args). Diff view will limit diffs using %(file-args). + arguments and made available as %(diffargs), %(revargs), and + %(fileargs). Diff view will limit diffs using %(fileargs). - Status view: update the file variable when a line is selected so %(file) works as expected. - Branch view: add %(branch) symbol providing access to the selected diff --git a/manual.txt b/manual.txt index acfe9fd..be32a3e 100644 --- a/manual.txt +++ b/manual.txt @@ -158,9 +158,9 @@ following variables. empty for the root directory. |%(file) |The currently selected file. |%(ref) |The reference given to blame or HEAD if undefined. -|%(rev-args) |The revision arguments passed on the command line. -|%(file-args) |The file arguments passed on the command line. -|%(diff-args) |The diff options passed on the command line. +|%(revargs) |The revision arguments passed on the command line. +|%(fileargs) |The file arguments passed on the command line. +|%(diffargs) |The diff options passed on the command line. |============================================================================= [[title-window]] diff --git a/tig.c b/tig.c index d7752a2..a82a468 100644 --- a/tig.c +++ b/tig.c @@ -3200,17 +3200,17 @@ format_argv(const char ***dst_argv, const char *src_argv[], bool replace) const char *arg = src_argv[argc]; size_t bufpos = 0; - if (!strcmp(arg, "%(file-args)")) { + if (!strcmp(arg, "%(fileargs)")) { if (!argv_append_array(dst_argv, opt_file_args)) break; continue; - } else if (!strcmp(arg, "%(diff-args)")) { + } else if (!strcmp(arg, "%(diffargs)")) { if (!argv_append_array(dst_argv, opt_diff_args)) break; continue; - } else if (!strcmp(arg, "%(rev-args)")) { + } else if (!strcmp(arg, "%(revargs)")) { if (!argv_append_array(dst_argv, opt_rev_args)) break; continue; @@ -4183,7 +4183,7 @@ static struct view_ops log_ops = { static const char *diff_argv[SIZEOF_ARG] = { "git", "show", "--pretty=fuller", "--no-color", "--root", "--patch-with-stat", "--find-copies-harder", "-C", - "%(diff-args)", "%(commit)", "--", "%(file-args)", NULL + "%(diffargs)", "%(commit)", "--", "%(fileargs)", NULL }; static struct view_ops diff_ops = { @@ -6707,8 +6707,8 @@ update_rev_graph(struct view *view, struct rev_graph *graph) static const char *main_argv[SIZEOF_ARG] = { "git", "log", "--no-color", "--pretty=raw", "--parents", - "--topo-order", "%(diff-args)", "%(rev-args)", - "--", "%(file-args)", NULL + "--topo-order", "%(diffargs)", "%(revargs)", + "--", "%(fileargs)", NULL }; static bool diff --git a/tigrc.5.txt b/tigrc.5.txt index 987e30a..6c88563 100644 --- a/tigrc.5.txt +++ b/tigrc.5.txt @@ -227,9 +227,9 @@ are: empty for the root directory. |%(file) |The currently selected file. |%(ref) |The reference given to blame or HEAD if undefined. -|%(rev-args) |The revision arguments passed on the command line. -|%(file-args) |The file arguments passed on the command line. -|%(diff-args) |The diff options passed on the command line. +|%(revargs) |The revision arguments passed on the command line. +|%(fileargs) |The file arguments passed on the command line. +|%(diffargs) |The diff options passed on the command line. |============================================================================= As an example, the following external command will save the current commit as -- 2.30.2