Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 386 lines (325 sloc) 9.471 kB
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
1 #include "cache.h"
2 #include "builtin.h"
3 #include "exec_cmd.h"
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
4 #include "levenshtein.h"
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
5 #include "help.h"
6612b9e @kusma help: always suggest common-cmds if prefix of cmd
kusma authored
6 #include "common-cmds.h"
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
7 #include "string-list.h"
8 #include "column.h"
816fb46 @peff move git_version_string into version.c
peff authored
9 #include "version.h"
6494998 @chriscool help: add "man.viewer" config var to use "woman" or "konqueror"
chriscool authored
10
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
11 void add_cmdname(struct cmdnames *cmds, const char *name, int len)
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
12 {
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
13 struct cmdname *ent = xmalloc(sizeof(*ent) + len + 1);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
14
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
15 ent->len = len;
16 memcpy(ent->name, name, len);
17 ent->name[len] = 0;
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
18
19 ALLOC_GROW(cmds->names, cmds->cnt + 1, cmds->alloc);
20 cmds->names[cmds->cnt++] = ent;
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
21 }
22
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
23 static void clean_cmdnames(struct cmdnames *cmds)
24 {
25 int i;
26 for (i = 0; i < cmds->cnt; ++i)
27 free(cmds->names[i]);
28 free(cmds->names);
29 cmds->cnt = 0;
30 cmds->alloc = 0;
31 }
32
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
33 static int cmdname_compare(const void *a_, const void *b_)
34 {
35 struct cmdname *a = *(struct cmdname **)a_;
36 struct cmdname *b = *(struct cmdname **)b_;
37 return strcmp(a->name, b->name);
38 }
39
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
40 static void uniq(struct cmdnames *cmds)
41 {
42 int i, j;
43
44 if (!cmds->cnt)
45 return;
46
4a15758 @peff help.c::uniq: plug a leak
peff authored
47 for (i = j = 1; i < cmds->cnt; i++) {
48 if (!strcmp(cmds->names[i]->name, cmds->names[j-1]->name))
49 free(cmds->names[i]);
50 else
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
51 cmds->names[j++] = cmds->names[i];
4a15758 @peff help.c::uniq: plug a leak
peff authored
52 }
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
53
54 cmds->cnt = j;
55 }
56
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
57 void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
f3fa183 @gitster Style: place opening brace of a function definition at column 1
gitster authored
58 {
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
59 int ci, cj, ei;
60 int cmp;
61
62 ci = cj = ei = 0;
63 while (ci < cmds->cnt && ei < excludes->cnt) {
64 cmp = strcmp(cmds->names[ci]->name, excludes->names[ei]->name);
65 if (cmp < 0)
66 cmds->names[cj++] = cmds->names[ci++];
6a17f58 @gitster help.c::exclude_cmds(): plug a leak
gitster authored
67 else if (cmp == 0) {
68 ei++;
69 free(cmds->names[ci++]);
70 } else if (cmp > 0)
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
71 ei++;
72 }
73
74 while (ci < cmds->cnt)
75 cmds->names[cj++] = cmds->names[ci++];
76
77 cmds->cnt = cj;
78 }
79
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
80 static void pretty_print_string_list(struct cmdnames *cmds,
81 unsigned int colopts)
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
82 {
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
83 struct string_list list = STRING_LIST_INIT_NODUP;
84 struct column_options copts;
85 int i;
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
86
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
87 for (i = 0; i < cmds->cnt; i++)
88 string_list_append(&list, cmds->names[i]->name);
89 /*
90 * always enable column display, we only consult column.*
91 * about layout strategy and stuff
92 */
93 colopts = (colopts & ~COL_ENABLE_MASK) | COL_ENABLED;
94 memset(&copts, 0, sizeof(copts));
95 copts.indent = " ";
96 copts.padding = 2;
97 print_columns(&list, colopts, &copts);
98 string_list_clear(&list, 0);
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
99 }
100
cc3b7a9 Windows: Make 'git help -a' work.
Johannes Sixt authored
101 static int is_executable(const char *name)
102 {
103 struct stat st;
104
105 if (stat(name, &st) || /* stat, not lstat */
106 !S_ISREG(st.st_mode))
107 return 0;
108
b8a9733 help.c: Fix detection of custom merge strategy on cygwin
Ramsay Jones authored
109 #if defined(WIN32) || defined(__CYGWIN__)
110 #if defined(__CYGWIN__)
111 if ((st.st_mode & S_IXUSR) == 0)
112 #endif
0d30ad7 @lznuaa Avoid declaration after statement
lznuaa authored
113 { /* cannot trust the executable bit, peek into the file instead */
cc3b7a9 Windows: Make 'git help -a' work.
Johannes Sixt authored
114 char buf[3] = { 0 };
115 int n;
116 int fd = open(name, O_RDONLY);
117 st.st_mode &= ~S_IXUSR;
118 if (fd >= 0) {
119 n = read(fd, buf, 2);
120 if (n == 2)
121 /* DOS executables start with "MZ" */
122 if (!strcmp(buf, "#!") || !strcmp(buf, "MZ"))
123 st.st_mode |= S_IXUSR;
124 close(fd);
125 }
0d30ad7 @lznuaa Avoid declaration after statement
lznuaa authored
126 }
cc3b7a9 Windows: Make 'git help -a' work.
Johannes Sixt authored
127 #endif
128 return st.st_mode & S_IXUSR;
129 }
130
e321180 @raalkml Remove calculation of the longest command name from where it is not used
raalkml authored
131 static void list_commands_in_dir(struct cmdnames *cmds,
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
132 const char *path,
133 const char *prefix)
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
134 {
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
135 int prefix_len;
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
136 DIR *dir = opendir(path);
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
137 struct dirent *de;
f5d600e @dscho Avoid chdir() in list_commands_in_dir()
dscho authored
138 struct strbuf buf = STRBUF_INIT;
139 int len;
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
140
f5d600e @dscho Avoid chdir() in list_commands_in_dir()
dscho authored
141 if (!dir)
e321180 @raalkml Remove calculation of the longest command name from where it is not used
raalkml authored
142 return;
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
143 if (!prefix)
144 prefix = "git-";
145 prefix_len = strlen(prefix);
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
146
f5d600e @dscho Avoid chdir() in list_commands_in_dir()
dscho authored
147 strbuf_addf(&buf, "%s/", path);
148 len = buf.len;
149
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
150 while ((de = readdir(dir)) != NULL) {
151 int entlen;
152
edb6ddc @srp remove unused/unneeded "pattern" argument of list_commands
srp authored
153 if (prefixcmp(de->d_name, prefix))
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
154 continue;
0966003 @srp list_commands(): simplify code by using chdir()
srp authored
155
f5d600e @dscho Avoid chdir() in list_commands_in_dir()
dscho authored
156 strbuf_setlen(&buf, len);
157 strbuf_addstr(&buf, de->d_name);
158 if (!is_executable(buf.buf))
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
159 continue;
160
edb6ddc @srp remove unused/unneeded "pattern" argument of list_commands
srp authored
161 entlen = strlen(de->d_name) - prefix_len;
5bb1cda drop length argument of has_extension
Rene Scharfe authored
162 if (has_extension(de->d_name, ".exe"))
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
163 entlen -= 4;
164
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
165 add_cmdname(cmds, de->d_name + prefix_len, entlen);
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
166 }
167 closedir(dir);
f5d600e @dscho Avoid chdir() in list_commands_in_dir()
dscho authored
168 strbuf_release(&buf);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
169 }
170
e321180 @raalkml Remove calculation of the longest command name from where it is not used
raalkml authored
171 void load_command_list(const char *prefix,
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
172 struct cmdnames *main_cmds,
173 struct cmdnames *other_cmds)
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
174 {
175 const char *env_path = getenv("PATH");
176 const char *exec_path = git_exec_path();
177
1f08e5c @raalkml Allow git help work without PATH set
raalkml authored
178 if (exec_path) {
e321180 @raalkml Remove calculation of the longest command name from where it is not used
raalkml authored
179 list_commands_in_dir(main_cmds, exec_path, prefix);
1f08e5c @raalkml Allow git help work without PATH set
raalkml authored
180 qsort(main_cmds->names, main_cmds->cnt,
181 sizeof(*main_cmds->names), cmdname_compare);
182 uniq(main_cmds);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
183 }
184
1f08e5c @raalkml Allow git help work without PATH set
raalkml authored
185 if (env_path) {
186 char *paths, *path, *colon;
187 path = paths = xstrdup(env_path);
188 while (1) {
189 if ((colon = strchr(path, PATH_SEP)))
190 *colon = 0;
746c221 @pieter git wrapper: also use aliases to correct mistyped commands
pieter authored
191 if (!exec_path || strcmp(path, exec_path))
192 list_commands_in_dir(other_cmds, path, prefix);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
193
1f08e5c @raalkml Allow git help work without PATH set
raalkml authored
194 if (!colon)
195 break;
196 path = colon + 1;
197 }
198 free(paths);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
199
1f08e5c @raalkml Allow git help work without PATH set
raalkml authored
200 qsort(other_cmds->names, other_cmds->cnt,
201 sizeof(*other_cmds->names), cmdname_compare);
202 uniq(other_cmds);
203 }
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
204 exclude_cmds(other_cmds, main_cmds);
2156435 @peff help: respect aliases
peff authored
205 }
206
f4ed0af @gitster Merge branch 'nd/columns'
gitster authored
207 void list_commands(unsigned int colopts,
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
208 struct cmdnames *main_cmds, struct cmdnames *other_cmds)
2156435 @peff help: respect aliases
peff authored
209 {
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
210 if (main_cmds->cnt) {
61c5d43 @raalkml list_commands: only call git_exec_path if it is needed
raalkml authored
211 const char *exec_path = git_exec_path();
4470ef9 @pclouds help: replace underlining "help -a" headers using hyphens with a blan…
pclouds authored
212 printf_ln(_("available git commands in '%s'"), exec_path);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
213 putchar('\n');
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
214 pretty_print_string_list(main_cmds, colopts);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
215 putchar('\n');
216 }
217
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
218 if (other_cmds->cnt) {
4470ef9 @pclouds help: replace underlining "help -a" headers using hyphens with a blan…
pclouds authored
219 printf_ln(_("git commands available from elsewhere on your $PATH"));
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
220 putchar('\n');
dbfae68 @pclouds help: reuse print_columns() for help -a
pclouds authored
221 pretty_print_string_list(other_cmds, colopts);
1eb0569 @srp include $PATH in generating list of commands for "help -a"
srp authored
222 putchar('\n');
223 }
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
224 }
225
940208a builtin-help: make some internal functions available to other builtins
Miklos Vajna authored
226 int is_in_cmdlist(struct cmdnames *c, const char *s)
2156435 @peff help: respect aliases
peff authored
227 {
228 int i;
229 for (i = 0; i < c->cnt; i++)
230 if (!strcmp(s, c->names[i]->name))
231 return 1;
232 return 0;
233 }
234
f0e9071 @raalkml Add help.autocorrect to enable/disable autocorrecting
raalkml authored
235 static int autocorrect;
746c221 @pieter git wrapper: also use aliases to correct mistyped commands
pieter authored
236 static struct cmdnames aliases;
f0e9071 @raalkml Add help.autocorrect to enable/disable autocorrecting
raalkml authored
237
238 static int git_unknown_cmd_config(const char *var, const char *value, void *cb)
239 {
240 if (!strcmp(var, "help.autocorrect"))
241 autocorrect = git_config_int(var,value);
746c221 @pieter git wrapper: also use aliases to correct mistyped commands
pieter authored
242 /* Also use aliases for command lookup */
243 if (!prefixcmp(var, "alias."))
244 add_cmdname(&aliases, var + 6, strlen(var + 6));
f0e9071 @raalkml Add help.autocorrect to enable/disable autocorrecting
raalkml authored
245
246 return git_default_config(var, value, cb);
247 }
248
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
249 static int levenshtein_compare(const void *p1, const void *p2)
822a7d5 Remove cmd_usage() routine and re-organize the help/usage code.
Ramsay Allan Jones authored
250 {
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
251 const struct cmdname *const *c1 = p1, *const *c2 = p2;
252 const char *s1 = (*c1)->name, *s2 = (*c2)->name;
253 int l1 = (*c1)->len;
254 int l2 = (*c2)->len;
255 return l1 != l2 ? l1 - l2 : strcmp(s1, s2);
256 }
257
746c221 @pieter git wrapper: also use aliases to correct mistyped commands
pieter authored
258 static void add_cmd_list(struct cmdnames *cmds, struct cmdnames *old)
259 {
260 int i;
261 ALLOC_GROW(cmds->names, cmds->cnt + old->cnt, cmds->alloc);
262
263 for (i = 0; i < old->cnt; i++)
264 cmds->names[cmds->cnt++] = old->names[i];
265 free(old->names);
266 old->cnt = 0;
267 old->names = NULL;
268 }
269
06500a0 help.autocorrect: do not run a command if the command given is junk
Johannes Sixt authored
270 /* An empirically derived magic number */
6612b9e @kusma help: always suggest common-cmds if prefix of cmd
kusma authored
271 #define SIMILARITY_FLOOR 7
272 #define SIMILAR_ENOUGH(x) ((x) < SIMILARITY_FLOOR)
06500a0 help.autocorrect: do not run a command if the command given is junk
Johannes Sixt authored
273
823e0de help_unknown_cmd: do not propose an "unknown" cmd
Michael Schubert authored
274 static const char bad_interpreter_advice[] =
275 N_("'%s' appears to be a git command, but we were not\n"
276 "able to execute it. Maybe git-%s is broken?");
277
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
278 const char *help_unknown_cmd(const char *cmd)
822a7d5 Remove cmd_usage() routine and re-organize the help/usage code.
Ramsay Allan Jones authored
279 {
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
280 int i, n, best_similarity = 0;
281 struct cmdnames main_cmds, other_cmds;
282
283 memset(&main_cmds, 0, sizeof(main_cmds));
0b74f5d @jherland help.c: give correct structure's size to memset()
jherland authored
284 memset(&other_cmds, 0, sizeof(other_cmds));
746c221 @pieter git wrapper: also use aliases to correct mistyped commands
pieter authored
285 memset(&aliases, 0, sizeof(aliases));
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
286
f0e9071 @raalkml Add help.autocorrect to enable/disable autocorrecting
raalkml authored
287 git_config(git_unknown_cmd_config, NULL);
288
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
289 load_command_list("git-", &main_cmds, &other_cmds);
290
746c221 @pieter git wrapper: also use aliases to correct mistyped commands
pieter authored
291 add_cmd_list(&main_cmds, &aliases);
292 add_cmd_list(&main_cmds, &other_cmds);
293 qsort(main_cmds.names, main_cmds.cnt,
294 sizeof(main_cmds.names), cmdname_compare);
295 uniq(&main_cmds);
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
296
6612b9e @kusma help: always suggest common-cmds if prefix of cmd
kusma authored
297 /* This abuses cmdname->len for levenshtein distance */
298 for (i = 0, n = 0; i < main_cmds.cnt; i++) {
299 int cmp = 0; /* avoid compiler stupidity */
300 const char *candidate = main_cmds.names[i]->name;
301
823e0de help_unknown_cmd: do not propose an "unknown" cmd
Michael Schubert authored
302 /*
303 * An exact match means we have the command, but
304 * for some reason exec'ing it gave us ENOENT; probably
305 * it's a bad interpreter in the #! line.
306 */
307 if (!strcmp(candidate, cmd))
308 die(_(bad_interpreter_advice), cmd, cmd);
309
6612b9e @kusma help: always suggest common-cmds if prefix of cmd
kusma authored
310 /* Does the candidate appear in common_cmds list? */
311 while (n < ARRAY_SIZE(common_cmds) &&
312 (cmp = strcmp(common_cmds[n].name, candidate)) < 0)
313 n++;
314 if ((n < ARRAY_SIZE(common_cmds)) && !cmp) {
315 /* Yes, this is one of the common commands */
316 n++; /* use the entry from common_cmds[] */
317 if (!prefixcmp(candidate, cmd)) {
318 /* Give prefix match a very good score */
319 main_cmds.names[i]->len = 0;
320 continue;
321 }
322 }
323
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
324 main_cmds.names[i]->len =
c41494f @moy Reduce cost of deletion in levenstein distance (4 -> 3)
moy authored
325 levenshtein(cmd, candidate, 0, 2, 1, 3) + 1;
6612b9e @kusma help: always suggest common-cmds if prefix of cmd
kusma authored
326 }
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
327
328 qsort(main_cmds.names, main_cmds.cnt,
329 sizeof(*main_cmds.names), levenshtein_compare);
330
331 if (!main_cmds.cnt)
9665627 @pclouds i18n: help: mark strings for translation
pclouds authored
332 die(_("Uh oh. Your system reports no Git commands at all."));
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
333
6612b9e @kusma help: always suggest common-cmds if prefix of cmd
kusma authored
334 /* skip and count prefix matches */
335 for (n = 0; n < main_cmds.cnt && !main_cmds.names[n]->len; n++)
336 ; /* still counting */
337
338 if (main_cmds.cnt <= n) {
339 /* prefix matches with everything? that is too ambiguous */
340 best_similarity = SIMILARITY_FLOOR + 1;
341 } else {
342 /* count all the most similar ones */
343 for (best_similarity = main_cmds.names[n++]->len;
344 (n < main_cmds.cnt &&
345 best_similarity == main_cmds.names[n]->len);
346 n++)
347 ; /* still counting */
348 }
06500a0 help.autocorrect: do not run a command if the command given is junk
Johannes Sixt authored
349 if (autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
350 const char *assumed = main_cmds.names[0]->name;
351 main_cmds.names[0] = NULL;
352 clean_cmdnames(&main_cmds);
9665627 @pclouds i18n: help: mark strings for translation
pclouds authored
353 fprintf_ln(stderr,
354 _("WARNING: You called a Git command named '%s', "
355 "which does not exist.\n"
356 "Continuing under the assumption that you meant '%s'"),
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
357 cmd, assumed);
f0e9071 @raalkml Add help.autocorrect to enable/disable autocorrecting
raalkml authored
358 if (autocorrect > 0) {
9665627 @pclouds i18n: help: mark strings for translation
pclouds authored
359 fprintf_ln(stderr, _("in %0.1f seconds automatically..."),
f0e9071 @raalkml Add help.autocorrect to enable/disable autocorrecting
raalkml authored
360 (float)autocorrect/10.0);
361 poll(NULL, 0, autocorrect * 100);
362 }
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
363 return assumed;
364 }
365
9665627 @pclouds i18n: help: mark strings for translation
pclouds authored
366 fprintf_ln(stderr, _("git: '%s' is not a git command. See 'git --help'."), cmd);
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
367
06500a0 help.autocorrect: do not run a command if the command given is junk
Johannes Sixt authored
368 if (SIMILAR_ENOUGH(best_similarity)) {
9665627 @pclouds i18n: help: mark strings for translation
pclouds authored
369 fprintf_ln(stderr,
370 Q_("\nDid you mean this?",
371 "\nDid you mean one of these?",
372 n));
8af84da @dscho git wrapper: DWIM mistyped commands
dscho authored
373
374 for (i = 0; i < n; i++)
375 fprintf(stderr, "\t%s\n", main_cmds.names[i]->name);
376 }
377
822a7d5 Remove cmd_usage() routine and re-organize the help/usage code.
Ramsay Allan Jones authored
378 exit(1);
379 }
380
a633fca Call setup_git_directory() much earlier
Linus Torvalds authored
381 int cmd_version(int argc, const char **argv, const char *prefix)
70827b1 Split up builtin commands into separate files from git.c
Linus Torvalds authored
382 {
383 printf("git version %s\n", git_version_string);
384 return 0;
385 }
Something went wrong with that request. Please try again.