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

Re: Feature request: provide a persistent IDs on a commit

From
Michal Suchánek <msuchanek@suse.de>
Date
Jul 23, 2022, 07:00 UTC
Message-ID
<20220723070055.GE17705@kitsune.suse.cz>
In-Reply-To
<CA+P7+xr+k35RXoGv-O96fsfOJ+sg65HrVvt-3JKYAzerA0TJRw@mail.gmail.com>
On Fri, Jul 22, 2022 at 03:46:22PM -0700, Jacob Keller wrote:
Show 57 quoted lines
> On Fri, Jul 22, 2022 at 1:42 PM Michal Suchánek <msuchanek@suse.de> wrote:
> >
> > On Fri, Jul 22, 2022 at 09:08:56PM +0100, Philip Oakley wrote:
> > > On 21/07/2022 19:58, Hilco Wijbenga wrote:
> > > > On Thu, Jul 21, 2022 at 9:39 AM Phillip Susi <phill@thesusis.net> wrote:
> > > >> Ęvar Arnfjörš Bjarmason <avarab@gmail.com> writes:
> > > >>
> > > >>> This has come up a bunch of times. I think that the thing git itself
> > > >>> should be doing is to lean into the same notion that we use for tracking
> > > >>> renames. I.e. we don't, we analyze history after-the-fact and spot the
> > > >>> renames for you.
> > > >> I've never been a big fan of that quality of git because it is
> > > >> inherently unreliable.
> > > > Indeed, which would be fine ... if there were a way to tell Git, "no
> > > > this is not a rename" or "hey, you missed this rename" but there
> > > > isn't.
> > > >
> > > > Reading previous messages, it seems like the
> > > > after-the-fact-rename-heuristic makes the Git code simpler. That is a
> > > > perfectly valid argument for not supporting "explicit" renames but I
> > > > have seen several messages from which I inferred that rename handling
> > > > was deemed a "solved problem". And _that_, at least in my experience,
> > > > is definitely not the case.
> > >
> > > Part of the rename problem is that there can be many different routes to
> > > the same result, and often the route used isn't the one 'specified' by
> > > those who wish a complicated rename process to have happened 'their
> > > way', plus people forget to record what they actually did. Attempting to
> > > capture what happened still results major gaps in the record.
> >
> > Doesn't git have rebase?
> >
> > It is not required that the rename is captured perfectly every time so
> > long as it can be amended later.
> >
> > Thanks
> >
> > Michal
> 
> Rebase is typically reserved only to modify commits which are not yet
> "permanent". Once a commit starts being referenced by many others it
> becomes more and more difficult to rebase it. Any rebase effectively
> creates a new commit.
> 
> There are multiple threads discussing renames and handling them in git
> in the past which are worth re-reading, including at least
> 
> https://public-inbox.org/git/Pine.LNX.4.58.0504141102430.7211@ppc970.osdl.org/
> 
> A fuller analysis here too:
> https://public-inbox.org/git/Pine.LNX.4.64.0510221251330.10477@g5.osdl.org/
> 
> As mentioned above in this thread, depending on what context you are
> using, a change to a commit could be many to many: i.e. a commit which
> splits into 2, or 3 commits merging into one, or 3 commits splitting
> apart and then becoming 2 commits. When that happens, what "change id"
> do you use for each commit?

Same as commit message and any trailers you might have - they are preserved, concatenated, and can be regenerated.

Thanks
Michal
Previous: Jacob KellerNext: Elijah Newren
Message 22 of 30 in “Feature request: provide a persistent IDs on a commit”
  1. Stephen FinucaneJul 18, 2022
  2. Konstantin RyabitsevJul 18, 2022
  3. Michal SuchánekJul 18, 2022
  4. Stephen FinucaneJul 19, 2022
  5. Glen ChooJul 18, 2022
  6. Konstantin RyabitsevJul 20, 2022
  7. Michal SuchánekJul 20, 2022
  8. Theodore Ts'oJul 20, 2022
  9. Han-Wen NienhuysJul 21, 2022
  10. Elijah NewrenJul 24, 2022
  11. Ævar Arnfjörð BjarmasonJul 18, 2022
  12. Stephen FinucaneJul 19, 2022
  13. Ævar Arnfjörð BjarmasonJul 19, 2022
  14. Michal SuchánekJul 19, 2022
  15. Stephen FinucaneJul 29, 2022
  16. Jason PyeronJul 29, 2022
  17. Phillip SusiJul 21, 2022
  18. Hilco WijbengaJul 21, 2022
  19. Philip OakleyJul 22, 2022
  20. Michal SuchánekJul 22, 2022
  21. Jacob KellerJul 22, 2022
  22. Michal SuchánekJul 23, 2022
  23. Elijah NewrenJul 24, 2022
  24. Michal SuchánekJul 24, 2022
  25. Jacob KellerJul 25, 2022
  26. Elijah NewrenJul 26, 2022
  27. Michal SuchánekJul 26, 2022
  28. Elijah NewrenJul 24, 2022
  29. Michal SuchánekJul 24, 2022
  30. Martin von ZweigbergkDec 15, 2024

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.