Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-18 Thread Junio C Hamano
Mike Hommey writes: >> I suspect that this would be useful without copy detection. If you >> "git mv fileA fileB" (optionally followed by "edit fileB"), fileB >> would not be in HEAD but you should be able to trace the lineage of >> the lines in it back through the renaming

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Mike Hommey
> I suspect that this would be useful without copy detection. If you > "git mv fileA fileB" (optionally followed by "edit fileB"), fileB > would not be in HEAD but you should be able to trace the lineage of > the lines in it back through the renaming event, and this change > also allows that use

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Junio C Hamano
Junio C Hamano writes: > I suspect that the above change needs to be updated further if the > user wants to run "blame path" during a conflicted renaming merge, > i.e. > > 0. Before two histories diverged, there was old_path. > 1. Our side updated contents of that file and

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Junio C Hamano
Mike Hommey writes: > When blaming files, changes in the work tree are taken into account > and displayed as being "Not Committed Yet". > > However, when blaming a file that is not known to the current HEAD, > git blame fails with `no such path 'foo' in HEAD`, even when the

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Mike Hommey
On Fri, Jul 15, 2016 at 08:37:59AM -0400, Jeff King wrote: > On Fri, Jul 15, 2016 at 09:32:45PM +0900, Mike Hommey wrote: > > > > > +test_expect_success 'blame wholesale copy and more in the index' ' > > > > + > > > > + { > > > > + echo ABC > > > > + echo DEF > >

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Jeff King
On Fri, Jul 15, 2016 at 09:32:45PM +0900, Mike Hommey wrote: > > > +test_expect_success 'blame wholesale copy and more in the index' ' > > > + > > > + { > > > + echo ABC > > > + echo DEF > > > + echo > > > + echo > > > + echo GHIJK > > > + }

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Mike Hommey
On Fri, Jul 15, 2016 at 12:45:15PM +0200, Johannes Schindelin wrote: > Hi Mike, > > On Fri, 15 Jul 2016, Mike Hommey wrote: > > > When blaming files, changes in the work tree are taken into account > > and displayed as being "Not Committed Yet". > > > > However, when blaming a file that is not

Re: [PATCH] blame: Allow to blame paths freshly added to the index

2016-07-15 Thread Johannes Schindelin
Hi Mike, On Fri, 15 Jul 2016, Mike Hommey wrote: > When blaming files, changes in the work tree are taken into account > and displayed as being "Not Committed Yet". > > However, when blaming a file that is not known to the current HEAD, > git blame fails with `no such path 'foo' in HEAD`, even

[PATCH] blame: Allow to blame paths freshly added to the index

2016-07-14 Thread Mike Hommey
When blaming files, changes in the work tree are taken into account and displayed as being "Not Committed Yet". However, when blaming a file that is not known to the current HEAD, git blame fails with `no such path 'foo' in HEAD`, even when the file was git add'ed. This would seem uninteresting