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

Re: Bring together merge and rebase

From
MFMartin Fick <mfick@codeaurora.org>
Date
Jan 4, 2018, 19:49 UTC
Message-ID
<2363617.2KWG4LOxlS@mfick-lnx>
In-Reply-To
<alpine.DEB.2.21.1.1712232353390.406@MININT-6BKU6QN.europe.corp.microsoft.com>

On Sunday, December 24, 2017 12:01:38 AM Johannes Schindelin wrote:

Show 28 quoted lines
> Hi Carl,
> 
> On Sat, 23 Dec 2017, Carl Baldwin wrote:
> > I imagine that a "git commit --amend" would also insert
> > a "replaces" reference to the original commit but I
> > failed to mention that in my original post.
> 
> And cherry-pick, too, of course.
> 
> Both of these examples hint at a rather huge urge of some
> users to turn this feature off because the referenced
> commits may very well be throw-away commits in their
> case, making the newly-recorded information completely
> undesired.
> 
> Example: I am working on a topic branch. In the middle, I
> see a typo. I commit a fix, continue to work on the topic
> branch. Later, I cherry-pick that commit to a separate
> topic branch because I really don't think that those two
> topics are related. Now I definitely do not want a
> reference of the cherry-picked commit to the original
> one: the latter will never be pushed to a public
> repository, and gc'ed in a few weeks.
> 
> Of course, that is only my wish, other users in similar
> situations may want that information. Demonstrating that
> you would be better served with an opt-in feature that
> uses notes rather than a baked-in commit header.

I think what you are highlighting is not when to track this, but rather when to share this tracking. In my local repo, I would definitely want to know that I cherry-picked this from elsewhere, it helps me understand what I have done later when I look back at old commits and branches that need to potentially be thrown away. But I agree you may not want to share these publicly.

I am not sure what the right formula is, for when to share these pointers publicly, but it seems like it might be that whenever you push something, it should push along any references to amended commits that were publicly available already. I am not sure how to track that, but I suspect it is a subset of the union of commits you have fetched, and commits you have pushed (i.e. you got it from elsewhere, or you created it and already shared it with others)? Maybe it should also include any commits reachable by advertisements to places you are pushing to (in case it got shared some other way)?

-Martin
-- 
The Qualcomm Innovation Center, Inc. is a member of Code 
Aurora Forum, hosted by The Linux Foundation
Previous: Randall S. BeckerNext: Johannes Schindelin
Message 19 of 44 in “Bring together merge and rebase”
  1. Carl BaldwinDec 23, 2017
  2. Ævar Arnfjörð BjarmasonDec 23, 2017
  3. Carl BaldwinDec 23, 2017
  4. Ævar Arnfjörð BjarmasonDec 23, 2017
  5. Carl BaldwinDec 26, 2017
  6. Jacob KellerDec 26, 2017
  7. Igor DjordjevicDec 26, 2017
  8. Ævar Arnfjörð BjarmasonDec 26, 2017
  9. Carl BaldwinDec 26, 2017
  10. Paul SmithDec 26, 2017
  11. Carl BaldwinDec 26, 2017
  12. Randall S. BeckerDec 23, 2017
  13. Carl BaldwinDec 25, 2017
  14. Johannes SchindelinDec 23, 2017
  15. Alexei LozovskyDec 24, 2017
  16. Johannes SchindelinJan 4, 2018
  17. Carl BaldwinDec 25, 2017
  18. Randall S. BeckerDec 26, 2017
  19. Martin FickJan 4, 2018
  20. Johannes SchindelinDec 23, 2017
  21. Theodore Ts'oDec 25, 2017
  22. Carl BaldwinDec 26, 2017
  23. Jacob KellerDec 26, 2017
  24. Carl BaldwinDec 26, 2017
  25. Jacob KellerDec 26, 2017
  26. Martin FickJan 4, 2018
  27. Martin FickJan 5, 2018
  28. Carl BaldwinJan 5, 2018
  29. Carl BaldwinJan 5, 2018
  30. Theodore Ts'oDec 26, 2017
  31. Carl BaldwinDec 26, 2017
  32. Martin FickJan 4, 2018
  33. Carl BaldwinJan 5, 2018
  34. Martin FickJan 4, 2018
  35. Carl BaldwinJan 5, 2018
  36. Junio C HamanoJan 5, 2018
  37. Carl BaldwinJan 6, 2018
  38. Carl BaldwinJan 6, 2018
  39. Theodore Ts'oJan 6, 2018
  40. Carl BaldwinDec 27, 2017
  41. Alexei LozovskyDec 27, 2017
  42. Carl BaldwinDec 28, 2017
  43. Mike HommeyDec 26, 2017
  44. Carl BaldwinDec 27, 2017

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.