summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-16 23:21:29 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-16 23:21:53 -0500
commit6b2ea90966fd090e3b134ec57b85a8adfe4b89be (patch)
tree85bd409fce85d7af248c8346d80ab6d5369e207f
parent86685f8f1d586b0201ab51d8e5923379967f4e74 (diff)
downloadlibgit2-ethomson/tag_valid.tar.gz
tag: set validity to 0 by defaultethomson/tag_valid
`git_tag_name_is_valid` needs to set validity to 0 when it short-circuits.
-rw-r--r--src/tag.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tag.c b/src/tag.c
index 7a155147d..837658a19 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -539,6 +539,8 @@ int git_tag_name_is_valid(int *valid, const char *name)
GIT_ASSERT(valid);
+ *valid = 0;
+
/*
* Discourage tag name starting with dash,
* https://github.com/git/git/commit/4f0accd638b8d2