[PATCH 1/3] diff-files: fix incorrect usage of an empty tree
- From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jun 11, 2020, 12:38 UTC
- Message-ID
- <9c96c43f3d744a0f4f312bb466eaf54d372a56fb.1591879139.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.654.git.1591879139.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
In c26022ea8f5 (diff: convert diff_addremove to struct object_id, 2017-05-30), the OID to use for intent-to-add files was inadvertently changed from the empty blob to the empty tree. Let's revert that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- diff-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diff-lib.c b/diff-lib.c index 61812f48c27..15bb45776e4 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -220,7 +220,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) } else if (revs->diffopt.ita_invisible_in_index && ce_intent_to_add(ce)) { diff_addremove(&revs->diffopt, '+', ce->ce_mode, - the_hash_algo->empty_tree, 0, + the_hash_algo->empty_blob, 0, ce->name, 0); continue; }
-- gitgitgadget