summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-27 20:14:47 -0700
committerJunio C Hamano <gitster@pobox.com>2012-06-28 16:18:19 -0700
commit4682d8521c3ce9d722bd214fd7d5fc92063fdacb (patch)
tree1d3030f460c38d95eec40bc80d162acfa54a592a /diffcore.h
parent3b069b1beba6d851401032260a8030448637ece5 (diff)
downloadgit-4682d8521c3ce9d722bd214fd7d5fc92063fdacb.tar.gz
diff-index.c: "git diff" has no need to read blob from the standard input
Only "diff --no-index -" does. Bolting the logic into the low-level function diff_populate_filespec() was a layering violation from day one. Move populate_from_stdin() function out of the generic diff.c to its only user, diff-index.c. Also make sure "-" from the command line stays a special token "read from the standard input", even if we later decide to sanitize the result from prefix_filename() function in a few obvious ways, e.g. removing unnecessary "./" prefix, duplicated slashes "//" in the middle, etc. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h
index b8f1fdecf4..ae43149620 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -43,6 +43,7 @@ struct diff_filespec {
unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */
unsigned dirty_submodule : 2; /* For submodules: its work tree is dirty */
+ unsigned is_stdin : 1;
#define DIRTY_SUBMODULE_UNTRACKED 1
#define DIRTY_SUBMODULE_MODIFIED 2