Re: git and time

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

 



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@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]