Skip to contentSkip to conversation

describe: do not silently ignore indescribable commits

PATCH New Junio C Hamano 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 describe: do not silently ignore indescribable commits

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

---
* For 1.1.2

 describe.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

8c23b6fae2e5cd8475885b015f0bb992d19921db

describe.c +3 -2
index a0180f5..5548a16 100644
@@ -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)
Signature · 1 line
1.1.1-g8ecb