summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-09-18 20:30:07 -0700
committerJunio C Hamano <gitster@pobox.com>2008-09-18 20:30:07 -0700
commite69a6f47c4e25a20170eb989a55257d0399f795b (patch)
tree4891b8d55a9d188ad695c7da5c35c3744d1909b6 /builtin-diff.c
parentc4398286fa5245cf54d73f6016444179d73f140b (diff)
parenta5a818ee4877e4458e8e6741a03ac3b19941d58a (diff)
downloadgit-e69a6f47c4e25a20170eb989a55257d0399f795b.tar.gz
Merge branch 'jc/diff-prefix'
* jc/diff-prefix: diff: vary default prefix depending on what are compared
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 037c3039a4..52470c7f41 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -74,6 +74,8 @@ static int builtin_diff_b_f(struct rev_info *revs,
if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)))
die("'%s': not a regular file or symlink", path);
+ diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/");
+
if (blob[0].mode == S_IFINVALID)
blob[0].mode = canon_mode(st.st_mode);