diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-06-07 00:04:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-07 00:04:01 -0700 |
commit | a6080a0a44d5ead84db3dabbbc80e82df838533d (patch) | |
tree | 37360b8334cf8459609d1fae72f8213947858cc0 /Documentation/diff-format.txt | |
parent | d44c782bbd6b0e806e056f9e8ff8cd8e426e67a3 (diff) | |
download | git-a6080a0a44d5ead84db3dabbbc80e82df838533d.tar.gz |
War on whitespace
This uses "git-apply --whitespace=strip" to fix whitespace errors that have
crept in to our source files over time. There are a few files that need
to have trailing whitespaces (most notably, test vectors). The results
still passes the test, and build result in Documentation/ area is unchanged.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-format.txt')
-rw-r--r-- | Documentation/diff-format.txt | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt index e38a1f1405..18d49d2c3b 100644 --- a/Documentation/diff-format.txt +++ b/Documentation/diff-format.txt @@ -1,7 +1,7 @@ The output format from "git-diff-index", "git-diff-tree" and "git-diff-files" are very similar. -These commands all compare two sets of things; what is +These commands all compare two sets of things; what is compared differs: git-diff-index <tree-ish>:: @@ -139,28 +139,28 @@ index fabadb8,cc95eb0..4866510 --- a/describe.c +++ b/describe.c @@@ -98,20 -98,12 +98,20 @@@ - return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1; + return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1; } - + - static void describe(char *arg) -static void describe(struct commit *cmit, int last_one) ++static void describe(char *arg, int last_one) { + unsigned char sha1[20]; + struct commit *cmit; - struct commit_list *list; - static int initialized = 0; - struct commit_name *n; - + struct commit_list *list; + static int initialized = 0; + struct commit_name *n; + + if (get_sha1(arg, sha1) < 0) + usage(describe_usage); + cmit = lookup_commit_reference(sha1); + if (!cmit) + usage(describe_usage); + - if (!initialized) { - initialized = 1; - for_each_ref(get_name); + if (!initialized) { + initialized = 1; + for_each_ref(get_name); ------------ 1. It is preceded with a "git diff" header, that looks like @@ -233,4 +233,3 @@ parents). When shown by `git diff-files -c`, it compares the two unresolved merge parents with the working tree file (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version"). - |