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

[PATCH] git-rev-list: Don't die on a bad tag

From
FSFrank Sorenson <frank@tuxrocks.com>
Date
Aug 27, 2005, 08:17 UTC
Message-ID
<4310217D.80408@tuxrocks.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The current cogito tree contains an invalid tag (junio-gpg-pub => 0918385dbd9656cab0d1d81ba7453d49bbc16250), and git-repack-script (and probably others) will die when git-rev-list tries to dump the objects. This patch changes it to complain, but continue.

Signed-off-by: Frank Sorenson <frank@tuxrocks.com>
diff --git a/rev-list.c b/rev-list.c
- --- a/rev-list.c
+++ b/rev-list.c
@@ -418,8 +418,10 @@ static struct commit *get_commit_referen
 		if (tag_objects && !(object->flags & UNINTERESTING))
 			add_pending_object(object, tag->tag);
 		object = parse_object(tag->tagged->sha1);
- -		if (!object)
- -			die("bad object %s", sha1_to_hex(tag->tagged->sha1));
+		if (!object) {
+			fprintf(stderr, "Bad tag: %s\n", sha1_to_hex(tag->tagged->sha1));
+			return NULL;
+		}
 	}
 
 	/*


Frank
- -- 
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDECF9aI0dwg4A47wRAncdAKCIcNFzihLm9cy7RWRKakM6INikigCfcCvu
R/XG+XlMsbgWesEvZcFBmQY=
=OY7G
-----END PGP SIGNATURE-----
Next: Junio C Hamano
Message 1 of 2 in “git-rev-list: Don't die on a bad tag”
  1. git-rev-list: Don't die on a bad tagFrank Sorenson, Aug 27, 2005
  2. Junio C HamanoAug 27, 2005

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.