From: Jonas Fonseca <fonseca@diku.dk>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Petr Baudis <pasky@ucw.cz>, GIT Mailing List <git@vger.kernel.org>
Subject: Re: [PATH] cg-Xlib: Fix problem with cg-update and deleted files
Date: Mon, 30 May 2005 18:43:39 +0200 [thread overview]
Message-ID: <20050530164339.GD28681@diku.dk> (raw)
In-Reply-To: <20050530163957.GC28681@diku.dk>
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
prev parent reply other threads:[~2005-05-30 16:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050530164339.GD28681@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).