#include "parse-options.h"
static const char* show_branch_usage[] = {
- N_("git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order]\n"
+ N_("git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"
" [--current] [--color[=<when>] | --no-color] [--sparse]\n"
" [--more=<n> | --list | --independent | --merge-base]\n"
" [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"),
- N_("git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]"),
+ N_("git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"),
NULL
};
if (reflog) {
unsigned char sha1[20];
+ char nth_desc[256];
char *ref;
int base = 0;
unsigned int flags = 0;
for (i = 0; i < reflog; i++) {
char *logmsg;
- char *nth_desc;
const char *msg;
unsigned long timestamp;
int tz;
show_date(timestamp, tz, 1),
msg);
free(logmsg);
-
- nth_desc = xstrfmt("%s@{%d}", *av, base+i);
+ sprintf(nth_desc, "%s@{%d}", *av, base+i);
append_ref(nth_desc, sha1, 1);
- free(nth_desc);
}
free(ref);
}