Skip to content

Commit

Permalink
Documentation changes to recursive option for git-diff-tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Shoemaker authored and Junio C Hamano committed Oct 28, 2005
1 parent f07a524 commit 50b8e35
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Documentation/git-diff-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ git-diff-tree - Compares the content and mode of blobs found via two tree object

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

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

-r::
recurse into sub-trees

-t::
show tree entry itself as well as subtrees. Implies -r.

Expand Down
6 changes: 4 additions & 2 deletions diff-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ static int diff_tree_stdin(char *line)
}

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

int main(int argc, const char **argv)
Expand Down
1 change: 0 additions & 1 deletion diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ extern void diffcore_std_no_resolve(struct diff_options *);

#define COMMON_DIFF_OPTIONS_HELP \
"\ncommon diff options:\n" \
" -r diff recursively (only meaningful in diff-tree)\n" \
" -z output diff-raw with lines terminated with NUL.\n" \
" -p output patch format.\n" \
" -u synonym for -p.\n" \
Expand Down
2 changes: 1 addition & 1 deletion git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dropsave() {

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

Expand Down

0 comments on commit 50b8e35

Please sign in to comment.