summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5fb61b8)
raw | patch | inline | side by side (parent: 5fb61b8)
author | Lukas Sandström <lukass@etek.chalmers.se> | |
Thu, 18 May 2006 12:15:55 +0000 (14:15 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 18 May 2006 22:51:38 +0000 (15:51 -0700) |
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
builtin-check-ref-format.c | [new file with mode: 0644] | patch | blob |
builtin.h | patch | blob | history | |
check-ref-format.c | [deleted file] | patch | blob | history |
git.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index 6efc8e02752daa49305cb0238a3b37ee4d2b0d79..2149fb8cea5436f1e09b7751f9e4022efbcf58be 100644 (file)
--- a/Makefile
+++ b/Makefile
git-ssh-upload$X git-tar-tree$X git-unpack-file$X \
git-unpack-objects$X git-update-index$X git-update-server-info$X \
git-upload-pack$X git-verify-pack$X git-write-tree$X \
- git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
+ git-update-ref$X git-symbolic-ref$X \
git-name-rev$X git-pack-redundant$X git-repo-config$X git-var$X \
git-describe$X git-merge-tree$X git-blame$X git-imap-send$X
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
git-count-objects$X git-diff$X git-push$X \
- git-grep$X git-rev-list$X
+ git-grep$X git-rev-list$X git-check-ref-format$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
- builtin-grep.o builtin-rev-list.o
+ builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/builtin-check-ref-format.c b/builtin-check-ref-format.c
--- /dev/null
@@ -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]);
+}
diff --git a/builtin.h b/builtin.h
index 7dff121520c38de4a6975aaa654432124cef49e0..ff559dec7ed85139394060ee647d260a830a3124 100644 (file)
--- a/builtin.h
+++ b/builtin.h
extern int cmd_push(int argc, const char **argv, char **envp);
extern int cmd_grep(int argc, const char **argv, char **envp);
extern int cmd_rev_list(int argc, const char **argv, char **envp);
+extern int cmd_check_ref_format(int argc, const char **argv, char **envp);
#endif
diff --git a/check-ref-format.c b/check-ref-format.c
--- a/check-ref-format.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * GIT - The information manager from hell
- */
-
-#include "cache.h"
-#include "refs.h"
-
-#include <stdio.h>
-
-int main(int ac, char **av)
-{
- if (ac != 2)
- usage("git-check-ref-format refname");
- if (check_ref_format(av[1]))
- exit(1);
- return 0;
-}