* Petr Baudis ([EMAIL PROTECTED]) wrote:
> Ok, cg-pull didn't quite handle this. I've fixed it so that it should
> reasonably handle it now. Hopefully.
Is this plus the zero-sized fix worth making cogito-0.12-2 rpm release?
IOW, these two patches...
diff-tree 291ec0f2d2ce65e5ccb876b46d6468af49ddb82e (from
72347a233e6f3c176059a28f0817de6654ef29c7)
tree a1d3a4e01516f1d924c407a9e42a6df0d13b43b6
parent 72347a233e6f3c176059a28f0817de6654ef29c7
author Linus Torvalds <[EMAIL PROTECTED]> 1120608369 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> 1120608369 -0700
Don't special-case a zero-sized compression.
zlib actually writes a header for that case, and while ignoring that
header will get us the right data, it will also end up messing up our
stream position. So we actually want zlib to "uncompress" even an empty
object.
diff --git a/unpack-objects.c b/unpack-objects.c
--- a/unpack-objects.c
+++ b/unpack-objects.c
@@ -55,8 +55,6 @@ static void *get_data(unsigned long size
z_stream stream;
void *buf = xmalloc(size);
- if (!size)
- return buf;
memset(&stream, 0, sizeof(stream));
stream.next_out = buf;
diff-tree 7b754d7f0800117cd97afa5e806e50c7fd16d8c1 (from
a2503fd85e6bb7f25d134a5634a1d8efc93fee5f)
Author: Petr Baudis <[EMAIL PROTECTED]>
Date: Sun Jul 10 16:59:28 2005 +0200
Fix cg-pull to handle packed tags properly
If the objects referenced by refs/tags/ are packed, it wouldn't detect
them properly and instead try to refetch them, but they are likely to
be packed on the other side as well and that makes them impossible to
be fetched explicitly (which isn't a problem as long as they are the
same branch).
Also, the fetch failure message was confusing.
Reported by Russel King.
diff --git a/cg-pull b/cg-pull
--- a/cg-pull
+++ b/cg-pull
@@ -294,13 +294,14 @@ $fetch -i -s -u -d "$uri/refs/tags" "$_g
for tag in *; do
[ "$tag" = "*" ] && break
tagid=$(cat $tag)
- tagfile=objects/${tagid:0:2}/${tagid:2}
- [ -s "../../$tagfile" ] && continue
+ GIT_DIR=../../../$_git git-cat-file -t "$tagid" >/dev/null 2>&1
&& continue
echo -n "Missing object of tag $tag... "
+ # In case it's not in a packfile...
+ tagfile=objects/${tagid:0:2}/${tagid:2}
if $fetch -i -s "$uri/$tagfile" "../../$tagfile" 2>/dev/null
>&2; then
echo "retrieved"
else
- echo "different source (obsolete tag?)"
+ echo "unable to retrieve"
fi
done
)
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html