lkml.org 
[lkml]   [2005]   [Sep]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 14 Sep 2005 06:46:23 +0200
FromSam Ravnborg <>
SubjectRe: [PATCH] Auto-localversion doesn't detect tags correctly
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-14 04:46    [from the cache]
©2003-2008