From: Johannes Schindelin <johannes.schindelin@xxxxxx> 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. To be able to do that, we just taught the regression test introduced in feea6946a5b (diff-files: treat "i-t-a" files as "not-in-index", 2020-06-20) to _not_ expect the raw diff to contain the hash of the empty tree (we also had to fix the code to actually produce the expected output, but for the sake of this here patch, that's beside the point). Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> --- diff-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-lib.c b/diff-lib.c index ea23169afa..7aafd7cc37 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -234,7 +234,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