1 Index: git-1.7.4.4/builtin/daemon.c
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ git-1.7.4.4/builtin/daemon.c 2011-04-08 15:33:59.605465617 +0200
6 +#include "../daemon.c"
7 Index: git-1.7.4.4/builtin/fast-import.c
8 ===================================================================
9 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
10 +++ git-1.7.4.4/builtin/fast-import.c 2011-04-08 15:33:59.605465617 +0200
12 +#include "../fast-import.c"
13 Index: git-1.7.4.4/builtin/http-backend.c
14 ===================================================================
15 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
16 +++ git-1.7.4.4/builtin/http-backend.c 2011-04-08 15:33:59.605465617 +0200
18 +#include "../http-backend.c"
19 Index: git-1.7.4.4/builtin/imap-send.c
20 ===================================================================
21 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
22 +++ git-1.7.4.4/builtin/imap-send.c 2011-04-08 15:33:59.605465617 +0200
24 +#include "../imap-send.c"
25 Index: git-1.7.4.4/builtin/shell.c
26 ===================================================================
27 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
28 +++ git-1.7.4.4/builtin/shell.c 2011-04-08 15:33:59.605465617 +0200
30 +#include "../shell.c"
31 Index: git-1.7.4.4/builtin/upload-pack.c
32 ===================================================================
33 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
34 +++ git-1.7.4.4/builtin/upload-pack.c 2011-04-08 15:33:59.605465617 +0200
36 +#include "../upload-pack.c"
37 Index: git-1.7.4.4/builtin.h
38 ===================================================================
39 --- git-1.7.4.4/builtin.h 2011-04-03 10:22:36.000000000 +0200
40 +++ git-1.7.4.4/builtin.h 2011-04-08 15:33:59.605465617 +0200
42 extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
43 extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
44 extern int cmd_replace(int argc, const char **argv, const char *prefix);
45 +extern int cmd_shell(int argc, char **argv, const char *prefix);
46 +extern int cmd_upload_pack(int argc, char **argv, const char *prefix);
47 +extern int cmd_http_backend(int argc, char **argv, const char *prefix);
48 +extern int cmd_daemon(int argc, char **argv, const char *prefix);
49 +extern int cmd_imap_send(int argc, char **argv, const char *prefix);
50 +extern int cmd_fast_import(int argc, const char **argv, const char *prefix);
53 Index: git-1.7.4.4/daemon.c
54 ===================================================================
55 --- git-1.7.4.4/daemon.c 2011-04-03 10:22:36.000000000 +0200
56 +++ git-1.7.4.4/daemon.c 2011-04-08 15:33:59.605465617 +0200
58 return service_loop(&socklist);
61 -int main(int argc, char **argv)
62 +int cmd_daemon(int argc, char **argv, const char *prefix)
65 struct string_list listen_addr = STRING_LIST_INIT_NODUP;
66 Index: git-1.7.4.4/fast-import.c
67 ===================================================================
68 --- git-1.7.4.4/fast-import.c 2011-04-03 10:22:36.000000000 +0200
69 +++ git-1.7.4.4/fast-import.c 2011-04-08 15:33:59.609465154 +0200
74 -int main(int argc, const char **argv)
75 +int cmd_fast_import(int argc, const char **argv, const char *prefix)
79 Index: git-1.7.4.4/git.c
80 ===================================================================
81 --- git-1.7.4.4/git.c 2011-04-03 10:22:36.000000000 +0200
82 +++ git-1.7.4.4/git.c 2011-04-08 15:33:59.609465154 +0200
87 - int (*fn)(int, const char **, const char *);
88 + int (*fn)(int, char **, const char *);
92 -static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
93 +static int run_builtin(struct cmd_struct *p, int argc, char **argv)
101 -static void handle_internal_command(int argc, const char **argv)
102 +static void handle_internal_command(int argc, char **argv)
104 const char *cmd = argv[0];
105 static struct cmd_struct commands[] = {
107 { "verify-pack", cmd_verify_pack },
108 { "show-ref", cmd_show_ref, RUN_SETUP },
109 { "pack-refs", cmd_pack_refs, RUN_SETUP },
110 + { "shell", cmd_shell },
111 + { "upload-pack", cmd_upload_pack },
112 + { "http-backend", cmd_http_backend },
113 + { "daemon", cmd_daemon },
114 + { "imap-send", cmd_imap_send },
115 + { "fast-import", cmd_fast_import },
118 static const char ext[] = STRIP_EXTENSION;
119 Index: git-1.7.4.4/http-backend.c
120 ===================================================================
121 --- git-1.7.4.4/http-backend.c 2011-04-03 10:22:36.000000000 +0200
122 +++ git-1.7.4.4/http-backend.c 2011-04-08 15:33:59.609465154 +0200
124 {"POST", "/git-receive-pack$", service_rpc}
127 -int main(int argc, char **argv)
128 +int cmd_http_backend(int argc, char **argv, const char *prefix)
130 char *method = getenv("REQUEST_METHOD");
132 Index: git-1.7.4.4/imap-send.c
133 ===================================================================
134 --- git-1.7.4.4/imap-send.c 2011-04-03 10:22:36.000000000 +0200
135 +++ git-1.7.4.4/imap-send.c 2011-04-08 15:33:59.609465154 +0200
136 @@ -1528,7 +1528,7 @@
140 -int main(int argc, char **argv)
141 +int cmd_imap_send(int argc, char **argv, const char *prefix)
143 struct msg_data all_msgs, msg;
144 struct store *ctx = NULL;
145 Index: git-1.7.4.4/Makefile
146 ===================================================================
147 --- git-1.7.4.4/Makefile 2011-04-03 10:22:36.000000000 +0200
148 +++ git-1.7.4.4/Makefile 2011-04-08 15:38:21.489032460 +0200
150 # ... and all the rest that could be moved out of bindir to gitexecdir
151 PROGRAMS += $(EXTRA_PROGRAMS)
153 -PROGRAM_OBJS += daemon.o
154 -PROGRAM_OBJS += fast-import.o
155 -PROGRAM_OBJS += imap-send.o
156 -PROGRAM_OBJS += shell.o
157 PROGRAM_OBJS += show-index.o
158 -PROGRAM_OBJS += upload-pack.o
159 -PROGRAM_OBJS += http-backend.o
161 PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
164 BUILTIN_OBJS += builtin/verify-pack.o
165 BUILTIN_OBJS += builtin/verify-tag.o
166 BUILTIN_OBJS += builtin/write-tree.o
167 +BUILTIN_OBJS += builtin/shell.o
168 +BUILTIN_OBJS += builtin/upload-pack.o
169 +BUILTIN_OBJS += builtin/http-backend.o
170 +BUILTIN_OBJS += builtin/daemon.o
171 +BUILTIN_OBJS += builtin/imap-send.o
172 +BUILTIN_OBJS += builtin/fast-import.o
174 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
176 @@ -1293,7 +1293,7 @@
180 - OPENSSL_LIBSSL = -lssl
183 BASIC_CFLAGS += -I$(OPENSSLDIR)/include
184 OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
185 @@ -2003,10 +2003,6 @@
186 git-%$X: %.o $(GITLIBS)
187 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
189 -git-imap-send$X: imap-send.o $(GITLIBS)
190 - $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
191 - $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
193 git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
194 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
195 $(LIBS) $(CURL_LIBCURL)
196 @@ -2204,23 +2200,22 @@
198 bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
199 execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
200 + ln -s ../../bin/git "$$execdir/git" && \
201 { test "$$bindir/" = "$$execdir/" || \
202 - for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
203 + for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
204 $(RM) "$$execdir/$$p" && \
205 test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
206 - ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
207 + ln -s git "$$execdir/$$p" 2>/dev/null || \
208 cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
211 for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
212 $(RM) "$$bindir/$$p" && \
213 - ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
214 ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
215 cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
217 for p in $(BUILT_INS); do \
218 $(RM) "$$execdir/$$p" && \
219 - ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
220 ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
221 cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
223 Index: git-1.7.4.4/shell.c
224 ===================================================================
225 --- git-1.7.4.4/shell.c 2011-04-03 10:22:36.000000000 +0200
226 +++ git-1.7.4.4/shell.c 2011-04-08 15:33:59.613464996 +0200
231 -int main(int argc, char **argv)
232 +int cmd_shell(int argc, char **argv, const char *prefix)
235 const char **user_argv;
236 Index: git-1.7.4.4/upload-pack.c
237 ===================================================================
238 --- git-1.7.4.4/upload-pack.c 2011-04-03 10:22:36.000000000 +0200
239 +++ git-1.7.4.4/upload-pack.c 2011-04-08 15:33:59.613464996 +0200
244 -int main(int argc, char **argv)
245 +int cmd_upload_pack(int argc, char **argv, const char *prefix)