git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aaron Gray" <angray@beeb.net>
To: <git@vger.kernel.org>
Subject: Re: renaming question
Date: Sun, 19 Aug 2007 20:17:31 +0100	[thread overview]
Message-ID: <03bd01c7e295$976a2970$0600a8c0@ze4427wm> (raw)
In-Reply-To: 85sl6fqr9n.fsf@lola.goethe.zz

> "Aaron Gray" <angray@beeb.net> writes:
>
>>>* Aaron Gray:
>>>
>>>> I have a very large C source project that I am converting from C to 
>>>> C++.
>>>>
>>>> Is it posssible to track changes with renamed files in GIT ?
>>>
>>> You don't need to rename the files if you compile them using g++.  If
>>> you still want to rename them, most history-related GIT commands
>>> accept an -M switch which enables rename ("move") detection.
>>
>> For sanity they have to be renamed.
>>
>> I am a bit of a GIT newbie. With the -M switch what would be the
>> proceedure with a single file conversion such as with test.c and
>> test.cpp ?
>>
>> Would the following do the trick ?
>>
>>    git add test.c
>>    git commit
>>
>>    rename test.c test.cpp *
>>    vi test.cpp
>>
>>    git rm test.c
>>    git add test.cpp
>>    git commit -M
>>
>> Many thanks in advance,
>
> There is no such thing as "git commit -M".  git does not keep track of
> renames.  It generates the rename info on the fly when you ask it for
> patches, log stats, blame annotations or similar.

Could you elaborate maybe with a rough example for generating patches.

Aaron

  reply	other threads:[~2007-08-19 19:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-19 17:58 renaming question Aaron Gray
2007-08-19 18:16 ` Florian Weimer
2007-08-19 18:32   ` Aaron Gray
2007-08-19 19:05     ` David Kastrup
2007-08-19 19:17       ` Aaron Gray [this message]
2007-08-19 19:49         ` David Kastrup
2007-08-19 20:37           ` Florian Weimer
2007-08-20  0:45             ` Steven Grimm
2007-08-20  1:30               ` Aaron Gray
2007-08-20  1:56               ` Shawn O. Pearce
2007-08-20  2:11     ` VMiklos
2007-08-20  2:40       ` Aaron Gray

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='03bd01c7e295$976a2970$0600a8c0@ze4427wm' \
    --to=angray@beeb.net \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).