threads / patch / 3048

patchdescribe: do not silently ignore indescribable commits

Subject: [PATCH - maint review] describe: do not silently ignore indescribable commits

## tl;dr

One message between Jan 12, 2006 and Jan 12, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Junio C Hamano· Jan 12, 2006, 00:05 UTC · lore

We silently ignored indescribable commits without complaining. Complain and die instead.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * For 1.1.2
 describe.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
8c23b6fae2e5cd8475885b015f0bb992d19921db
Show changes to describe.c +3 −2
diff --git a/describe.c b/describe.c
index a0180f5..5548a16 100644
--- a/describe.c
+++ b/describe.c
@@ -124,10 +124,11 @@ static void describe(struct commit *cmit
 		if (n) {
 			printf("%s-g%s\n", n->path,
 			       find_unique_abbrev(cmit->object.sha1, abbrev));
-			break;
+			clear_commit_marks(cmit, SEEN);
+			return;
 		}
 	}
-	clear_commit_marks(cmit, SEEN);
+	die("cannot describe '%s'", sha1_to_hex(cmit->object.sha1));
 }
 
 int main(int argc, char **argv)
-- 
1.1.1-g8ecb

← back to recent threads