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

Re: Feature request: add a metadata in the commit: the "commited in branch" information

From
ABArnaud Bertrand <xda@abalgo.com>
Date
Dec 29, 2019, 23:53 UTC
Message-ID
<CAEW0o+g7vXj841h+4nNK8iSoO758Uh9fLKMCN87RE2w2Nd=CRg@mail.gmail.com>
In-Reply-To
<xmqqd0c6iuw0.fsf@gitster-ct.c.googlers.com>
Hi Junio,

It really depends how git is used. With big collaborative project (like git or linux kernel), you are totally right. for development limited to a company that has developments with team of 10-20 developers and that uses a correct SCM plan, the name of the branch is regulated and is meaningful, mostly linked to a bug tracking system system. For audits and traceability, the branch name is really important... certainly more than the email of the developer ;-) So the "contamination" is negligible compare to the bentefit in this context. It will also helps the graphical tools to have a comprehensive representation which can do git even better.

If you think it is a bad idea to have it by default, what about an option to activate this functionality ? Today with the patch I've done, it is not a problem if there is no branchname in the commit. The only thing is the "%Xb" placeholder.

I would like to have your advice about the name because I have added the "branch" metadata but, even it is really the name of the branch, I think it too "hard". I preferred "BranchOfCommit" or something similar that is more explicit... I think this one is too heavy. Do you have other suggestions ?

Thanks for your feedback .

Le lun. 30 déc. 2019 à 00:20, Junio C Hamano <gitster@pobox.com> a écrit :
Show 14 quoted lines
>
> Arnaud Bertrand <xda@abalgo.com> writes:
>
> > I understood that in git philosophy, once it is merged, a branch can
> > disappear. But for a lot of companies, a SCM is also a guardian of the
> > history.
>
> A lot more important point than "once it is merged" is that the
> branch identity is strictly local to your repository.  Contaminating
> the object header, which is cast in stone and cannot be modified
> after the fact, with such a piece of information will not mix well
> with the rest of Git, so ...
>
>
Previous: Junio C HamanoNext: Theodore Y. Ts'o
Message 3 of 6 in “Feature request: add a metadata in the commit: the "commited in branch" information”
  1. Arnaud BertrandDec 23, 2019
  2. Junio C HamanoDec 29, 2019
  3. Arnaud BertrandDec 29, 2019
  4. Theodore Y. Ts'oDec 30, 2019
  5. Arnaud BertrandDec 30, 2019
  6. Paul SmithDec 30, 2019

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.