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

RE: Tracking changes in git with a change number....

From
RKRice, James M CIV NSWCDD, K73 <james.rice2@navy.mil>
Date
Jul 12, 2011, 21:28 UTC
Message-ID
<C785F567A08DDE449FD4590C91E6AD13D2046E@naeamillez01v.nadsusea.nads.navy.mil>
In-Reply-To
<2077407.34684.1310475245616.JavaMail.root@mail.hq.genarts.com>
Show 40 quoted lines
> -----Original Message-----
> From: Stephen Bash [mailto:bash@genarts.com]
> Sent: Tuesday, July 12, 2011 8:54
> To: Jeff King
> Cc: git@vger.kernel.org; Rice, James M CIV NSWCDD, K73
> Subject: Re: Tracking changes in git with a change number....
> 
> ----- Original Message -----
> > From: "Jeff King" <peff@peff.net>
> > Sent: Tuesday, July 12, 2011 1:50:08 AM
> > Subject: Re: Tracking changes in git with a change number....
> >
> > > Restating the problem. I wish for our developers to be able to
> > > reference multiple commits with one number, and then find those
> > > commits via that number. And I don't mind scripting to accomplish
> > > this. I know, that CR # can be put in the commit message, then I
> can
> > > grep and parse the log, that is the hard way.
> >
> > There are two ways to approach this: tell the CM tool about some git
> > commits, or tell some git commits about the CR number.
> >
> > ... snip ...
> >
> > If you want to do the reverse and tell git about CR numbers, then I
> > don't think you have much option besides putting them in the commit
> > message. Which means you'll need to grep to get them out. You can do
> > something like:
> >
> > $ git log --grep='CR#' --pretty=format: --name-only
> 
> To add to what Jeff said, in our office we automate the 'grep' step
> using a git post-receive hook in our central/canonical repo.  We happen
> to be using Trac for issue tracking, so the post-receive hook
> enumerates the new commit ids, calls Trac to parse the commit messages,
> and Trac then updates the appropriate tickets.  But I've seen the same
> done with many different issue trackers.
> 
> Thanks,
> Stephen
Unfortunately our issue tracker is used by multiple organizations, is in windows and would be a pain to integrate in that manner, if it can be done at all.
That being said, Jeff's answer was what I was looking for!  Thanks to all of you for your help!

Thanks, James.

Previous: Stephen Bash
Message 5 of 5 in “Tracking changes in git with a change number....”
  1. Rice, James M CIV NSWCDD, K73Jul 11, 2011
  2. Damien WyartJul 12, 2011
  3. Jeff KingJul 12, 2011
  4. Stephen BashJul 12, 2011
  5. Rice, James M CIV NSWCDD, K73Jul 12, 2011

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.