@matheusbsbs / matheus-bagliano / commits / e12c095aa6
Fork 0

Make git-repo-config a builtin

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch> Signed-off-by: Junio C Hamano <junkio@cox.net>

Matthias Kestenholz committed Aug 2, 2006 at 23:51 UTC e12c095aa69d8aca0326eb11960427d9bf9e2db7
4 files changed +8 -4
Makefile
+4 -3
@@ -185,7 +185,7 @@ PROGRAMS = \
185 git-unpack-objects$X git-update-server-info$X \
186 git-upload-pack$X git-verify-pack$X \
187 git-symbolic-ref$X \
188 - git-name-rev$X git-pack-redundant$X git-repo-config$X git-var$X \
188 + git-name-rev$X git-pack-redundant$X git-var$X \
189 git-describe$X git-merge-tree$X git-blame$X git-imap-send$X
190
191 BUILT_INS = git-log$X git-whatchanged$X git-show$X git-update-ref$X \
@@ -197,7 +197,8 @@ BUILT_INS = git-log$X git-whatchanged$X git-show$X git-update-ref$X \
197 git-read-tree$X git-commit-tree$X git-write-tree$X \
198 git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
199 git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
200 - git-fmt-merge-msg$X git-prune$X git-mv$X git-prune-packed$X
200 + git-fmt-merge-msg$X git-prune$X git-mv$X git-prune-packed$X \
201 + git-repo-config$X
202
203 # what 'all' will build and 'install' will install, in gitexecdir
204 ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -254,7 +255,7 @@ BUILTIN_OBJS = \
255 builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
256 builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
257 builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o \
257 - builtin-mv.o builtin-prune-packed.o
258 + builtin-mv.o builtin-prune-packed.o builtin-repo-config.o
259
260 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
261 LIBS = $(GITLIBS) -lz
builtin-repo-config.c renamed
+2 -1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include <regex.h>
4
@@ -128,7 +129,7 @@ free_strings:
129 return ret;
130 }
131
131 -int main(int argc, const char **argv)
132 +int cmd_repo_config(int argc, const char **argv, const char *prefix)
133 {
134 int nongit = 0;
135 setup_git_directory_gently(&nongit);
builtin.h
+1
@@ -48,6 +48,7 @@ extern int cmd_update_index(int argc, const char **argv, const char *prefix);
48 extern int cmd_update_ref(int argc, const char **argv, const char *prefix);
49 extern int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix);
50 extern int cmd_mv(int argc, const char **argv, const char *prefix);
51 +extern int cmd_repo_config(int argc, const char **argv, const char *prefix);
52
53 extern int cmd_write_tree(int argc, const char **argv, const char *prefix);
54 extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
git.c
+1
@@ -264,6 +264,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
264 { "prune", cmd_prune, NEEDS_PREFIX },
265 { "mv", cmd_mv, NEEDS_PREFIX },
266 { "prune-packed", cmd_prune_packed, NEEDS_PREFIX },
267 + { "repo-config", cmd_repo_config },
268 };
269 int i;
270