mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Ryan Anderson <ryan@michonline.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Auto-localversion doesn't detect tags correctly
Date: Wed, 14 Sep 2005 06:46:23 +0200	[thread overview]
Message-ID: <20050914044623.GA8099@mars.ravnborg.org> (raw)
In-Reply-To: <20050913082020.GF5276@mythryan2.michonline.com>

Hi Ryan.

> +++ linux-git/scripts/setlocalversion	2005-09-13 04:17:28.000000000 -0400
> @@ -36,13 +36,38 @@ sub do_git_checks {
>  	chomp $head;
>  	close(H);
>  
> -	opendir(D,".git/refs/tags") or return;
> +	unless (opendir(D,".git/refs/tags")) {
> +		warn "Failed to open .git/refs/tags : " . $!;
> +		return;
> +	}
>  	foreach my $tagfile (grep !/^\.{1,2}$/, readdir(D)) {
> -		open(F,"<.git/refs/tags/" . $tagfile) or return;
> +		unless (open(F,"<",".git/refs/tags/" . $tagfile)) {
> +			warn "Failed to open .git/refs/tags/$tagfile : " . $!;
> +			return;
> +		}
Can the two operations be done somehow using git commands?
With the above you assume all users have default setup with git files in
.git, but one may decide for:
GIT/.git
kernel/<kernelsrc-tree>

and then use:
export GIT_DIR=../GIT/.git

You need to do some sanitycheck if git is installed first.
`which git-rev-list` or similar.

	Sam

  reply	other threads:[~2005-09-14  4:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13  8:20 Ryan Anderson
2005-09-14  4:46 ` Sam Ravnborg [this message]
2005-09-26  6:43   ` [PATCH] Auto-localversion should use git commands and behaviors Ryan Anderson

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=20050914044623.GA8099@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ryan@michonline.com \
    /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

all inboxes | Powered by JetHome®