{"thread":{"id":"768","subject":"Problem with cg-update and deleted files","startedAt":"2005-05-30T15:23:20Z","lastAt":"2005-05-30T16:43:39Z","messageCount":3,"participants":["Marcel Holtmann","Jonas Fonseca"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4255","messageId":"1117466600.7072.188.camel@pegasus","threadId":"768","inReplyTo":null,"subject":"Problem with cg-update and deleted files","fromName":"Marcel Holtmann","fromEmail":"marcel@holtmann.org","sentAt":"2005-05-30T15:23:20Z","receivedAt":"2005-05-30T15:23:20Z","isPatch":false,"sender":{"key":"marcel@holtmann.org","avatar":null},"body":"Hi Petr,\n\nwith the latest cg-update and pulling the linux-2.6 repository I saw\nproblems with deleted files:\n\nApplying changes...\nFast-forwarding 37e0915b701281182cea9fc90e894d10addf134a -> 5e485b7975472ba4a408523deb6541e70c451842\n        on top of 37e0915b701281182cea9fc90e894d10addf134a...\nrm: cannot remove `:100644 000000 057cc3f8ff378c0de881482d55b47255e3c5ea72 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 d1352120acd7ef7853041098bf12ae79a8ac1e0a 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 abdb015a4d71036eb7305e18b606151eb35fb810 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 fc568af468b9482b9e09cc618d726ece226cb9db 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 cb90681e151cd510825dd8f7ca555ad8e0be137f 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 c91976274e7b007b78269e40fd8b354a4e888b86 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 57d03d9178f611f73079d6a83af0302f9c33dc3c 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 a7ffd9c45a2c272594a0be593cdaa467ce7abf5e 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 98fa3f7a9eff4721531ca060cee5961f7fba0100 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 5b2aacdefa6cb7db6d3aa87194f210d5fcb87974 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory\nrm: cannot remove `:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D': No such file or directory\n\nRegards\n\nMarcel\n\n\n"},{"id":"4256","messageId":"20050530163957.GC28681@diku.dk","threadId":"768","inReplyTo":"1117466600.7072.188.camel@pegasus","subject":"[PATH] cg-Xlib: Fix problem with cg-update and deleted files","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-05-30T16:39:57Z","receivedAt":"2005-05-30T16:39:57Z","isPatch":false,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Marcel Holtmann <marcel@holtmann.org> wrote Mon, May 30, 2005:\n> with the latest cg-update and pulling the linux-2.6 repository I saw\n> problems with deleted files:\n\nUpdate tree_timewarp()s git-diff-tree logic to handle the diff-format\nheader and file both being NUL separated.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n---\n\nI've only tested it in a small test script ...\n\ndiff --git a/cg-Xlib b/cg-Xlib\n--- a/cg-Xlib\n+++ b/cg-Xlib\n@@ -73,10 +73,15 @@ tree_timewarp () {\n \techo \"$branch\" > $_git/HEAD\n \n \t# Kill gone files\n-\tgit-diff-tree -z -r $base $branch | egrep -z '^:([^ ][^ ]* ){4}D' | xargs -0 bash -c '\n+\tgit-diff-tree -r $base $branch | xargs -0 bash -c '\n \t\twhile [ \"$1\" ]; do\n-\t\t\trm -- \"$(echo \"$1\" | cut -f 2)\"\n-\t\t\tshift\n+\t\t\theader=\"$1\"; shift\n+\t\t\tfile=\"$1\"; shift\n+\n+\t\t\t# match \":100755 000000 14d43b1abf... 000000000... D\"\n+\t\t\tif echo \"$header\" | egrep \"^:([^ ][^ ]* ){4}D\" >/dev/null; then\n+\t\t\t\trm -- \"$file\"\n+\t\t\tfi\n \t\tdone\n \t' padding\n \tgit-checkout-cache -f -a\n-- \nJonas Fonseca\n"},{"id":"4257","messageId":"20050530164339.GD28681@diku.dk","threadId":"768","inReplyTo":"20050530163957.GC28681@diku.dk","subject":"Re: [PATH] cg-Xlib: Fix problem with cg-update and deleted files","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-05-30T16:43:39Z","receivedAt":"2005-05-30T16:43:39Z","isPatch":false,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Jonas Fonseca <fonseca@diku.dk> wrote Mon, May 30, 2005:\n> Marcel Holtmann <marcel@holtmann.org> wrote Mon, May 30, 2005:\n> > with the latest cg-update and pulling the linux-2.6 repository I saw\n> > problems with deleted files:\n> \n> I've only tested it in a small test script ...\n\n... which of course is no the best thing. Here's one with -z option.\n\nUpdate tree_timewarp()s git-diff-tree logic to handle the diff-format\nheader and file both being NUL separated.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n---\n\ndiff --git a/cg-Xlib b/cg-Xlib\n--- a/cg-Xlib\n+++ b/cg-Xlib\n@@ -73,10 +73,15 @@ tree_timewarp () {\n \techo \"$branch\" > $_git/HEAD\n \n \t# Kill gone files\n-\tgit-diff-tree -z -r $base $branch | egrep -z '^:([^ ][^ ]* ){4}D' | xargs -0 bash -c '\n+\tgit-diff-tree -z -r $base $branch | xargs -0 bash -c '\n \t\twhile [ \"$1\" ]; do\n-\t\t\trm -- \"$(echo \"$1\" | cut -f 2)\"\n-\t\t\tshift\n+\t\t\theader=\"$1\"; shift\n+\t\t\tfile=\"$1\"; shift\n+\n+\t\t\t# match \":100755 000000 14d43b1abf... 000000000... D\"\n+\t\t\tif echo \"$header\" | egrep \"^:([^ ][^ ]* ){4}D\" >/dev/null; then\n+\t\t\t\trm -- \"$file\"\n+\t\t\tfi\n \t\tdone\n \t' padding\n \tgit-checkout-cache -f -a\n-- \nJonas Fonseca\n"}]}