* Tree tags again..
@ 2005-08-05 0:03 Linus Torvalds
2005-08-05 0:17 ` Junio C Hamano
2005-08-05 9:16 ` Junio C Hamano
0 siblings, 2 replies; 3+ messages in thread
From: Linus Torvalds @ 2005-08-05 0:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
Junio, maybe there should be some test-case for this:
error: Object 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c is a tree, not a commit
error: remote ref 'refs/tags/v2.6.11' is not a strict subset of local ref 'refs/tags/v2.6.11'.
error: Object 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c is a tree, not a commit
error: remote ref 'refs/tags/v2.6.11-tree' is not a strict subset of local ref 'refs/tags/v2.6.11-tree'.
Hmm?
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Tree tags again..
2005-08-05 0:03 Tree tags again Linus Torvalds
@ 2005-08-05 0:17 ` Junio C Hamano
2005-08-05 9:16 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2005-08-05 0:17 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
Linus Torvalds <torvalds@osdl.org> writes:
> Junio, maybe there should be some test-case for this:
>
> error: Object 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c is a tree, not a commit
> error: remote ref 'refs/tags/v2.6.11' is not a strict subset of local ref 'refs/tags/v2.6.11'.
I assume this is syncing two linux-2.6 repo which both have the
same refs/tags/v2.6.11 (tree tag).
Sorry, in send_pack(), up-to-date check should be made first
before ref_newer() check. My mistake.
A more interesting question is what to do if they are indeed
different trees. More realistically, you may decide to
retroactively create a commit that wraps the same v2.6.11 tree,
perhaps grafting it in front of the current 2.6.12-rcX based
history, and replace 'refs/tags/v2.6.11' with a tag to that
commit. What should happen?
I do not have a good answer to that. From the end-user point of
view, we _could_ treat tags differently from heads in that we
always omit the ref_newer() check, but from the machinery point
of view, I think the plumbing should just ask the user to use
the --force when such a tag is involved.
------------
diff --git a/send-pack.c b/send-pack.c
--- a/send-pack.c
+++ b/send-pack.c
@@ -173,6 +173,10 @@ static int send_pack(int in, int out, in
char old_hex[60], *new_hex;
if (!ref->peer_ref)
continue;
+ if (!memcmp(ref->old_sha1, ref->peer_ref->new_sha1, 20)) {
+ fprintf(stderr, "'%s': up-to-date\n", ref->name);
+ continue;
+ }
if (!is_zero_sha1(ref->old_sha1)) {
if (!has_sha1_file(ref->old_sha1)) {
error("remote '%s' object %s does not "
@@ -188,10 +192,6 @@ static int send_pack(int in, int out, in
continue;
}
}
- if (!memcmp(ref->old_sha1, ref->peer_ref->new_sha1, 20)) {
- fprintf(stderr, "'%s': up-to-date\n", ref->name);
- continue;
- }
memcpy(ref->new_sha1, ref->peer_ref->new_sha1, 20);
if (is_zero_sha1(ref->new_sha1)) {
error("cannot happen anymore");
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Tree tags again..
2005-08-05 0:03 Tree tags again Linus Torvalds
2005-08-05 0:17 ` Junio C Hamano
@ 2005-08-05 9:16 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2005-08-05 9:16 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
Sorry about the breakage. I pushed out a fix.
Since you always give me hard time with this "tree-tag", I
decided to trump it with an even weirder tag myself. We will
see what else would break shortly ;-).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-05 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 0:03 Tree tags again Linus Torvalds
2005-08-05 0:17 ` Junio C Hamano
2005-08-05 9:16 ` Junio C Hamano
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).