diff options
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index d3fc3a8..c4db4ca 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -651,10 +651,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts, } } if (old->path && old->name) { - char ref_file[PATH_MAX]; - - git_snpath(ref_file, sizeof(ref_file), "%s", old->path); - if (!file_exists(ref_file) && reflog_exists(old->path)) + if (!ref_exists(old->path) && reflog_exists(old->path)) delete_reflog(old->path); } } |