2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin/daemon.c
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
+++ git-1.7.4.4/builtin/daemon.c 2011-04-08 15:33:59.605465617 +0200
|
2010-11-28 18:02:17 +00:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+#include "../daemon.c"
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin/fast-import.c
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
+++ git-1.7.4.4/builtin/fast-import.c 2011-04-08 15:33:59.605465617 +0200
|
2010-11-28 18:02:17 +00:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+#include "../fast-import.c"
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin/http-backend.c
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
+++ git-1.7.4.4/builtin/http-backend.c 2011-04-08 15:33:59.605465617 +0200
|
2010-11-28 18:02:17 +00:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+#include "../http-backend.c"
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin/imap-send.c
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
+++ git-1.7.4.4/builtin/imap-send.c 2011-04-08 15:33:59.605465617 +0200
|
2010-11-28 18:02:17 +00:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+#include "../imap-send.c"
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin/shell.c
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
+++ git-1.7.4.4/builtin/shell.c 2011-04-08 15:33:59.605465617 +0200
|
2010-11-28 18:02:17 +00:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+#include "../shell.c"
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin/upload-pack.c
|
|
|
|
===================================================================
|
|
|
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
|
|
+++ git-1.7.4.4/builtin/upload-pack.c 2011-04-08 15:33:59.605465617 +0200
|
2010-11-28 18:02:17 +00:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+#include "../upload-pack.c"
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/builtin.h
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/builtin.h 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/builtin.h 2011-04-08 15:33:59.605465617 +0200
|
|
|
|
@@ -142,5 +142,11 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
|
|
|
|
extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
|
|
|
|
extern int cmd_replace(int argc, const char **argv, const char *prefix);
|
|
|
|
+extern int cmd_shell(int argc, char **argv, const char *prefix);
|
|
|
|
+extern int cmd_upload_pack(int argc, char **argv, const char *prefix);
|
|
|
|
+extern int cmd_http_backend(int argc, char **argv, const char *prefix);
|
|
|
|
+extern int cmd_daemon(int argc, char **argv, const char *prefix);
|
|
|
|
+extern int cmd_imap_send(int argc, char **argv, const char *prefix);
|
|
|
|
+extern int cmd_fast_import(int argc, const char **argv, const char *prefix);
|
|
|
|
|
|
|
|
#endif
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/daemon.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/daemon.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/daemon.c 2011-04-08 15:33:59.605465617 +0200
|
|
|
|
@@ -1043,7 +1043,7 @@
|
|
|
|
return service_loop(&socklist);
|
2010-11-28 18:02:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-int main(int argc, char **argv)
|
|
|
|
+int cmd_daemon(int argc, char **argv, const char *prefix)
|
|
|
|
{
|
|
|
|
int listen_port = 0;
|
2011-04-16 08:59:26 +00:00
|
|
|
struct string_list listen_addr = STRING_LIST_INIT_NODUP;
|
|
|
|
Index: git-1.7.4.4/fast-import.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/fast-import.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/fast-import.c 2011-04-08 15:33:59.609465154 +0200
|
|
|
|
@@ -3083,7 +3083,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
read_marks();
|
|
|
|
}
|
|
|
|
|
|
|
|
-int main(int argc, const char **argv)
|
|
|
|
+int cmd_fast_import(int argc, const char **argv, const char *prefix)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/git.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/git.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/git.c 2011-04-08 15:33:59.609465154 +0200
|
|
|
|
@@ -251,11 +251,11 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
|
|
|
|
struct cmd_struct {
|
|
|
|
const char *cmd;
|
|
|
|
- int (*fn)(int, const char **, const char *);
|
|
|
|
+ int (*fn)(int, char **, const char *);
|
|
|
|
int option;
|
|
|
|
};
|
|
|
|
|
|
|
|
-static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
|
|
|
|
+static int run_builtin(struct cmd_struct *p, int argc, char **argv)
|
|
|
|
{
|
|
|
|
int status, help;
|
|
|
|
struct stat st;
|
2011-04-16 08:59:26 +00:00
|
|
|
@@ -308,7 +308,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
-static void handle_internal_command(int argc, const char **argv)
|
|
|
|
+static void handle_internal_command(int argc, char **argv)
|
|
|
|
{
|
|
|
|
const char *cmd = argv[0];
|
|
|
|
static struct cmd_struct commands[] = {
|
2011-04-16 08:59:26 +00:00
|
|
|
@@ -422,6 +422,12 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
{ "verify-pack", cmd_verify_pack },
|
|
|
|
{ "show-ref", cmd_show_ref, RUN_SETUP },
|
|
|
|
{ "pack-refs", cmd_pack_refs, RUN_SETUP },
|
|
|
|
+ { "shell", cmd_shell },
|
|
|
|
+ { "upload-pack", cmd_upload_pack },
|
|
|
|
+ { "http-backend", cmd_http_backend },
|
|
|
|
+ { "daemon", cmd_daemon },
|
|
|
|
+ { "imap-send", cmd_imap_send },
|
|
|
|
+ { "fast-import", cmd_fast_import },
|
|
|
|
};
|
|
|
|
int i;
|
|
|
|
static const char ext[] = STRIP_EXTENSION;
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/http-backend.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/http-backend.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/http-backend.c 2011-04-08 15:33:59.609465154 +0200
|
|
|
|
@@ -540,7 +540,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
{"POST", "/git-receive-pack$", service_rpc}
|
|
|
|
};
|
|
|
|
|
|
|
|
-int main(int argc, char **argv)
|
|
|
|
+int cmd_http_backend(int argc, char **argv, const char *prefix)
|
|
|
|
{
|
|
|
|
char *method = getenv("REQUEST_METHOD");
|
|
|
|
char *dir;
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/imap-send.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/imap-send.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/imap-send.c 2011-04-08 15:33:59.609465154 +0200
|
|
|
|
@@ -1528,7 +1528,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
-int main(int argc, char **argv)
|
|
|
|
+int cmd_imap_send(int argc, char **argv, const char *prefix)
|
|
|
|
{
|
|
|
|
struct msg_data all_msgs, msg;
|
|
|
|
struct store *ctx = NULL;
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/Makefile 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/Makefile 2011-04-08 15:38:21.489032460 +0200
|
|
|
|
@@ -406,13 +406,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
# ... and all the rest that could be moved out of bindir to gitexecdir
|
|
|
|
PROGRAMS += $(EXTRA_PROGRAMS)
|
|
|
|
|
2011-04-16 08:59:26 +00:00
|
|
|
-PROGRAM_OBJS += daemon.o
|
2010-11-28 18:02:17 +00:00
|
|
|
-PROGRAM_OBJS += fast-import.o
|
|
|
|
-PROGRAM_OBJS += imap-send.o
|
|
|
|
-PROGRAM_OBJS += shell.o
|
|
|
|
PROGRAM_OBJS += show-index.o
|
|
|
|
-PROGRAM_OBJS += upload-pack.o
|
|
|
|
-PROGRAM_OBJS += http-backend.o
|
|
|
|
|
|
|
|
PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
|
|
|
|
|
2011-04-16 08:59:26 +00:00
|
|
|
@@ -769,6 +763,12 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
BUILTIN_OBJS += builtin/verify-pack.o
|
|
|
|
BUILTIN_OBJS += builtin/verify-tag.o
|
|
|
|
BUILTIN_OBJS += builtin/write-tree.o
|
|
|
|
+BUILTIN_OBJS += builtin/shell.o
|
|
|
|
+BUILTIN_OBJS += builtin/upload-pack.o
|
|
|
|
+BUILTIN_OBJS += builtin/http-backend.o
|
|
|
|
+BUILTIN_OBJS += builtin/daemon.o
|
|
|
|
+BUILTIN_OBJS += builtin/imap-send.o
|
|
|
|
+BUILTIN_OBJS += builtin/fast-import.o
|
|
|
|
|
|
|
|
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
|
|
|
|
EXTLIBS =
|
2011-04-16 08:59:26 +00:00
|
|
|
@@ -1293,7 +1293,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
EXTLIBS += -lz
|
|
|
|
|
|
|
|
ifndef NO_OPENSSL
|
|
|
|
- OPENSSL_LIBSSL = -lssl
|
|
|
|
+ EXTLIBS += -lssl
|
|
|
|
ifdef OPENSSLDIR
|
|
|
|
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
|
|
|
|
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
|
2011-04-16 08:59:26 +00:00
|
|
|
@@ -2003,10 +2003,6 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
git-%$X: %.o $(GITLIBS)
|
|
|
|
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
|
|
|
|
|
|
|
|
-git-imap-send$X: imap-send.o $(GITLIBS)
|
|
|
|
- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
2011-01-01 09:42:17 +00:00
|
|
|
- $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
|
2010-11-28 18:02:17 +00:00
|
|
|
-
|
|
|
|
git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
|
|
|
|
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
|
|
|
|
$(LIBS) $(CURL_LIBCURL)
|
2011-04-16 08:59:26 +00:00
|
|
|
@@ -2204,23 +2200,22 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
|
|
|
|
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
|
|
|
|
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
|
|
|
|
+ ln -s ../../bin/git "$$execdir/git" && \
|
|
|
|
{ test "$$bindir/" = "$$execdir/" || \
|
|
|
|
- for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
|
|
|
|
+ for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
|
|
|
|
$(RM) "$$execdir/$$p" && \
|
|
|
|
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
|
|
|
|
- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
|
|
|
|
+ ln -s git "$$execdir/$$p" 2>/dev/null || \
|
|
|
|
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
|
|
|
|
done; \
|
|
|
|
} && \
|
|
|
|
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
|
|
|
|
$(RM) "$$bindir/$$p" && \
|
|
|
|
- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
|
|
|
|
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
|
|
|
|
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
|
|
|
|
done && \
|
|
|
|
for p in $(BUILT_INS); do \
|
|
|
|
$(RM) "$$execdir/$$p" && \
|
|
|
|
- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
|
|
|
|
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
|
|
|
|
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
|
|
|
|
done && \
|
2011-04-16 08:59:26 +00:00
|
|
|
Index: git-1.7.4.4/shell.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/shell.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/shell.c 2011-04-08 15:33:59.613464996 +0200
|
|
|
|
@@ -129,7 +129,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
{ NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
-int main(int argc, char **argv)
|
|
|
|
+int cmd_shell(int argc, char **argv, const char *prefix)
|
|
|
|
{
|
|
|
|
char *prog;
|
2011-04-16 08:59:26 +00:00
|
|
|
const char **user_argv;
|
|
|
|
Index: git-1.7.4.4/upload-pack.c
|
|
|
|
===================================================================
|
|
|
|
--- git-1.7.4.4/upload-pack.c 2011-04-03 10:22:36.000000000 +0200
|
|
|
|
+++ git-1.7.4.4/upload-pack.c 2011-04-08 15:33:59.613464996 +0200
|
|
|
|
@@ -676,7 +676,7 @@
|
2010-11-28 18:02:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-int main(int argc, char **argv)
|
|
|
|
+int cmd_upload_pack(int argc, char **argv, const char *prefix)
|
|
|
|
{
|
|
|
|
char *dir;
|
|
|
|
int i;
|