Re: git and time

From: Jan Harkes <jaharkes@cs.cmu.edu>
Date: 2006-09-30 03:37:36
On Tue, Sep 26, 2006 at 10:41:33PM -0400, Sean wrote:
> It is interesting information for some people though.  For instance
> someone wondering how long ago Linus published a certain security fix.
> To be able to say to easily query gitweb and be able to report,
> "Linus published that security fix X day ago etc.."

I don't see the point in knowing how many days ago the security fix was
published, since I'd really care if my machine is running a kernel that
contains the fix.

So I can see how I might want to know which branches (and/or tags) in my
repository contain the security fix. And this is pretty easy,

#!/bin/sh
fix="$(git-rev-parse --verify $1)"
git ls-remote . | while read sha ref ; do
    [ "$fix" == "$(git-merge-base "$fix" "$sha")" ] && echo $ref
done

Of course this could be cleaned up and extended quite a bit, possibly
allowing a user to specify if he cares about only branches, or tags or
some specific branch.

Jan

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Sep 30 03:38:15 2006

This archive was generated by hypermail 2.1.8 : 2006-09-30 03:38:59 EST