git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Use git-tag in git-cvsimport

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2007, 08:37 UTC
Message-ID
<7v1wgto2mh.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11808537962798-git-send-email-el@prans.net>
Elvis Pranskevichus <el@prans.net> writes:
Show 11 quoted lines
> Currently git-cvsimport tries to create tag objects directly via git-mktag
> in a very broken way, e.g the stuff it writes into the tagger field of
> the tag object doesn't really resemble the GIT_COMMITTER_IDENT. This makes
> gitweb and possibly other tools that try to interpret tag objects to be
> confused about tag date and authorship.
>
> Fix this by calling git-tag instead. This also has a nice side effect of
> not creating the tag object but only the lightweight tag as that's the only
> thing CVS has anyways.
>
> Signed-off-by: Elvis Pranskevichus <el@prans.net>

This sounds very sane, although I have not thought through the possible ramifications.

Show 21 quoted lines
>  git-cvsimport.perl |   26 ++------------------------
>  1 files changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/git-cvsimport.perl b/git-cvsimport.perl
> index f68afe7..d5ca66b 100755
> --- a/git-cvsimport.perl
> +++ b/git-cvsimport.perl
> @@ -771,31 +771,9 @@ sub commit {
>  		$xtag =~ s/\s+\*\*.*$//; # Remove stuff like ** INVALID ** and ** FUNKY **
>  		$xtag =~ tr/_/\./ if ( $opt_u );
>  		$xtag =~ s/[\/]/$opt_s/g;
> - ...
> +
> +		system("git-tag $xtag $cid") == 0
>  			or die "Cannot create tag $xtag: $!\n";
> - ...
>  
>  		print "Created tag '$xtag' on '$branch'\n" if $opt_v;
>  	}
> -- 
> 1.5.2

Other than that I would write the "system" in a slightly newer style, i.e.

	system('git-tag', $xtag, $cid)

I do not think of any obvious downside, either in the code nor the change to use unannotated tag.

Anybody on the list see downsides with this?
Previous: Elvis PranskevichusNext: Elvis Pranskevichus
Message 2 of 7 in “Use git-tag in git-cvsimport”
  1. Use git-tag in git-cvsimportElvis Pranskevichus, Jun 3, 2007
  2. Junio C HamanoJun 3, 2007
  3. Elvis PranskevichusJun 4, 2007
  4. Martin WaitzJun 3, 2007
  5. Junio C HamanoJun 4, 2007
  6. Martin WaitzJun 4, 2007
  7. Junio C HamanoJun 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.