git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with cg-update and deleted files
@ 2005-05-30 15:23 Marcel Holtmann
  2005-05-30 16:39 ` [PATH] cg-Xlib: Fix problem " Jonas Fonseca
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2005-05-30 15:23 UTC (permalink / raw)
  To: Petr Baudis; +Cc: GIT Mailing List

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATH] cg-Xlib: Fix problem with cg-update and deleted files
  2005-05-30 15:23 Problem with cg-update and deleted files Marcel Holtmann
@ 2005-05-30 16:39 ` Jonas Fonseca
  2005-05-30 16:43   ` Jonas Fonseca
  0 siblings, 1 reply; 3+ messages in thread
From: Jonas Fonseca @ 2005-05-30 16:39 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Petr Baudis, GIT Mailing List

Marcel Holtmann <marcel@holtmann.org> wrote Mon, May 30, 2005:
> 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.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---

I've only tested it in a small test script ...

diff --git a/cg-Xlib b/cg-Xlib
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -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
-- 
Jonas Fonseca

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATH] cg-Xlib: Fix problem with cg-update and deleted files
  2005-05-30 16:39 ` [PATH] cg-Xlib: Fix problem " Jonas Fonseca
@ 2005-05-30 16:43   ` Jonas Fonseca
  0 siblings, 0 replies; 3+ messages in thread
From: Jonas Fonseca @ 2005-05-30 16:43 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Petr Baudis, GIT Mailing List

Jonas Fonseca <fonseca@diku.dk> wrote Mon, May 30, 2005:
> Marcel Holtmann <marcel@holtmann.org> wrote Mon, May 30, 2005:
> > 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.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---

diff --git a/cg-Xlib b/cg-Xlib
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -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
-- 
Jonas Fonseca

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-30 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-30 15:23 Problem with cg-update and deleted files Marcel Holtmann
2005-05-30 16:39 ` [PATH] cg-Xlib: Fix problem " Jonas Fonseca
2005-05-30 16:43   ` Jonas Fonseca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).