Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: Call Me Gitless · Junio C Hamano <hidden> · 2016-06-15

Re: Call Me Gitless

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:11

Junio C Hamano [off-list ref] writes:
What I did not bother in the patch is --no-index codepath, but with the
recent refactoring of it to separate it out from the normal "index vs work
tree" codepath, I would expect it to be trivial to use "1/" vs "2/" (or
"old/" and "new/") prefixes for them.  I didn't actually look, though.
Ok, I looked.  It is indeed easy enough ;-)

---
 diff-no-index.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git i/diff-no-index.c w/diff-no-index.c
index 7d68b7f..126ff1c 100644
--- i/diff-no-index.c
+++ w/diff-no-index.c
@@ -252,6 +252,7 @@ void diff_no_index(struct rev_info *revs,
 	if (queue_diff(&revs->diffopt, revs->diffopt.paths[0],
 		       revs->diffopt.paths[1]))
 		exit(1);
+	diff_set_default_prefix(&revs->diffopt, "1/", "2/");
 	diffcore_std(&revs->diffopt);
 	diff_flush(&revs->diffopt);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help