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

Re: Feature request: "author branch" in commit object

From
Johan Herland <johan@herland.net>
Date
Jul 2, 2013, 20:31 UTC
Message-ID
<CALKQrgf_Gv=+zUwcdDUPENj59kx1CbEwELnYZjArBZ1S8ueVcg@mail.gmail.com>
In-Reply-To
<CADL+T9YGtvFrzStxJW64OJEV6H0BroMbkVCJdsDwWDaUWd91zQ@mail.gmail.com>
On Tue, Jul 2, 2013 at 9:37 PM, Ed Hutchins <eh@demeterr.com> wrote:
Show 6 quoted lines
> I realize that branch names are ephemeral repo-specific things, but it
> would be really useful to be able to determine what branch a commit
> was authored from (as a hint to ancestry graph layout tools, for
> example). Is there any way to do this currently, is it planned, or
> would it be deemed useful enough to be worth adding to each commit
> object?
As Junio stated elsewhere in the thread: No.

However, you could do this with "git notes", which allows you to attach information to a commit object without changing the commit object itself. Of course, for this to work, you would have to write a post-commit hook to record the branch information in a commit note, and then convince all contributors in your project to install the same hook. Then you'd need to teach the relevant graph layout tools to pay attention to your notes.

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Andrew ArdillNext: Matthieu Moy
Message 9 of 17 in “Feature request: "author branch" in commit object”
  1. Ed HutchinsJul 2, 2013
  2. Fredrik GustafssonJul 2, 2013
  3. Junio C HamanoJul 2, 2013
  4. Ed HutchinsJul 2, 2013
  5. Antoine PelisseJul 3, 2013
  6. Ed HutchinsJul 3, 2013
  7. Junio C HamanoJul 3, 2013
  8. Andrew ArdillJul 4, 2013
  9. Johan HerlandJul 2, 2013
  10. Matthieu MoyJul 3, 2013
  11. Ed HutchinsJul 3, 2013
  12. Junio C HamanoJul 3, 2013
  13. Jakub NarebskiJul 3, 2013
  14. DanyJul 3, 2013
  15. DanyJul 3, 2013
  16. Matthieu MoyJul 4, 2013
  17. Philip OakleyJul 9, 2013

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.