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

[PATCH] (parsecvs) avoid "git mktag" failure with newer git

From
Jim Meyering <jim@meyering.net>
Date
Apr 9, 2008, 10:01 UTC
Message-ID
<871w5fz6rl.fsf@rho.meyering.net>
With recent git, parsecvs now always fails like this:
  ...
  Save:                              master *....................     1 of   269
  Save:                              master *....................     2 of   269
  error: char77: malformed tagger field
  fatal: invalid tag signature file
  git-mktag < '.git-cvs/tag-0': No such file or directory

This is due to the change that makes git's mktag perform stricter input validation. parsecvs patch below.

[BTW, Keith, or anyone with write access to the parsecvs repo,
 I have a few other patches, but a few I sent have gone un-applied
 and with no response for months, I'm hoping there's a maintained
 repository somewhere else.
 I've been using this: git://people.freedesktop.org/~keithp/parsecvs
 Today's failure nearly pushed me to cvs2git (aka cvs2svn
 http://cvs2svn.tigris.org/cvs2git.html), which I hear is good,
 although still pretty new.  Since this fix was easy, I'm sticking
 with parsecvs for now. ]
>From 9c6ca141e82fae93ff173b87a27c118c5e87547c Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 9 Apr 2008 11:53:29 +0200
Subject: [PATCH] avoid "git mktag" failure with newer git
* git.c (git_mktag): Emit full tagger information, now that
git's mktag (since git's 5fbd0a44cfee7be96fe29b9252f34b8f1bce9ac5
on 2008-04-02) is more strict about it.
Signed-off-by: Jim Meyering <meyering@redhat.com>
---
 git.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/git.c b/git.c
index 614069d..a1828ef 100644
--- a/git.c
+++ b/git.c
@@ -371,11 +371,13 @@ git_mktag (rev_commit *commit, char *name)
 		"object %s\n"
 		"type commit\n"
 		"tag %s\n"
-		"tagger %s\n"
+		"tagger %s <%s> %lu +0000\n"
 		"\n",
 		commit->sha1,
 		name,
-		author ? author->full : commit->author);
+		author ? author->full : commit->author,
+		author ? author->email : commit->author,
+		commit->date);
     if (rv < 1) {
 	fprintf (stderr, "%s: %s\n", filename, strerror (errno));
 	fclose (f);
--
1.5.5.rc3.14.g78bf3
Message 1 of 1 in “(parsecvs) avoid "git mktag" failure with newer git”
  1. (parsecvs) avoid "git mktag" failure with newer gitJim Meyering, Apr 9, 2008

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.