* Add an entry to refs->cmdline with the specified information. * *name is copied. */
| 1519 | * *name is copied. |
| 1520 | */ |
| 1521 | static void add_rev_cmdline(struct rev_info *revs, |
| 1522 | struct object *item, |
| 1523 | const char *name, |
| 1524 | int whence, |
| 1525 | unsigned flags) |
| 1526 | { |
| 1527 | struct rev_cmdline_info *info = &revs->cmdline; |
| 1528 | unsigned int nr = info->nr; |
| 1529 | |
| 1530 | ALLOC_GROW(info->rev, nr + 1, info->alloc); |
| 1531 | info->rev[nr].item = item; |
| 1532 | info->rev[nr].name = xstrdup(name); |
| 1533 | info->rev[nr].whence = whence; |
| 1534 | info->rev[nr].flags = flags; |
| 1535 | info->nr++; |
| 1536 | } |
| 1537 | |
| 1538 | static void add_rev_cmdline_list(struct rev_info *revs, |
| 1539 | struct commit_list *commit_list, |
no test coverage detected