* cg-update (cogito-0.13) bug: changed heads
@ 2005-09-06 21:01 H. Peter Anvin
2005-09-06 23:17 ` Petr Baudis
0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2005-09-06 21:01 UTC (permalink / raw)
To: Git Mailing List, Petr Baudis
I just found a bug in cogito-0.13, at least to the best of my
understanding of the situation.
Simplified, the problem looks like this: two sides, A and B, pull from
repository C. The head of this pull we call 0.
Now commit 1 is added to A. B pulls commit 1 from A, not though C.
Later, A pushes commit 1 to C.
Next time B tries to pull from C, cg-update will not advance
refs/heads/origin, even though C now has a new head. Thus, B will think
that C is in a different state than it actually is.
This has, for me, broken safeguards of the form "make sure you're merged
before you pull."
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cg-update (cogito-0.13) bug: changed heads
2005-09-06 21:01 cg-update (cogito-0.13) bug: changed heads H. Peter Anvin
@ 2005-09-06 23:17 ` Petr Baudis
2005-09-06 23:23 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: Petr Baudis @ 2005-09-06 23:17 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
Dear diary, on Tue, Sep 06, 2005 at 11:01:25PM CEST, I got a letter
where "H. Peter Anvin" <hpa@zytor.com> told me that...
> I just found a bug in cogito-0.13, at least to the best of my
> understanding of the situation.
>
> Simplified, the problem looks like this: two sides, A and B, pull from
> repository C. The head of this pull we call 0.
>
> Now commit 1 is added to A. B pulls commit 1 from A, not though C.
> Later, A pushes commit 1 to C.
>
> Next time B tries to pull from C, cg-update will not advance
> refs/heads/origin, even though C now has a new head. Thus, B will think
> that C is in a different state than it actually is.
So, C surely has its head updated? Does cg-update "fail" silently, or
does it utter anything?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone. -- Alan Cox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cg-update (cogito-0.13) bug: changed heads
2005-09-06 23:17 ` Petr Baudis
@ 2005-09-06 23:23 ` H. Peter Anvin
2005-09-07 1:36 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2005-09-06 23:23 UTC (permalink / raw)
To: Petr Baudis; +Cc: Git Mailing List
Petr Baudis wrote:
> Dear diary, on Tue, Sep 06, 2005 at 11:01:25PM CEST, I got a letter
> where "H. Peter Anvin" <hpa@zytor.com> told me that...
>
>>I just found a bug in cogito-0.13, at least to the best of my
>>understanding of the situation.
>>
>>Simplified, the problem looks like this: two sides, A and B, pull from
>>repository C. The head of this pull we call 0.
>>
>>Now commit 1 is added to A. B pulls commit 1 from A, not though C.
>>Later, A pushes commit 1 to C.
>>
>>Next time B tries to pull from C, cg-update will not advance
>>refs/heads/origin, even though C now has a new head. Thus, B will think
>>that C is in a different state than it actually is.
>
>
> So, C surely has its head updated? Does cg-update "fail" silently, or
> does it utter anything?
>
C has its head updated, yes. cg-update says "Branches already fully
merged."
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cg-update (cogito-0.13) bug: changed heads
2005-09-06 23:23 ` H. Peter Anvin
@ 2005-09-07 1:36 ` H. Peter Anvin
2005-09-07 2:17 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2005-09-07 1:36 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Petr Baudis, Git Mailing List
H. Peter Anvin wrote:
>>
>> So, C surely has its head updated? Does cg-update "fail" silently, or
>> does it utter anything?
>
> C has its head updated, yes. cg-update says "Branches already fully
> merged."
>
OK, now later in the day I could not reproduce this on another box.
Either the situation was different enough, or I did something else wrong.
-hpa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cg-update (cogito-0.13) bug: changed heads
2005-09-07 1:36 ` H. Peter Anvin
@ 2005-09-07 2:17 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2005-09-07 2:17 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: git
"H. Peter Anvin" <hpa@zytor.com> writes:
> H. Peter Anvin wrote:
>>>
> OK, now later in the day I could not reproduce this on another box.
> Either the situation was different enough, or I did something else wrong.
One thing that comes to mind, which may or may not be relevant
to your situation, is which branch you were on when you ran
cg-update. I cannot speak for Pasky and I do not use Cogito,
but the 'git fetch' and 'git pull' commands that come with core
GIT used to have a funny interaction of fetch attempting to
update the branch head ref if your working tree happened to be
on that branch, which was fixed some time ago.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-07 2:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 21:01 cg-update (cogito-0.13) bug: changed heads H. Peter Anvin
2005-09-06 23:17 ` Petr Baudis
2005-09-06 23:23 ` H. Peter Anvin
2005-09-07 1:36 ` H. Peter Anvin
2005-09-07 2:17 ` 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).