* [PATCH] Make git-repo-config a builtin
@ 2006-08-02 21:51 Matthias Kestenholz
2006-08-02 21:52 ` [PATCH] use declarations from builtin.h for builtin commands Matthias Kestenholz
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kestenholz @ 2006-08-02 21:51 UTC (permalink / raw)
To: junkio; +Cc: git, Matthias Kestenholz
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
Makefile | 7 ++++---
repo-config.c => builtin-repo-config.c | 3 ++-
builtin.h | 1 +
git.c | 1 +
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 704101d..8d38f1c 100644
--- a/Makefile
+++ b/Makefile
@@ -204,7 +204,7 @@ PROGRAMS = \
git-unpack-objects$X git-update-server-info$X \
git-upload-pack$X git-verify-pack$X \
git-symbolic-ref$X \
- git-name-rev$X git-pack-redundant$X git-repo-config$X git-var$X \
+ git-name-rev$X git-pack-redundant$X git-var$X \
git-describe$X git-merge-tree$X git-blame$X git-imap-send$X \
git-merge-recur$X
@@ -217,7 +217,8 @@ BUILT_INS = git-log$X git-whatchanged$X
git-read-tree$X git-commit-tree$X git-write-tree$X \
git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
- git-fmt-merge-msg$X git-prune$X git-mv$X git-prune-packed$X
+ git-fmt-merge-msg$X git-prune$X git-mv$X git-prune-packed$X \
+ git-repo-config$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -274,7 +275,7 @@ BUILTIN_OBJS = \
builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o \
- builtin-mv.o builtin-prune-packed.o
+ builtin-mv.o builtin-prune-packed.o builtin-repo-config.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS = -lz
diff --git a/repo-config.c b/builtin-repo-config.c
similarity index 98%
rename from repo-config.c
rename to builtin-repo-config.c
index c7ed0ac..1d93739 100644
--- a/repo-config.c
+++ b/builtin-repo-config.c
@@ -1,3 +1,4 @@
+#include "builtin.h"
#include "cache.h"
#include <regex.h>
@@ -128,7 +129,7 @@ free_strings:
return ret;
}
-int main(int argc, const char **argv)
+int cmd_repo_config(int argc, const char **argv, const char *prefix)
{
int nongit = 0;
setup_git_directory_gently(&nongit);
diff --git a/builtin.h b/builtin.h
index 7ddfe28..26ebcaf 100644
--- a/builtin.h
+++ b/builtin.h
@@ -48,6 +48,7 @@ extern int cmd_update_index(int argc, co
extern int cmd_update_ref(int argc, const char **argv, const char *prefix);
extern int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix);
extern int cmd_mv(int argc, const char **argv, const char *prefix);
+extern int cmd_repo_config(int argc, const char **argv, const char *prefix);
extern int cmd_write_tree(int argc, const char **argv, const char *prefix);
extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
diff --git a/git.c b/git.c
index 5b50762..6e72a89 100644
--- a/git.c
+++ b/git.c
@@ -264,6 +264,7 @@ static void handle_internal_command(int
{ "prune", cmd_prune, NEEDS_PREFIX },
{ "mv", cmd_mv, NEEDS_PREFIX },
{ "prune-packed", cmd_prune_packed, NEEDS_PREFIX },
+ { "repo-config", cmd_repo_config },
};
int i;
--
1.4.2.rc2.g93b2c
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] use declarations from builtin.h for builtin commands
2006-08-02 21:51 [PATCH] Make git-repo-config a builtin Matthias Kestenholz
@ 2006-08-02 21:52 ` Matthias Kestenholz
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Kestenholz @ 2006-08-02 21:52 UTC (permalink / raw)
To: junkio; +Cc: git, Matthias Kestenholz
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
builtin-fmt-merge-msg.c | 3 ++-
builtin-prune-packed.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c
index c84224e..485ede7 100644
--- a/builtin-fmt-merge-msg.c
+++ b/builtin-fmt-merge-msg.c
@@ -1,3 +1,4 @@
+#include "builtin.h"
#include "cache.h"
#include "commit.h"
#include "diff.h"
@@ -242,7 +243,7 @@ static void shortlog(const char *name, u
free_list(&subjects);
}
-int cmd_fmt_merge_msg(int argc, char **argv, const char *prefix)
+int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
{
int limit = 20, i = 0;
char line[1024];
diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c
index d0ff336..d3dd94d 100644
--- a/builtin-prune-packed.c
+++ b/builtin-prune-packed.c
@@ -1,3 +1,4 @@
+#include "builtin.h"
#include "cache.h"
static const char prune_packed_usage[] =
@@ -54,7 +55,7 @@ static void prune_packed_objects(void)
}
}
-int cmd_prune_packed(int argc, char **argv, const char *prefix)
+int cmd_prune_packed(int argc, const char **argv, const char *prefix)
{
int i;
--
1.4.2.rc2.g93b2c
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-02 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-02 21:51 [PATCH] Make git-repo-config a builtin Matthias Kestenholz
2006-08-02 21:52 ` [PATCH] use declarations from builtin.h for builtin commands Matthias Kestenholz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).