Re: [RFC/PATCH] gitweb: Create special from-file/to-file header for combined diff

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [RFC/PATCH] gitweb: Create special from-file/to-file header for combined diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:13

Jakub Narebski [off-list ref] writes:
Instead of using default, diff(1) like from-file/to-file header for
combined diff (for a merge commit), which looks like:

  --- a/git-gui/git-gui.sh
  +++ b/_git-gui/git-gui.sh_

(where _link_ denotes [hidden] hyperlink), create from-file(n)/to-file
header, using n/file for each or parents, e.g.:

  --- 1/_git-gui/git-gui.sh_
  --- 2/_git-gui.sh_
  +++ b/_git-gui/git-gui.sh_
Sounds quite straightforward to implement, and diff with 1/
would be useful to recreate what the person who did the merge
pulled in, for most of the time.  I suspect diff with 2/ is
almost always uninteresting, though.

Re: [RFC/PATCH] gitweb: Create special from-file/to-file header for combined diff

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:13

Junio C Hamano wrote:
Jakub Narebski [off-list ref] writes:
quoted
Instead of using default, diff(1) like from-file/to-file header for
combined diff (for a merge commit), which looks like:

  --- a/git-gui/git-gui.sh
  +++ b/_git-gui/git-gui.sh_

(where _link_ denotes [hidden] hyperlink), create from-file(n)/to-file
header, using n/file for each or parents, e.g.:

  --- 1/_git-gui/git-gui.sh_
  --- 2/_git-gui.sh_
  +++ b/_git-gui/git-gui.sh_
Sounds quite straightforward to implement, and diff with 1/
would be useful to recreate what the person who did the merge
pulled in, for most of the time.  I suspect diff with 2/ is
almost always uninteresting, though.
Errr... it _is_ implemented in this patch, although code is not perfect
and has some unnecessary repetitions. But I thought before improving
code would it make sense to do this... and perhaps even add generated
extended diff headers for renames:

  rename at _2_ parent from _git-gui.sh_
  rename to _git-gui/git-gui.sh_

where as before _link_ denotes hyperlinked part. Hmmm?

-- 
Jakub Narebski
Poland

Re: [RFC/PATCH] gitweb: Create special from-file/to-file header for combined diff

From: Petr Baudis <hidden>
Date: 2016-06-15 22:43:13

On Mon, May 28, 2007 at 08:50:51AM CEST, Jakub Narebski wrote:
Junio C Hamano wrote:
quoted
Jakub Narebski [off-list ref] writes:
quoted
Instead of using default, diff(1) like from-file/to-file header for
combined diff (for a merge commit), which looks like:

  --- a/git-gui/git-gui.sh
  +++ b/_git-gui/git-gui.sh_

(where _link_ denotes [hidden] hyperlink), create from-file(n)/to-file
header, using n/file for each or parents, e.g.:

  --- 1/_git-gui/git-gui.sh_
  --- 2/_git-gui.sh_
  +++ b/_git-gui/git-gui.sh_
Sounds quite straightforward to implement, and diff with 1/
would be useful to recreate what the person who did the merge
pulled in, for most of the time.  I suspect diff with 2/ is
almost always uninteresting, though.
I like it too.
Errr... it _is_ implemented in this patch, although code is not perfect
and has some unnecessary repetitions.
It just shows links to older versions of the blob, doesn't it? Links to
diffs themselves would be useful too.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett

Re: [RFC/PATCH] gitweb: Create special from-file/to-file header for combined diff

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:13

On Mon, 28 May 2007, Petr Baudis wrote:
On Mon, May 28, 2007 at 08:50:51AM CEST, Jakub Narebski wrote:
quoted
Junio C Hamano wrote:
quoted
Jakub Narebski [off-list ref] writes:
quoted
Instead of using default, diff(1) like from-file/to-file header for
combined diff (for a merge commit), which looks like:

  --- a/git-gui/git-gui.sh
  +++ b/_git-gui/git-gui.sh_

(where _link_ denotes [hidden] hyperlink), create from-file(n)/to-file
header, using n/file for each or parents, e.g.:

  --- 1/_git-gui/git-gui.sh_
  --- 2/_git-gui.sh_
  +++ b/_git-gui/git-gui.sh_
Sounds quite straightforward to implement, and diff with 1/
would be useful to recreate what the person who did the merge
pulled in, for most of the time.  I suspect diff with 2/ is
almost always uninteresting, though.
I like it too.
quoted
Errr... it _is_ implemented in this patch, although code is not perfect
and has some unnecessary repetitions.
It just shows links to older versions of the blob, doesn't it? Links to
diffs themselves would be useful too.
For me most important were those from names (or /dev/null) in the case
of rename or copying (or file which was not present in some branches).

The link is to older version of blob; the links to appropriate blobdiffs
(and with earlier PATCH/RFC "gitweb: Provide links to individual
commitdiffs in difftree for merges" also to appropriate commitdiffs)
are in the difftree / whatchanged table.


Where to put link to diff? Should name be link to diff instead of
link to blob (to version at parent)?

-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help