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

Re: On-branch topic description support?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2022, 17:35 UTC
Message-ID
<xmqqk086id1k.fsf@gitster.g>
In-Reply-To
<20220721162620.f5ffcedkbvvdhhu7@meerkat.local>
Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:
Show 18 quoted lines
> On Thu, Jul 21, 2022 at 04:53:18PM +0200, Ævar Arnfjörð Bjarmason wrote:
>> I tried now with "git rebase --rebase-merges -i", and it supports it
>> properly, i.e. I could re-arrange it so that it's:
>> 
>>               A---C---B---M topic
>>              / \         /
>>         X---Y   ---------
>>              \
>>               master
>
> This is clever, but it has a hard restriction that nothing happens to A:
>
> - you can't move it so it's B---A---C---M
> - you can't squash A+B
>
> Unless all the tools are taught to properly modify the merge commit.
>
> Or am I not reading this right?
I think the drawing is about a two-commit topic that has B and C

Or the drawing is wrong and M's other parent should have been Y. IOW, "git merge-base M^1 M^2" is the bottom of the topic (and our ranges always exclude the bottom end, X..Y does not include X but does include Y). "git rev-list M^1...M^2" are the commits on the topic.

Then you can shuffle A--B--C in whatever way you like with "rebase -i" or "filter-branch", using "git merge-base M^1 M^2" as the base.

Previous: Konstantin RyabitsevNext: Ævar Arnfjörð Bjarmason
Message 14 of 25 in “On-branch topic description support?”
  1. Junio C HamanoJul 20, 2022
  2. Shaoxuan YuanJul 21, 2022
  3. Elijah NewrenJul 21, 2022
  4. Junio C HamanoJul 21, 2022
  5. Konstantin RyabitsevJul 21, 2022
  6. Philip OakleyJul 21, 2022
  7. Junio C HamanoJul 21, 2022
  8. Junio C HamanoJul 21, 2022
  9. rsbecker@nexbridge.comJul 21, 2022
  10. Konstantin RyabitsevJul 21, 2022
  11. rsbecker@nexbridge.comJul 21, 2022
  12. Ævar Arnfjörð BjarmasonJul 21, 2022
  13. Konstantin RyabitsevJul 21, 2022
  14. Junio C HamanoJul 21, 2022
  15. Ævar Arnfjörð BjarmasonJul 21, 2022
  16. Junio C HamanoJul 21, 2022
  17. Ævar Arnfjörð BjarmasonJul 21, 2022
  18. Junio C HamanoJul 21, 2022
  19. Konstantin RyabitsevJul 21, 2022
  20. Ævar Arnfjörð BjarmasonJul 21, 2022
  21. Konstantin RyabitsevJul 21, 2022
  22. Junio C HamanoJul 21, 2022
  23. Konstantin RyabitsevJul 21, 2022
  24. Junio C HamanoJul 21, 2022
  25. Bagas SanjayaJul 22, 2022

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.