From: Chris Shoemaker Date: Fri, 28 Oct 2005 17:04:49 +0000 (-0400) Subject: Documentation changes to recursive option for git-diff-tree X-Git-Tag: v0.99.9~24 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=50b8e355b64c93a71d5008557e15f52c032240ff;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index dcfb9e18..f57c8d0d 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -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] [] [] [...] +'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] [] [] [...] DESCRIPTION ----------- @@ -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. diff --git a/diff-tree.c b/diff-tree.c index 382011a2..ed323d87 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -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] " -"[] " +"git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] " +"[] [] [...]\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) diff --git a/diff.h b/diff.h index 51155479..12590791 100644 --- a/diff.h +++ b/diff.h @@ -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" \ diff --git a/git-merge.sh b/git-merge.sh index 3457a96c..6ad96ebf 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -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" }