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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
> From: "Jeff King" <peff@xxxxxxxx>
> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]