diff options
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fast-import.c b/fast-import.c index 742e7da6b8..c44cc11fd7 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2717,6 +2717,8 @@ static void parse_new_tag(void) from = strchr(command_buf.buf, ' ') + 1; s = lookup_branch(from); if (s) { + if (is_null_sha1(s->sha1)) + die("Can't tag an empty branch."); hashcpy(sha1, s->sha1); type = OBJ_COMMIT; } else if (*from == ':') { |