All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael P. Soulier" <msoulier@digitaltorque.ca>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git confused by rename
Date: Fri, 10 Oct 2008 18:08:39 -0400	[thread overview]
Message-ID: <20081010220839.GA38499@kanga.digitaltorque.ca> (raw)
In-Reply-To: <7v3aj4momt.fsf@gitster.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

On 10/10/08 Junio C Hamano said:
> 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

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

  parent reply	other threads:[~2008-10-10 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 14:41 git confused by rename Michael P. Soulier
2008-10-10 15:44 ` Junio C Hamano
2008-10-10 15:54   ` Junio C Hamano
2008-10-10 16:19     ` Björn Steinbrink
2008-10-10 22:08     ` Michael P. Soulier [this message]
2008-10-10 16:08   ` [PATCH] git-status: Detect copies as well as renames Björn Steinbrink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081010220839.GA38499@kanga.digitaltorque.ca \
    --to=msoulier@digitaltorque.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.