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

Re: [Feature request] Give non-unique names to commits for grouping

From
CPChristos Pappas <chrispappas99@gmail.com>
Date
Mar 11, 2020, 20:47 UTC
Message-ID
<CAGa6KtTRv1UZcVAWbwUR56wjeK2YE1NqyLe-yT3MrGC8sUYCvw@mail.gmail.com>
In-Reply-To
<12099923.Cjvj2aPIT9@mfick-lnx>
Show 16 quoted lines
> By "different", do you mean the mechanism, or the content of the "hashtag"
> itself? I would imagine that you would expect the hashtags to be different,
> and that you are concerned that they might be stored differently on each
> site, maybe on one site as a note like
>
>  hashtag: awesome
>
> and on another:
>
>  label: awesome
>
> Is that correct?
>
> If so, then it seems like a reasonable suggestion that some tooling be built
> to potentially enforce something like that using git notes and/or commit
> messages?
Yes, I think that every project would end up having a different convention.
> Right, maybe git notes is just the storage mechanism for such a feature?

Maybe some code could be shared behind the scenes(I don't know the code architecture), but the interface should be different.

I would expect a commit log to look like this:
commit {commit_hash} (HEAD -> master, tag: maybe_a_tag_here, labels:
bug_fix front_end, origin/master, origin/HEAD)
Author: ...
Date: ...
Commit Message

This also requires at least one command to create a label (git label create {name}), and a different command to assign one of the available labels (git label assign {label} {commit}), to avoid mistakes (The levenshtein algorithm could also be used when the user makes a typo and tries to assign a label that doesn't exist)

Στις Τετ, 11 Μαρ 2020 στις 9:31 μ.μ., ο/η Martin Fick <mfick@codeaurora.org> έγραψε:

Show 43 quoted lines
>
> On Wednesday, March 11, 2020 8:56:44 PM MDT Christos Pappas wrote:
> > Thank you for your answers.
>
> FYI: the list preference is inline instead of top-posting.
>
> > From what I can deduce, both of your suggestions require that the
> > commit messages(or notes) must have some special text for which we can
> > search for, which is hacky and would be different on every repository.
>
> By "different", do you mean the mechanism, or the content of the "hashtag"
> itself? I would imagine that you would expect the hashtags to be different,
> and that you are concerned that they might be stored differently on each
> site, maybe on one site as a note like
>
>  hashtag: awesome
>
> and on another:
>
>  label: awesome
>
> Is that correct?
>
> If so, then it seems like a reasonable suggestion that some tooling be built
> to potentially enforce something like that using git notes and/or commit
> messages?
>
> > What I am suggesting is something like, labels on GitHub, hashtags on
> > Social-Media, or Tags in News sites. It's a well known concept so it
> > will be easy to understand and use.
> >
> > We could initially create the concept of marks/labels/{another name}
> > ('tags' is already in use by another git command) and then
> > incrementally enhance the git commands to use this functionality (like
> > the example I gave above, with git blame).
>
> Right, maybe git notes is just the storage mechanism for such a feature?
>
> -Martin
>
> --
> The Qualcomm Innovation Center, Inc. is a member of Code
> Aurora Forum, hosted by The Linux Foundation
Previous: Martin FickNext: Junio C Hamano
Message 6 of 7 in “[Feature request] Give non-unique names to commits for grouping”
  1. Christos PappasMar 10, 2020
  2. Konstantin TokarevMar 10, 2020
  3. Martin FickMar 11, 2020
  4. Christos PappasMar 11, 2020
  5. Martin FickMar 11, 2020
  6. Christos PappasMar 11, 2020
  7. Junio C HamanoMar 11, 2020

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.