Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
builtin/apply: tighten (dis)similarity index parsing
[gitweb.git]
/
builtin
/
for-each-ref.c
diff --git
a/builtin/for-each-ref.c
b/builtin/for-each-ref.c
index b01d76a24323e86e9c9cbf1cd3adc9c0d1b2c6d8..0c5294e5e8fb92ca4757929a4bdf4bc49ca659bb 100644
(file)
--- a/
builtin/for-each-ref.c
+++ b/
builtin/for-each-ref.c
@@
-962,7
+962,9
@@
static int opt_parse_sort(const struct option *opt, const char *arg, int unset)
if (!arg) /* should --no-sort void the list ? */
return -1;
- *sort_tail = s = xcalloc(1, sizeof(*s));
+ s = xcalloc(1, sizeof(*s));
+ s->next = *sort_tail;
+ *sort_tail = s;
if (*arg == '-') {
s->reverse = 1;