Skip to contentSkip to conversation

(parsecvs) avoid "git mktag" failure with newer git

PATCH New Jim Meyering 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 (parsecvs) avoid "git mktag" failure with newer git

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. ]

Quoted 1 line

From 9c6ca141e82fae93ff173b87a27c118c5e87547c Mon Sep 17 00:00:00 2001

From: Jim Meyering <[email protected]>
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.

---
 git.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
git.c +4 -2
index 614069d..a1828ef 100644
@@ -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