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

Re: [RFC/PATCH 2/1] fixup! Documentation: start to explain what git replace is for

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 14, 2011, 19:30 UTC
Message-ID
<20110114193023.GA14294@burratino>
In-Reply-To
<4D308B69.1050003@seznam.cz>
Maaartin wrote:
> On 11-01-14 09:49, Jonathan Nieder wrote:
>> [side note: please do not prune the cc list; I only stumbled on this
>> message in the online archive by luck]
>
> What could I have done about it?
See [1].
> Maybe just something like "Let's assume there's only one and let's call
> it FIRST". For the example, this is enough.

True enough. Even better would be to give a reference to the "coolest merge ever" (is that documented anywhere?) so the interested reader can discover how there could be more than one.

> I'd go the other way round and use "-i" so I'd need only one file.

"sed -i" is not portable (not sure how important that is for documentation). But perl -i is. :)

> $ first_commit = $($ echo $first_commit |
> perl -p
> "s/^tree .*/$&\nparent $(git rev-parse v2.4)/")      <4>
So:
	perl -pi -e "s/^tree .*$/\$&\nparent $(git rev-parse v2.4)/" new

Unfortunately "echo" and process substitution destroy some formatting in the commit message --- in particular, trailing whitespace.

Thanks for the suggestions. Please feel free to pick up the patch and run with it (I trust you for this more than I would trust myself).

Regards, Jonathan

[1] My current method: [2]  Yes, I agree that this is cumbersome.

I'm also told that Thunderbird when used as a newsreader can reply-to-all easily, though I haven't tried it.

[2] http://thread.gmane.org/gmane.comp.version-control.git/154490
Previous: Maaartin-1Next: Jonathan Nieder
Message 15 of 18 in “Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?”
  1. Алексей ШумкинJan 11, 2011
  2. Martin KrügerJan 11, 2011
  3. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  4. Andreas EricssonJan 11, 2011
  5. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  6. Martin KrügerJan 11, 2011
  7. Jakub NarebskiJan 11, 2011
  8. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  9. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  10. Documentation: start to explain what git replace is forJonathan Nieder, Jan 12, 2011
  11. MaaartinJan 12, 2011
  12. Alexey ShumkinJan 13, 2011
  13. 2/1 fixup! Documentation: start to explain what git replace is forJonathan Nieder, Jan 14, 2011
  14. Maaartin-1Jan 14, 2011
  15. Jonathan NiederJan 14, 2011
  16. how multiple roots happen (Re: [RFC/PATCH 2/1] fixup! Documentation: start to explain what git replace is for)Jonathan Nieder, Jan 14, 2011
  17. Jakub NarebskiJan 14, 2011
  18. Maaartin-1Jan 15, 2011

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.