Feature request: "author branch" in commit object

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Feature request: "author branch" in commit object

From: Ed Hutchins <hidden>
Date: 2016-06-15 22:57:58

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?

  - Ed

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

From: Fredrik Gustafsson <hidden>
Date: 2016-06-15 22:57:58

On Tue, Jul 02, 2013 at 12:37:13PM -0700, Ed Hutchins wrote:
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?
Let's see if I understand you. You want to (for each commit) to be able
to tell the branch-name the commit had at the creation time?

Not all commits have branches (however, loose commits is usually not
wanted). Many commits are part of many branches.

A branch is not a collection of commits but a pointer to a commit (which
has parents).

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com

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

From: Johan Herland <hidden>
Date: 2016-06-15 22:57:58

On Tue, Jul 2, 2013 at 9:37 PM, Ed Hutchins [off-list ref] wrote:
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, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help