public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] Use git in scripts/setlocalversion
Date: Wed, 04 Jan 2006 17:43:18 -0500	[thread overview]
Message-ID: <43BC4F86.1050401@michonline.com> (raw)
In-Reply-To: <20060104194203.GA2359@lsrfire.ath.cx>

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

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 <ryan@michonline.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-01-04 22:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04 19:42 [PATCH] Use git in scripts/setlocalversion Rene Scharfe
2006-01-04 22:43 ` Ryan Anderson [this message]
2006-01-06 19:47 ` Sam Ravnborg
2006-01-08  9:35   ` [PATCH] setlocalversion: Change -git_dirty to just -dirty Ryan Anderson
2006-01-08 17:45     ` Sam Ravnborg
2006-01-09  3:47 ` [PATCH] Use git in scripts/setlocalversion Coywolf Qi Hunt
2006-01-09  5:58   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43BC4F86.1050401@michonline.com \
    --to=ryan@michonline.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.scharfe@lsrfire.ath.cx \
    --cc=sam@ravnborg.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox