diff options
author | Jeff King <peff@peff.net> | 2023-03-04 13:31:47 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-07 00:14:53 +0300 |
commit | 0bbe10313e0b61812082d47431e8648f9df48f15 (patch) | |
tree | c56d06405d815384d18ddf37cf28ff11420432cc /parse-options.c | |
parent | 7ce4088ab78e06fc5c4ae42fc75b65a48bf7b3ff (diff) |
parse-options: use prefix_filename_except_for_dash() helper
Since our fix_filename()'s only remaining special case is handling "-",
we can use the newly-minted helper function that handles this already.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
-rw-r--r-- | parse-options.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/parse-options.c b/parse-options.c index 70f827a073..46fe30ddd4 100644 --- a/parse-options.c +++ b/parse-options.c @@ -63,10 +63,8 @@ static void fix_filename(const char *prefix, char **file) { if (!file || !*file) ; /* leave as NULL */ - else if (!strcmp("-", *file)) - *file = xstrdup(*file); else - *file = prefix_filename(prefix, *file); + *file = prefix_filename_except_for_dash(prefix, *file); } static enum parse_opt_result opt_command_mode_error( |