git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: renaming question

From
David Kastrup <dak@gnu.org>
Date
Aug 19, 2007, 19:49 UTC
Message-ID
<85odh3qp8j.fsf@lola.goethe.zz>
In-Reply-To
<03bd01c7e295$976a2970$0600a8c0@ze4427wm>
"Aaron Gray" <angray@beeb.net> writes:
Show 22 quoted lines
>> "Aaron Gray" <angray@beeb.net> writes:
>>>
>>> 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.
Uh, is that a trick question?
git-format-patch -M
-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: Aaron GrayNext: Florian Weimer
Message 6 of 12 in “renaming question”
  1. Aaron GrayAug 19, 2007
  2. Florian WeimerAug 19, 2007
  3. Aaron GrayAug 19, 2007
  4. David KastrupAug 19, 2007
  5. Aaron GrayAug 19, 2007
  6. David KastrupAug 19, 2007
  7. Florian WeimerAug 19, 2007
  8. Steven GrimmAug 20, 2007
  9. Aaron GrayAug 20, 2007
  10. Shawn O. PearceAug 20, 2007
  11. VMiklosAug 20, 2007
  12. Aaron GrayAug 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.