Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-06-09 04:06:30 +0300
committerJunio C Hamano <gitster@pobox.com>2020-06-09 04:06:30 +0300
commitded44afa023c981d803b56f42284ed0597a174ee (patch)
treec8ae180f8155772f3d476598564cd901cc2a9e61 /builtin/checkout.c
parenta8ecd0190d743f19d20917197f95317955354941 (diff)
parent8d3e33dadd359495e43cb65dfadd775987e3da26 (diff)
Merge branch 'bc/filter-process'
Code simplification and test coverage enhancement. * bc/filter-process: t2060: add a test for switch with --orphan and --discard-changes builtin/checkout: simplify metadata initialization
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 24336e10173..af849c644fe 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -621,9 +621,7 @@ static int reset_tree(struct tree *tree, const struct checkout_opts *o,
opts.src_index = &the_index;
opts.dst_index = &the_index;
init_checkout_metadata(&opts.meta, info->refname,
- info->commit ? &info->commit->object.oid :
- is_null_oid(&info->oid) ? &tree->object.oid :
- &info->oid,
+ info->commit ? &info->commit->object.oid : &null_oid,
NULL);
parse_tree(tree);
init_tree_desc(&tree_desc, tree->buffer, tree->size);