]>
Commit | Line | Data |
---|---|---|
c31820c2 LH |
1 | /* |
2 | * Builtin "git branch" | |
3 | * | |
d972cce0 | 4 | * Copyright (c) 2006 Kristian Høgsberg <krh@redhat.com> |
c31820c2 LH |
5 | * Based on git-branch.sh by Junio C Hamano. |
6 | */ | |
7 | ||
8 | #include "cache.h" | |
85023577 | 9 | #include "color.h" |
c31820c2 LH |
10 | #include "refs.h" |
11 | #include "commit.h" | |
12 | #include "builtin.h" | |
6f084a56 | 13 | #include "remote.h" |
a8dfd5ea | 14 | #include "parse-options.h" |
e496c003 | 15 | #include "branch.h" |
a8dfd5ea PH |
16 | |
17 | static const char * const builtin_branch_usage[] = { | |
18 | "git-branch [options] [-r | -a]", | |
19 | "git-branch [options] [-l] [-f] <branchname> [<start-point>]", | |
20 | "git-branch [options] [-r] (-d | -D) <branchname>", | |
21 | "git-branch [options] (-m | -M) [<oldbranch>] <newbranch>", | |
22 | NULL | |
23 | }; | |
c31820c2 | 24 | |
f3d985c3 JH |
25 | #define REF_UNKNOWN_TYPE 0x00 |
26 | #define REF_LOCAL_BRANCH 0x01 | |
27 | #define REF_REMOTE_BRANCH 0x02 | |
28 | #define REF_TAG 0x04 | |
c31820c2 LH |
29 | |
30 | static const char *head; | |
31 | static unsigned char head_sha1[20]; | |
32 | ||
6b2f2d98 | 33 | static int branch_use_color = -1; |
a1158cae AP |
34 | static char branch_colors[][COLOR_MAXLEN] = { |
35 | "\033[m", /* reset */ | |
36 | "", /* PLAIN (normal) */ | |
37 | "\033[31m", /* REMOTE (red) */ | |
753f96a4 JH |
38 | "", /* LOCAL (normal) */ |
39 | "\033[32m", /* CURRENT (green) */ | |
a1158cae AP |
40 | }; |
41 | enum color_branch { | |
42 | COLOR_BRANCH_RESET = 0, | |
43 | COLOR_BRANCH_PLAIN = 1, | |
44 | COLOR_BRANCH_REMOTE = 2, | |
45 | COLOR_BRANCH_LOCAL = 3, | |
46 | COLOR_BRANCH_CURRENT = 4, | |
47 | }; | |
48 | ||
49 | static int parse_branch_color_slot(const char *var, int ofs) | |
50 | { | |
51 | if (!strcasecmp(var+ofs, "plain")) | |
52 | return COLOR_BRANCH_PLAIN; | |
53 | if (!strcasecmp(var+ofs, "reset")) | |
54 | return COLOR_BRANCH_RESET; | |
55 | if (!strcasecmp(var+ofs, "remote")) | |
56 | return COLOR_BRANCH_REMOTE; | |
57 | if (!strcasecmp(var+ofs, "local")) | |
58 | return COLOR_BRANCH_LOCAL; | |
59 | if (!strcasecmp(var+ofs, "current")) | |
60 | return COLOR_BRANCH_CURRENT; | |
61 | die("bad config variable '%s'", var); | |
62 | } | |
63 | ||
52fae7de | 64 | static int git_branch_config(const char *var, const char *value) |
a1158cae AP |
65 | { |
66 | if (!strcmp(var, "color.branch")) { | |
0f6f5a40 | 67 | branch_use_color = git_config_colorbool(var, value, -1); |
a1158cae AP |
68 | return 0; |
69 | } | |
cc44c765 | 70 | if (!prefixcmp(var, "color.branch.")) { |
a1158cae | 71 | int slot = parse_branch_color_slot(var, 13); |
5768c98a JH |
72 | if (!value) |
73 | return config_error_nonbool(var); | |
a1158cae AP |
74 | color_parse(value, var, branch_colors[slot]); |
75 | return 0; | |
76 | } | |
6b2f2d98 | 77 | return git_color_default_config(var, value); |
a1158cae AP |
78 | } |
79 | ||
52fae7de | 80 | static const char *branch_get_color(enum color_branch ix) |
a1158cae | 81 | { |
6b2f2d98 | 82 | if (branch_use_color > 0) |
a1158cae AP |
83 | return branch_colors[ix]; |
84 | return ""; | |
85 | } | |
86 | ||
b8e9a00d | 87 | static int delete_branches(int argc, const char **argv, int force, int kinds) |
c31820c2 | 88 | { |
67affd51 | 89 | struct commit *rev, *head_rev = head_rev; |
c31820c2 | 90 | unsigned char sha1[20]; |
b8e9a00d | 91 | char *name = NULL; |
f3d985c3 | 92 | const char *fmt, *remote; |
f1eccbab | 93 | char section[PATH_MAX]; |
c31820c2 | 94 | int i; |
b8e9a00d | 95 | int ret = 0; |
c31820c2 | 96 | |
f3d985c3 JH |
97 | switch (kinds) { |
98 | case REF_REMOTE_BRANCH: | |
99 | fmt = "refs/remotes/%s"; | |
100 | remote = "remote "; | |
101 | force = 1; | |
102 | break; | |
103 | case REF_LOCAL_BRANCH: | |
104 | fmt = "refs/heads/%s"; | |
105 | remote = ""; | |
106 | break; | |
107 | default: | |
108 | die("cannot use -a with -d"); | |
109 | } | |
c31820c2 | 110 | |
67affd51 JH |
111 | if (!force) { |
112 | head_rev = lookup_commit_reference(head_sha1); | |
113 | if (!head_rev) | |
114 | die("Couldn't look up commit object for HEAD"); | |
115 | } | |
c31820c2 | 116 | for (i = 0; i < argc; i++) { |
b8e9a00d QT |
117 | if (kinds == REF_LOCAL_BRANCH && !strcmp(head, argv[i])) { |
118 | error("Cannot delete the branch '%s' " | |
119 | "which you are currently on.", argv[i]); | |
120 | ret = 1; | |
121 | continue; | |
122 | } | |
123 | ||
8e0f7003 | 124 | free(name); |
c31820c2 | 125 | |
f3d985c3 | 126 | name = xstrdup(mkpath(fmt, argv[i])); |
b8e9a00d QT |
127 | if (!resolve_ref(name, sha1, 1, NULL)) { |
128 | error("%sbranch '%s' not found.", | |
129 | remote, argv[i]); | |
130 | ret = 1; | |
131 | continue; | |
132 | } | |
c31820c2 LH |
133 | |
134 | rev = lookup_commit_reference(sha1); | |
b8e9a00d QT |
135 | if (!rev) { |
136 | error("Couldn't look up commit object for '%s'", name); | |
137 | ret = 1; | |
138 | continue; | |
139 | } | |
c31820c2 LH |
140 | |
141 | /* This checks whether the merge bases of branch and | |
142 | * HEAD contains branch -- which means that the HEAD | |
143 | * contains everything in both. | |
144 | */ | |
145 | ||
146 | if (!force && | |
03840fc3 | 147 | !in_merge_bases(rev, &head_rev, 1)) { |
00ae8289 | 148 | error("The branch '%s' is not an ancestor of " |
b8e9a00d QT |
149 | "your current HEAD.\n" |
150 | "If you are sure you want to delete it, " | |
151 | "run 'git branch -D %s'.", argv[i], argv[i]); | |
152 | ret = 1; | |
153 | continue; | |
c31820c2 LH |
154 | } |
155 | ||
b8e9a00d QT |
156 | if (delete_ref(name, sha1)) { |
157 | error("Error deleting %sbranch '%s'", remote, | |
f3d985c3 | 158 | argv[i]); |
b8e9a00d | 159 | ret = 1; |
f1eccbab | 160 | } else { |
f3d985c3 | 161 | printf("Deleted %sbranch %s.\n", remote, argv[i]); |
f1eccbab GP |
162 | snprintf(section, sizeof(section), "branch.%s", |
163 | argv[i]); | |
164 | if (git_config_rename_section(section, NULL) < 0) | |
165 | warning("Update of config-file failed"); | |
166 | } | |
c31820c2 | 167 | } |
c31820c2 | 168 | |
8e0f7003 | 169 | free(name); |
b8e9a00d QT |
170 | |
171 | return(ret); | |
c31820c2 | 172 | } |
c31820c2 | 173 | |
bfcc9214 AP |
174 | struct ref_item { |
175 | char *name; | |
176 | unsigned int kind; | |
75e6e213 | 177 | unsigned char sha1[20]; |
bfcc9214 AP |
178 | }; |
179 | ||
180 | struct ref_list { | |
75e6e213 | 181 | int index, alloc, maxwidth; |
bfcc9214 | 182 | struct ref_item *list; |
694a5775 | 183 | struct commit_list *with_commit; |
bfcc9214 AP |
184 | int kinds; |
185 | }; | |
186 | ||
694a5775 JH |
187 | static int has_commit(const unsigned char *sha1, struct commit_list *with_commit) |
188 | { | |
189 | struct commit *commit; | |
190 | ||
191 | if (!with_commit) | |
192 | return 1; | |
193 | commit = lookup_commit_reference_gently(sha1, 1); | |
194 | if (!commit) | |
195 | return 0; | |
196 | while (with_commit) { | |
197 | struct commit *other; | |
198 | ||
199 | other = with_commit->item; | |
200 | with_commit = with_commit->next; | |
201 | if (in_merge_bases(other, &commit, 1)) | |
202 | return 1; | |
203 | } | |
204 | return 0; | |
205 | } | |
206 | ||
bfcc9214 | 207 | static int append_ref(const char *refname, const unsigned char *sha1, int flags, void *cb_data) |
c31820c2 | 208 | { |
bfcc9214 AP |
209 | struct ref_list *ref_list = (struct ref_list*)(cb_data); |
210 | struct ref_item *newitem; | |
211 | int kind = REF_UNKNOWN_TYPE; | |
75e6e213 | 212 | int len; |
bfcc9214 AP |
213 | |
214 | /* Detect kind */ | |
cc44c765 | 215 | if (!prefixcmp(refname, "refs/heads/")) { |
bfcc9214 AP |
216 | kind = REF_LOCAL_BRANCH; |
217 | refname += 11; | |
cc44c765 | 218 | } else if (!prefixcmp(refname, "refs/remotes/")) { |
bfcc9214 AP |
219 | kind = REF_REMOTE_BRANCH; |
220 | refname += 13; | |
cc44c765 | 221 | } else if (!prefixcmp(refname, "refs/tags/")) { |
bfcc9214 AP |
222 | kind = REF_TAG; |
223 | refname += 10; | |
224 | } | |
225 | ||
694a5775 JH |
226 | /* Filter with with_commit if specified */ |
227 | if (!has_commit(sha1, ref_list->with_commit)) | |
228 | return 0; | |
229 | ||
bfcc9214 AP |
230 | /* Don't add types the caller doesn't want */ |
231 | if ((kind & ref_list->kinds) == 0) | |
232 | return 0; | |
233 | ||
234 | /* Resize buffer */ | |
235 | if (ref_list->index >= ref_list->alloc) { | |
236 | ref_list->alloc = alloc_nr(ref_list->alloc); | |
237 | ref_list->list = xrealloc(ref_list->list, | |
238 | ref_list->alloc * sizeof(struct ref_item)); | |
c31820c2 LH |
239 | } |
240 | ||
bfcc9214 AP |
241 | /* Record the new item */ |
242 | newitem = &(ref_list->list[ref_list->index++]); | |
243 | newitem->name = xstrdup(refname); | |
244 | newitem->kind = kind; | |
75e6e213 LH |
245 | hashcpy(newitem->sha1, sha1); |
246 | len = strlen(newitem->name); | |
247 | if (len > ref_list->maxwidth) | |
248 | ref_list->maxwidth = len; | |
c31820c2 LH |
249 | |
250 | return 0; | |
251 | } | |
252 | ||
bfcc9214 AP |
253 | static void free_ref_list(struct ref_list *ref_list) |
254 | { | |
255 | int i; | |
256 | ||
257 | for (i = 0; i < ref_list->index; i++) | |
258 | free(ref_list->list[i].name); | |
259 | free(ref_list->list); | |
260 | } | |
261 | ||
c31820c2 LH |
262 | static int ref_cmp(const void *r1, const void *r2) |
263 | { | |
bfcc9214 AP |
264 | struct ref_item *c1 = (struct ref_item *)(r1); |
265 | struct ref_item *c2 = (struct ref_item *)(r2); | |
266 | ||
267 | if (c1->kind != c2->kind) | |
268 | return c1->kind - c2->kind; | |
269 | return strcmp(c1->name, c2->name); | |
c31820c2 LH |
270 | } |
271 | ||
af0e4ac0 LH |
272 | static void print_ref_item(struct ref_item *item, int maxwidth, int verbose, |
273 | int abbrev, int current) | |
75e6e213 | 274 | { |
af0e4ac0 LH |
275 | char c; |
276 | int color; | |
75e6e213 | 277 | struct commit *commit; |
75e6e213 | 278 | |
af0e4ac0 LH |
279 | switch (item->kind) { |
280 | case REF_LOCAL_BRANCH: | |
281 | color = COLOR_BRANCH_LOCAL; | |
282 | break; | |
283 | case REF_REMOTE_BRANCH: | |
284 | color = COLOR_BRANCH_REMOTE; | |
285 | break; | |
286 | default: | |
287 | color = COLOR_BRANCH_PLAIN; | |
288 | break; | |
289 | } | |
75e6e213 | 290 | |
af0e4ac0 LH |
291 | c = ' '; |
292 | if (current) { | |
293 | c = '*'; | |
294 | color = COLOR_BRANCH_CURRENT; | |
295 | } | |
75e6e213 | 296 | |
af0e4ac0 | 297 | if (verbose) { |
674d1727 | 298 | struct strbuf subject; |
80583c0e JH |
299 | const char *sub = " **** invalid ref ****"; |
300 | ||
674d1727 PH |
301 | strbuf_init(&subject, 0); |
302 | ||
af0e4ac0 | 303 | commit = lookup_commit(item->sha1); |
80583c0e | 304 | if (commit && !parse_commit(commit)) { |
674d1727 | 305 | pretty_print_commit(CMIT_FMT_ONELINE, commit, |
4593fb84 | 306 | &subject, 0, NULL, NULL, 0, 0); |
674d1727 | 307 | sub = subject.buf; |
80583c0e | 308 | } |
af0e4ac0 LH |
309 | printf("%c %s%-*s%s %s %s\n", c, branch_get_color(color), |
310 | maxwidth, item->name, | |
311 | branch_get_color(COLOR_BRANCH_RESET), | |
80583c0e | 312 | find_unique_abbrev(item->sha1, abbrev), sub); |
674d1727 | 313 | strbuf_release(&subject); |
af0e4ac0 LH |
314 | } else { |
315 | printf("%c %s%s%s\n", c, branch_get_color(color), item->name, | |
316 | branch_get_color(COLOR_BRANCH_RESET)); | |
317 | } | |
75e6e213 LH |
318 | } |
319 | ||
694a5775 | 320 | static void print_ref_list(int kinds, int detached, int verbose, int abbrev, struct commit_list *with_commit) |
c31820c2 LH |
321 | { |
322 | int i; | |
bfcc9214 | 323 | struct ref_list ref_list; |
c31820c2 | 324 | |
bfcc9214 AP |
325 | memset(&ref_list, 0, sizeof(ref_list)); |
326 | ref_list.kinds = kinds; | |
694a5775 | 327 | ref_list.with_commit = with_commit; |
bfcc9214 | 328 | for_each_ref(append_ref, &ref_list); |
c31820c2 | 329 | |
bfcc9214 | 330 | qsort(ref_list.list, ref_list.index, sizeof(struct ref_item), ref_cmp); |
c31820c2 | 331 | |
0016a482 | 332 | detached = (detached && (kinds & REF_LOCAL_BRANCH)); |
694a5775 | 333 | if (detached && has_commit(head_sha1, with_commit)) { |
0016a482 | 334 | struct ref_item item; |
3a55602e | 335 | item.name = xstrdup("(no branch)"); |
0016a482 LH |
336 | item.kind = REF_LOCAL_BRANCH; |
337 | hashcpy(item.sha1, head_sha1); | |
338 | if (strlen(item.name) > ref_list.maxwidth) | |
339 | ref_list.maxwidth = strlen(item.name); | |
340 | print_ref_item(&item, ref_list.maxwidth, verbose, abbrev, 1); | |
3a55602e | 341 | free(item.name); |
0016a482 LH |
342 | } |
343 | ||
bfcc9214 | 344 | for (i = 0; i < ref_list.index; i++) { |
0016a482 LH |
345 | int current = !detached && |
346 | (ref_list.list[i].kind == REF_LOCAL_BRANCH) && | |
af0e4ac0 LH |
347 | !strcmp(ref_list.list[i].name, head); |
348 | print_ref_item(&ref_list.list[i], ref_list.maxwidth, verbose, | |
349 | abbrev, current); | |
c31820c2 | 350 | } |
bfcc9214 AP |
351 | |
352 | free_ref_list(&ref_list); | |
c31820c2 LH |
353 | } |
354 | ||
c976d415 LH |
355 | static void rename_branch(const char *oldname, const char *newname, int force) |
356 | { | |
678d0f4c | 357 | char oldref[PATH_MAX], newref[PATH_MAX], logmsg[PATH_MAX*2 + 100]; |
c976d415 | 358 | unsigned char sha1[20]; |
19eba151 | 359 | char oldsection[PATH_MAX], newsection[PATH_MAX]; |
c976d415 | 360 | |
c847f537 | 361 | if (!oldname) |
3dff5379 | 362 | die("cannot rename the current branch while not on any."); |
c847f537 | 363 | |
c976d415 LH |
364 | if (snprintf(oldref, sizeof(oldref), "refs/heads/%s", oldname) > sizeof(oldref)) |
365 | die("Old branchname too long"); | |
366 | ||
367 | if (check_ref_format(oldref)) | |
368 | die("Invalid branch name: %s", oldref); | |
369 | ||
370 | if (snprintf(newref, sizeof(newref), "refs/heads/%s", newname) > sizeof(newref)) | |
371 | die("New branchname too long"); | |
372 | ||
373 | if (check_ref_format(newref)) | |
374 | die("Invalid branch name: %s", newref); | |
375 | ||
376 | if (resolve_ref(newref, sha1, 1, NULL) && !force) | |
377 | die("A branch named '%s' already exists.", newname); | |
378 | ||
678d0f4c LH |
379 | snprintf(logmsg, sizeof(logmsg), "Branch: renamed %s to %s", |
380 | oldref, newref); | |
381 | ||
382 | if (rename_ref(oldref, newref, logmsg)) | |
c976d415 LH |
383 | die("Branch rename failed"); |
384 | ||
8b5157e4 NP |
385 | /* no need to pass logmsg here as HEAD didn't really move */ |
386 | if (!strcmp(oldname, head) && create_symref("HEAD", newref, NULL)) | |
c976d415 | 387 | die("Branch renamed to %s, but HEAD is not updated!", newname); |
19eba151 LH |
388 | |
389 | snprintf(oldsection, sizeof(oldsection), "branch.%s", oldref + 11); | |
390 | snprintf(newsection, sizeof(newsection), "branch.%s", newref + 11); | |
391 | if (git_config_rename_section(oldsection, newsection) < 0) | |
392 | die("Branch is renamed, but update of config-file failed"); | |
c976d415 LH |
393 | } |
394 | ||
694a5775 JH |
395 | static int opt_parse_with_commit(const struct option *opt, const char *arg, int unset) |
396 | { | |
397 | unsigned char sha1[20]; | |
398 | struct commit *commit; | |
399 | ||
400 | if (!arg) | |
401 | return -1; | |
402 | if (get_sha1(arg, sha1)) | |
403 | die("malformed object name %s", arg); | |
404 | commit = lookup_commit_reference(sha1); | |
405 | if (!commit) | |
406 | die("no such commit %s", arg); | |
407 | commit_list_insert(commit, opt->value); | |
408 | return 0; | |
409 | } | |
410 | ||
c31820c2 LH |
411 | int cmd_branch(int argc, const char **argv, const char *prefix) |
412 | { | |
d11d44fa | 413 | int delete = 0, rename = 0, force_create = 0; |
0016a482 | 414 | int verbose = 0, abbrev = DEFAULT_ABBREV, detached = 0; |
9ed36cfa JS |
415 | int reflog = 0; |
416 | enum branch_track track; | |
d11d44fa | 417 | int kinds = REF_LOCAL_BRANCH; |
694a5775 | 418 | struct commit_list *with_commit = NULL; |
a8dfd5ea PH |
419 | |
420 | struct option options[] = { | |
421 | OPT_GROUP("Generic options"), | |
422 | OPT__VERBOSE(&verbose), | |
9ed36cfa JS |
423 | OPT_SET_INT( 0 , "track", &track, "set up tracking mode (see git-pull(1))", |
424 | BRANCH_TRACK_EXPLICIT), | |
a8dfd5ea | 425 | OPT_BOOLEAN( 0 , "color", &branch_use_color, "use colored output"), |
d11d44fa PH |
426 | OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches", |
427 | REF_REMOTE_BRANCH), | |
694a5775 JH |
428 | OPT_CALLBACK(0, "contains", &with_commit, "commit", |
429 | "print only branches that contain the commit", | |
430 | opt_parse_with_commit), | |
431 | { | |
432 | OPTION_CALLBACK, 0, "with", &with_commit, "commit", | |
433 | "print only branches that contain the commit", | |
434 | PARSE_OPT_HIDDEN, opt_parse_with_commit, | |
435 | }, | |
a8dfd5ea PH |
436 | OPT__ABBREV(&abbrev), |
437 | ||
438 | OPT_GROUP("Specific git-branch actions:"), | |
d11d44fa PH |
439 | OPT_SET_INT('a', NULL, &kinds, "list both remote-tracking and local branches", |
440 | REF_REMOTE_BRANCH | REF_LOCAL_BRANCH), | |
441 | OPT_BIT('d', NULL, &delete, "delete fully merged branch", 1), | |
442 | OPT_BIT('D', NULL, &delete, "delete branch (even if not merged)", 2), | |
443 | OPT_BIT('m', NULL, &rename, "move/rename a branch and its reflog", 1), | |
444 | OPT_BIT('M', NULL, &rename, "move/rename a branch, even if target exists", 2), | |
445 | OPT_BOOLEAN('l', NULL, &reflog, "create the branch's reflog"), | |
446 | OPT_BOOLEAN('f', NULL, &force_create, "force creation (when already exists)"), | |
a8dfd5ea PH |
447 | OPT_END(), |
448 | }; | |
c31820c2 | 449 | |
a1158cae | 450 | git_config(git_branch_config); |
6b2f2d98 MK |
451 | |
452 | if (branch_use_color == -1) | |
453 | branch_use_color = git_use_color_default; | |
454 | ||
9ed36cfa | 455 | track = git_branch_track; |
a8dfd5ea | 456 | argc = parse_options(argc, argv, options, builtin_branch_usage, 0); |
d11d44fa | 457 | if (!!delete + !!rename + !!force_create > 1) |
a8dfd5ea | 458 | usage_with_options(builtin_branch_usage, options); |
c976d415 | 459 | |
078f8380 | 460 | head = resolve_ref("HEAD", head_sha1, 0, NULL); |
c31820c2 LH |
461 | if (!head) |
462 | die("Failed to resolve HEAD as a valid ref."); | |
078f8380 | 463 | head = xstrdup(head); |
0016a482 LH |
464 | if (!strcmp(head, "HEAD")) { |
465 | detached = 1; | |
a8dfd5ea | 466 | } else { |
cc44c765 | 467 | if (prefixcmp(head, "refs/heads/")) |
0016a482 LH |
468 | die("HEAD not found below refs/heads!"); |
469 | head += 11; | |
470 | } | |
c31820c2 LH |
471 | |
472 | if (delete) | |
d11d44fa | 473 | return delete_branches(argc, argv, delete > 1, kinds); |
a8dfd5ea | 474 | else if (argc == 0) |
694a5775 | 475 | print_ref_list(kinds, detached, verbose, abbrev, with_commit); |
a8dfd5ea | 476 | else if (rename && (argc == 1)) |
d11d44fa | 477 | rename_branch(head, argv[0], rename > 1); |
a8dfd5ea | 478 | else if (rename && (argc == 2)) |
d11d44fa | 479 | rename_branch(argv[0], argv[1], rename > 1); |
a8dfd5ea | 480 | else if (argc <= 2) |
e496c003 | 481 | create_branch(head, argv[0], (argc == 2) ? argv[1] : head, |
45994a1e | 482 | force_create, reflog, track); |
c31820c2 | 483 | else |
a8dfd5ea | 484 | usage_with_options(builtin_branch_usage, options); |
c31820c2 LH |
485 | |
486 | return 0; | |
487 | } |