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

Re: What's the meaning of `parenthood' in git commits?

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 8, 2006, 00:52 UTC
Message-ID
<eir9nq$cm8$1@sea.gmane.org>
In-Reply-To
<878ximbwm3.fsf@hades.wkstn.nix>
Nix wrote:
Show 6 quoted lines
> After all that setup, my question's simple. Does a `parent' in git
> terminology simply mean `this commit was derived in some way from the
> commit listed here'? If so, I suppose I can list heads/some-change-foo
> as one parent on these merge commits, even though the `merging'
> mechanism is so odd that I expect to be pelted with rotten vegetables as
> soon as I post this.

Yes, being parent means that this commit was derived in some way from the commit listed here. It needs not to be this commit is the result of merge of commits listed here... there was a discussion some time ago to use one of parents (first for example) instead of special header for "prev" link to previous value of the ref (which discussion was obsoleted by reflog).

It provies two things you have to think about if to use 'parenthood' for something a bit unexpected. First, parents are connectivity, so even if you delete trunks/some-name and then prune, averything that was merged in some branch or tag which lives still wouldn't get pruned. Second, the information about merges is used in merge strategies: consider if having this information would help your strange merge strategy.

And of course there is a question if the graph as visualized by for example gitk would have more sense or not with the "strange merges" marked as merges.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: NixNext: Linus Torvalds
Message 2 of 7 in “What's the meaning of `parenthood' in git commits?”
  1. NixNov 8, 2006
  2. Jakub NarebskiNov 8, 2006
  3. Linus TorvaldsNov 8, 2006
  4. NixNov 8, 2006
  5. NixNov 8, 2006
  6. Junio C HamanoNov 8, 2006
  7. NixNov 8, 2006

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.