Skip to content

Commit 0bbe103

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7ce4088 commit 0bbe103

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

parse-options.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ static void fix_filename(const char *prefix, char **file)
6363
{
6464
if (!file || !*file)
6565
; /* leave as NULL */
66-
else if (!strcmp("-", *file))
67-
*file = xstrdup(*file);
6866
else
69-
*file = prefix_filename(prefix, *file);
67+
*file = prefix_filename_except_for_dash(prefix, *file);
7068
}
7169

7270
static enum parse_opt_result opt_command_mode_error(

0 commit comments

Comments
 (0)