From 47dd0d595d04ee5283dfd8a0b4cbd6e6de8ad57f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 13 Dec 2005 17:21:41 -0800 Subject: diff: --abbrev option When I show transcripts to explain how something works, I often find myself hand-editing the diff-raw output to shorten various object names in the output. This adds --abbrev option to the diff family, which shortens diff-raw output and diff-tree commit id headers. Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation/diff-options.txt') diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 6b496ede25..3d1175e864 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -18,6 +18,13 @@ object name of pre- and post-image blob on the "index" line when generating a patch format output. +--abbrev:: + Instead of showing the full 40-byte hexadecimal object + name in diff-raw format output and diff-tree header + lines, show only handful prefix. This is independent of + --full-index option above, which controls the diff-patch + output format. + -B:: Break complete rewrite changes into pairs of delete and create. -- cgit v1.3-5-g9baa From 913419fcc648dd43d7f7afdd94fa25aee4f9798a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 18 Dec 2005 02:03:15 -0800 Subject: diff --abbrev: document --abbrev= form. It was implemented there but was not advertised. Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 9 +++++---- diff.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'Documentation/diff-options.txt') diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 3d1175e864..9e574a04d3 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -18,12 +18,13 @@ object name of pre- and post-image blob on the "index" line when generating a patch format output. ---abbrev:: +--abbrev[=]:: Instead of showing the full 40-byte hexadecimal object name in diff-raw format output and diff-tree header - lines, show only handful prefix. This is independent of - --full-index option above, which controls the diff-patch - output format. + lines, show only handful dhexigits prefix. This is + independent of --full-index option above, which controls + the diff-patch output format. Non default number of + digits can be specified with --abbrev=. -B:: Break complete rewrite changes into pairs of delete and create. diff --git a/diff.h b/diff.h index c3486ffa86..5696f2aff0 100644 --- a/diff.h +++ b/diff.h @@ -103,7 +103,7 @@ extern void diffcore_std_no_resolve(struct diff_options *); " --name-only show only names of changed files.\n" \ " --name-status show names and status of changed files.\n" \ " --full-index show full object name on index lines.\n" \ -" --abbrev abbreviate object names in diff-tree header and diff-raw.\n" \ +" --abbrev= abbreviate object names in diff-tree header and diff-raw.\n" \ " -R swap input file pairs.\n" \ " -B detect complete rewrites.\n" \ " -M detect renames.\n" \ -- cgit v1.3-5-g9baa