diff options
author | Martin von Zweigbergk <martinvonz@gmail.com> | 2013-01-14 21:47:35 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-15 09:38:07 -0800 |
commit | 18648e89e78662e3a6a9a38adfca3e6001cfaf85 (patch) | |
tree | 051e198d09c150b950045dccb189434e353cd1df /builtin/add.c | |
parent | reset $pathspec: exit with code 0 if successful (diff) | |
download | tgif-18648e89e78662e3a6a9a38adfca3e6001cfaf85.tar.xz |
reset.c: pass pathspec around instead of (prefix, argv) pair
We use the path arguments in two places in reset.c: in
interactive_reset() and read_from_tree(). Both of these call
get_pathspec(), so we pass the (prefix, argv) pair to both
functions. Move the call to get_pathspec() out of these methods, for
two reasons: 1) One argument is simpler than two. 2) It lets us use
the (arguably clearer) "if (pathspec)" in place of "if (i < argc)".
Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
0 files changed, 0 insertions, 0 deletions