1. Stefan Saasen
  2. git


Johannes Schindelin  committed 87c8a56

fast-import: close pack before unlinking it

This is sort of a companion patch to 4723ee9(Close files opened by
lock_file() before unlinking.): on Windows, you cannot delete what
is still open.

This makes test 9300-fast-import pass on Windows for me; quite a few
fast-imports leave temporary packs until the test "blank lines not
necessary after other commands" actually tests for the number of files
in .git/objects/pack/, which has a few temporary packs now.

I guess that 8b4eb6b(Do not perform cross-directory renames when
creating packs) was "responsible" for the breakage.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

  • Participants
  • Parent commits a833502
  • Branches master

Comments (0)

Files changed (1)

File fast-import.c

View file
  • Ignore whitespace
-	else
+	else {
+		close(old_p->pack_fd);
+	}
 	/* We can't carry a delta across packfiles. */