summaryrefslogtreecommitdiff
path: root/builtin-check-ref-format.c
diff options
context:
space:
mode:
authorLukas Sandström <lukass@etek.chalmers.se>2006-05-18 14:15:55 +0200
committerJunio C Hamano <junkio@cox.net>2006-05-18 15:51:38 -0700
commit9370bae2cef351617272aa142fbe4ce039833d13 (patch)
tree7265a2b5e3fbcdee3a5c45b0b4469016ad5891d6 /builtin-check-ref-format.c
parent5fb61b8dcfdf7bcec0793c071813e255d1803859 (diff)
downloadgit-9370bae2cef351617272aa142fbe4ce039833d13.tar.gz
Make git-check-format-ref a builtin.
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-check-ref-format.c')
-rw-r--r--builtin-check-ref-format.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/builtin-check-ref-format.c b/builtin-check-ref-format.c
new file mode 100644
index 0000000000..4a23936aff
--- /dev/null
+++ b/builtin-check-ref-format.c
@@ -0,0 +1,14 @@
+/*
+ * GIT - The information manager from hell
+ */
+
+#include "cache.h"
+#include "refs.h"
+#include "builtin.h"
+
+int cmd_check_ref_format(int argc, const char **argv, char **envp)
+{
+ if (argc != 2)
+ usage("git check-ref-format refname");
+ return !!check_ref_format(argv[1]);
+}