author | Jonathan Nieder <jrnieder@gmail.com> | |
Thu, 27 Jan 2011 06:07:49 +0000 (00:07 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 27 Jan 2011 18:22:37 +0000 (10:22 -0800) | ||
commit | 8fe533f686e20852fa9bd2df2755faed7c7bcdcc | |
tree | 7178c7f14de671bd9cdc8ee626962f96b74f5026 | tree | snapshot |
parent | 334fba656b50c92345586970bc6b100a449e1fc5 | commit | diff |
fast-import: treat filemodify with empty tree as delete
Normal git processes do not allow one to build a tree with an empty
subtree entry without trying hard at it. This is in keeping with the
general UI philosophy: git tracks content, not empty directories.
v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include
an empty subtree in fast-import's active commit:
M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir
One can trigger this by reading an empty tree (for example, the tree
corresponding to an empty root commit) and trying to move it to a
subtree. It is better and more closely analogous to 'git read-tree
--prefix' to treat such commands as requests to remove the subtree.
Noticed-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Normal git processes do not allow one to build a tree with an empty
subtree entry without trying hard at it. This is in keeping with the
general UI philosophy: git tracks content, not empty directories.
v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include
an empty subtree in fast-import's active commit:
M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir
One can trigger this by reading an empty tree (for example, the tree
corresponding to an empty root commit) and trying to move it to a
subtree. It is better and more closely analogous to 'git read-tree
--prefix' to treat such commands as requests to remove the subtree.
Noticed-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c | diff | blob | history | |
t/t9300-fast-import.sh | diff | blob | history |