summaryrefslogtreecommitdiff
path: root/builtin-show-ref.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-24 01:42:06 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-24 01:42:06 -0800
commit8a13becc0dd4c8876ebf471bf880446c1a10b7e9 (patch)
tree9448f573c17a91697904e46305f09f7679e7e4dd /builtin-show-ref.c
parent509b4d73b26bb442fd409bbca3772ba22875d310 (diff)
parent5089277718503a4de7817b5f6754cb03116d5524 (diff)
downloadgit-8a13becc0dd4c8876ebf471bf880446c1a10b7e9.tar.gz
Merge branch 'maint'
* maint: diff-patch: Avoid emitting double-slashes in textual patch. Reword git-am 3-way fallback failure message. Limit filename for format-patch core.legacyheaders: Use the description used in RelNotes-1.5.0 git-show-ref --verify: Fail if called without a reference Conflicts: builtin-show-ref.c diff.c
Diffstat (limited to 'builtin-show-ref.c')
-rw-r--r--builtin-show-ref.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index ae0edddac1..9463ff0e69 100644
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
@@ -221,9 +221,11 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix)
}
if (verify) {
- unsigned char sha1[20];
-
+ if (!pattern)
+ die("--verify requires a reference");
while (*pattern) {
+ unsigned char sha1[20];
+
if (!prefixcmp(*pattern, "refs/") &&
resolve_ref(*pattern, sha1, 1, NULL)) {
if (!quiet)