Re: [PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 3:05 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> @@ -2305,6 +2311,15 @@ static void builtin_diff(const char *name_a, >> struct strbuf header = STRBUF_INIT; >> const char *line_prefix = diff_line_prefix(o); >> >> + diff_set_mnemonic_prefix(o, "a/",

Re: [PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Junio C Hamano
Jacob Keller writes: > @@ -2305,6 +2311,15 @@ static void builtin_diff(const char *name_a, > struct strbuf header = STRBUF_INIT; > const char *line_prefix = diff_line_prefix(o); > > + diff_set_mnemonic_prefix(o, "a/", "b/"); > + if (DIFF_OPT_TST(o, REVERSE_DIFF)) { > +

[PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
From: Jacob Keller For projects which have frequent updates to submodules it is often useful to be able to see a submodule update commit as a difference. Teach diff's --submodule= a new "diff" format which will execute a diff for the submodule between the old and new commit, and display it as a s