Rene Scharfe wrote: > Currently scripts/setlocalversion is a Perl script that tries to figure > out the current git commit ID of a repo without using git. It also > imports Digest::MD5 without using it and generally is too big for the > small task it does. :] And it always reports a git ID, even when the > HEAD is tagged -- this is a bug. Yes. I'm pretty sure I sent Sam a patch for that at one point ages ago, but I've been distracted and haven't updated it recently. I think using git-name-rev --tags as this change does is a lot simpler than what I was trying to do. So, Sam, if you'd prefer this version, feel free, or let me know and I'll resend the one or two patches I have hanging around to you. > This patch replaces it with a Bourne Shell script that uses git > commands to do the same. I can't come up with a scenario where someone > would use a git repo and refuse to install git core at the same time, > so I think it's reasonable to assume git is available. > > The new script also reports uncommitted changes by adding -git_dirty to > the version string. Obviously you can't see from that _what_ has been > changed from the last commit, so it's more of a reminder that you > forgot to commit something. And this is a decent feature, too. I like it. The only reservation I have about converting from Perl to Bourne shell is that if adding support for, say, Mercurial (or maybe CVS, etc) wants to mangle it somehow, via say MD5, that becomes a little bit more difficult to do, or at worst, introduces an additional dependency on something like md5sum. So, I like it: Signed-off-by: Ryan Anderson <[email protected]>
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- [PATCH] Use git in scripts/setlocalversion
- From: Rene Scharfe <[email protected]>
- [PATCH] Use git in scripts/setlocalversion
- Prev by Date: Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers
- Next by Date: Re: [PATCH 09/15] wistron_btns: Add Acer TravelMate 240 key mappings.
- Previous by thread: [PATCH] Use git in scripts/setlocalversion
- Next by thread: Re: [PATCH] Use git in scripts/setlocalversion
- Index(es):