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

characterizing commits

From
William Pursell <bill.pursell@gmail.com>
Date
Dec 13, 2008, 08:28 UTC
Message-ID
<4943721C.7070200@gmail.com>

I have a desire to add metadata to commits to characterize their importance/type. (Or I'd like another recommended method to achieve the following behavior).

A lot of commits in any given project can be grouped into different types. eg, looking at the history for git, there are a lot of merge commits, a lot of commits that only touch gitk, a lot of 'auto-generated manpages', a lot of 'typo in documentation' etc. In my own projects, I have a fairly high percentage of commits that are trivial (eg whitespace only, typos, etc). What I'm after is the ability to do something like:

git log --group=!trivial git log --group=importance:3+

and only get the log for those commits that have been not been classified "trivial" or that have a precedence of 3 or greater.

For example, I'd like the following work flow:

$ git log --pretty=oneline e62bb07a6894d282cdc0fdba6c67ae2ecd086cbb 5 b0986c6e8415c45e123e1838fbe8bf9e8518a90d 4 89916e36bae3208a76c338e91508759787563042 3 3942ef4e118dde3d844da5d84f466ac9666fae62 2 6fa2e40ed491d1dcbbfac9f2d301b517413bec3b 1 04dcd38a8cb6496e37594a273ca39542912ca1eb important 9bd23c2d08e254058a1a9709f963737dc9a71d16 trivial change $ git group 6fa2e trivial $ git group 9bd23 trivial $ git log --pretty=oneline --group=!trivial e62bb07a6894d282cdc0fdba6c67ae2ecd086cbb 5 b0986c6e8415c45e123e1838fbe8bf9e8518a90d 4 89916e36bae3208a76c338e91508759787563042 3 3942ef4e118dde3d844da5d84f466ac9666fae62 2 04dcd38a8cb6496e37594a273ca39542912ca1eb important

Is there already a mechanism for filtering commits that I could extend to accomplish this?

-- 
William Pursell
Next: Jeff King
Message 1 of 2 in “characterizing commits”
  1. William PursellDec 13, 2008
  2. Jeff KingDec 13, 2008

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.