Problem with cg-update and deleted files
Hi Petr,
with the latest cg-update and pulling the linux-2.6 repository I saw problems with deleted files:
Applying changes...
Fast-forwarding 37e0915b701281182cea9fc90e894d10addf134a -> 5e485b7975472ba4a408523deb6541e70c451842
on top of 37e0915b701281182cea9fc90e894d10addf134a...
rm: cannot remove `:100644 000000 057cc3f8ff378c0de881482d55b47255e3c5ea72 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 d1352120acd7ef7853041098bf12ae79a8ac1e0a 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 abdb015a4d71036eb7305e18b606151eb35fb810 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 fc568af468b9482b9e09cc618d726ece226cb9db 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 cb90681e151cd510825dd8f7ca555ad8e0be137f 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 c91976274e7b007b78269e40fd8b354a4e888b86 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 57d03d9178f611f73079d6a83af0302f9c33dc3c 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 a7ffd9c45a2c272594a0be593cdaa467ce7abf5e 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 98fa3f7a9eff4721531ca060cee5961f7fba0100 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 5b2aacdefa6cb7db6d3aa87194f210d5fcb87974 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory
rm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory
Regards
Marcel
[PATH] cg-Xlib: Fix problem with cg-update and deleted files
Marcel Holtmann <[email protected]> wrote Mon, May 30, 2005:
Quoted 2 lines
with the latest cg-update and pulling the linux-2.6 repository I saw problems with deleted files:
Update tree_timewarp()s git-diff-tree logic to handle the diff-format header and file both being NUL separated.
---
I've only tested it in a small test script ...
cg-Xlib +8 -3
@@ -73,10 +73,15 @@ tree_timewarp () { echo "$branch" > $_git/HEAD # Kill gone files - git-diff-tree -z -r $base $branch | egrep -z '^:([^ ][^ ]* ){4}D' | xargs -0 bash -c ' + git-diff-tree -r $base $branch | xargs -0 bash -c ' while [ "$1" ]; do - rm -- "$(echo "$1" | cut -f 2)" - shift + header="$1"; shift + file="$1"; shift + + # match ":100755 000000 14d43b1abf... 000000000... D" + if echo "$header" | egrep "^:([^ ][^ ]* ){4}D" >/dev/null; then + rm -- "$file" + fi done ' padding git-checkout-cache -f -a
Signature · 1 line
Jonas Fonseca
Re: [PATH] cg-Xlib: Fix problem with cg-update and deleted files
Jonas Fonseca <[email protected]> wrote Mon, May 30, 2005:
Quoted 5 lines
Marcel Holtmann <[email protected]> wrote Mon, May 30, 2005:
Quoted 2 lines
with the latest cg-update and pulling the linux-2.6 repository I saw problems with deleted files:
I've only tested it in a small test script ...
... which of course is no the best thing. Here's one with -z option.
Update tree_timewarp()s git-diff-tree logic to handle the diff-format header and file both being NUL separated.
---
cg-Xlib +8 -3
@@ -73,10 +73,15 @@ tree_timewarp () { echo "$branch" > $_git/HEAD # Kill gone files - git-diff-tree -z -r $base $branch | egrep -z '^:([^ ][^ ]* ){4}D' | xargs -0 bash -c ' + git-diff-tree -z -r $base $branch | xargs -0 bash -c ' while [ "$1" ]; do - rm -- "$(echo "$1" | cut -f 2)" - shift + header="$1"; shift + file="$1"; shift + + # match ":100755 000000 14d43b1abf... 000000000... D" + if echo "$header" | egrep "^:([^ ][^ ]* ){4}D" >/dev/null; then + rm -- "$file" + fi done ' padding git-checkout-cache -f -a
Signature · 1 line
Jonas Fonseca