author | Linus Torvalds <torvalds@linux-foundation.org> | |
Tue, 10 Jun 2008 17:44:43 +0000 (10:44 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 19 Jun 2008 21:14:45 +0000 (14:14 -0700) | ||
commit | f49c2c22fef520fd69ff26869c26dc58a834de2c | |
tree | 56845e698524d15a6a51bcc1a83295059c376be8 | tree | snapshot |
parent | 4afbcab9898ce63ad641dd0de6e9b69deda44330 | commit | diff |
racy-git: an empty blob has a fixed object name
We use size=0 as the magic token to say the entry is known to be racily
clean, but a sequence that does:
- update the path with a non-empty blob and write the index;
- update an unrelated path and write the index -- this smudges
the above entry;
- truncate the path to size zero.
would make both the size field for the path in the index and the size on
the filesystem zero. We should not mistake it as a clean index entry.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We use size=0 as the magic token to say the entry is known to be racily
clean, but a sequence that does:
- update the path with a non-empty blob and write the index;
- update an unrelated path and write the index -- this smudges
the above entry;
- truncate the path to size zero.
would make both the size field for the path in the index and the size on
the filesystem zero. We should not mistake it as a clean index entry.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c | diff | blob | history |