Re: git confused by rename
- From
Michael P. Soulier <msoulier@digitaltorque.ca>
- Date
- Oct 10, 2008, 22:08 UTC
- Message-ID
- <20081010220839.GA38499@kanga.digitaltorque.ca>
- In-Reply-To
- <7v3aj4momt.fsf@gitster.siamese.dyndns.org>
On 10/10/08 Junio C Hamano said:
Show 7 quoted lines
> The above observation of mine is correct, but I forgot that "git status" > (and the comment in the commit template from "git commit") is generated > internally with "diff-index -B -M". So if > > (0) had A but not B in the HEAD commit; > (1) you created B that is very similar to the original A; and > (2) you modified A beyond recognition;
Which, FTR, is what I did.
I copied A -> B for its boilerplate, and then hacked them both up, although B consisted mostly of content that I removed from A (a refactoring exercise).
> This however makes me wonder if "diff-index -B -M" should say B is copied > (instead of being renamed) from A and A is modified in such a case. I do > not think we would want to make such a change without thinking things, > through.
Gotcha. Indeed though, I did cp A -> B, and if A still exists then it obviously was not renamed.
Thanks, Mike
-- Michael P. Soulier <msoulier@digitaltorque.ca> "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein