Skip to content

Commit 50b8e35

Browse files
spotJunio C Hamano
authored andcommitted
Documentation changes to recursive option for git-diff-tree
Update docs and usages regarding '-r' recursive option for git-diff-tree. Remove '-r' from common diff options, mention it only for git-diff-tree. Remove one extraneous use of '-r' with git-diff-files in get-merge.sh. Sync the synopsis and usage string for git-diff-tree. Signed-off-by: Chris Shoemaker <c.shoemaker at cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent f07a524 commit 50b8e35

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

Documentation/git-diff-tree.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-diff-tree - Compares the content and mode of blobs found via two tree object
88

99
SYNOPSIS
1010
--------
11-
'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
11+
'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
1212

1313
DESCRIPTION
1414
-----------
@@ -33,6 +33,9 @@ include::diff-options.txt[]
3333
Note that this parameter does not provide any wildcard or regexp
3434
features.
3535

36+
-r::
37+
recurse into sub-trees
38+
3639
-t::
3740
show tree entry itself as well as subtrees. Implies -r.
3841

diff-tree.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ static int diff_tree_stdin(char *line)
149149
}
150150

151151
static const char diff_tree_usage[] =
152-
"git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] "
153-
"[<common diff options>] <tree-ish> <tree-ish>"
152+
"git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] "
153+
"[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
154+
" -r diff recursively\n"
155+
" --root include the initial commit as diff against /dev/null\n"
154156
COMMON_DIFF_OPTIONS_HELP;
155157

156158
int main(int argc, const char **argv)

diff.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ extern void diffcore_std_no_resolve(struct diff_options *);
9191

9292
#define COMMON_DIFF_OPTIONS_HELP \
9393
"\ncommon diff options:\n" \
94-
" -r diff recursively (only meaningful in diff-tree)\n" \
9594
" -z output diff-raw with lines terminated with NUL.\n" \
9695
" -p output patch format.\n" \
9796
" -u synonym for -p.\n" \

git-merge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dropsave() {
2525

2626
savestate() {
2727
# Stash away any local modifications.
28-
git-diff-index -r -z --name-only $head |
28+
git-diff-index -z --name-only $head |
2929
cpio -0 -o >"$GIT_DIR/MERGE_SAVE"
3030
}
3131

0 commit comments

Comments
 (0)