threads / bug / 39674

BUG: checkout won't checkout?

Subject: BUG: checkout won't checkout?

## tl;dr

7 messages between Jun 18, 2015 and Jun 18, 2015.

replies: 6people: 2as markdown or json

Luke Diamand· Jun 18, 2015, 22:07 UTC · lore

This is probably user error, but I'm not sure what I'm doing wrong. I'm posting here in case anyone else gets the same thing

I'm using 2.4.4.598.gd7bed1d, i.e. 'next' as of today.

I've somehow ended up with history skipping back in time, but git not prepared to let let me fix it, or something.

$ git diff upstream/master -- subtree
 - lots of deltas, which look like I've reverted this back several
revisions (which I haven't AFAIK)
$ git checkout upstream/master -- subtree
$ git diff upstream/master -- subtree
-- still lots of deltas
$ git checkout upstream/master -- subtree
$ git commit -m 'Revert unwanted changes'
$ git diff upstream/master -- subtree
-- still lots of deltas

What am I doing wrong? Have I ended up in the middle of some weird state (cherry-pick and rebase isn't in progress AFAIK).

Luke Diamand· Jun 18, 2015, 22:13 UTC · re: Luke Diamand · lore

Re: BUG: checkout won't checkout?

The other thing about these files is that they were all deleted a few weeks ago and have now come back.

On 18 June 2015 at 23:07, Luke Diamand <luke@diamand.org> wrote:
Show 21 quoted lines
> This is probably user error, but I'm not sure what I'm doing wrong.
> I'm posting here in case anyone else gets the same thing
>
> I'm using 2.4.4.598.gd7bed1d, i.e. 'next' as of today.
>
> I've somehow ended up with history skipping back in time, but git not
> prepared to let let me fix it, or something.
>
> $ git diff upstream/master -- subtree
>  - lots of deltas, which look like I've reverted this back several
> revisions (which I haven't AFAIK)
> $ git checkout upstream/master -- subtree
> $ git diff upstream/master -- subtree
> -- still lots of deltas
> $ git checkout upstream/master -- subtree
> $ git commit -m 'Revert unwanted changes'
> $ git diff upstream/master -- subtree
> -- still lots of deltas
>
> What am I doing wrong? Have I ended up in the middle of some weird
> state (cherry-pick and rebase isn't in progress AFAIK).
Junio C Hamano· Jun 18, 2015, 22:28 UTC · re: Luke Diamand · lore

Re: BUG: checkout won't checkout?

Luke Diamand <luke@diamand.org> writes:
Show 11 quoted lines
> This is probably user error, but I'm not sure what I'm doing wrong.
> I'm posting here in case anyone else gets the same thing
>
> I'm using 2.4.4.598.gd7bed1d, i.e. 'next' as of today.
>
> I've somehow ended up with history skipping back in time, but git not
> prepared to let let me fix it, or something.
>
> $ git diff upstream/master -- subtree
>  - lots of deltas, which look like I've reverted this back several
> revisions (which I haven't AFAIK)
Are you on the right branch that you think you are working on?
> $ git checkout upstream/master -- subtree
> $ git diff upstream/master -- subtree
> -- still lots of deltas

Does this show _ONLY_ additions? Or does it include modifications and removals?

Junio C Hamano· Jun 18, 2015, 22:32 UTC · re: Junio C Hamano · lore

Re: BUG: checkout won't checkout?

Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
>> $ git checkout upstream/master -- subtree
>> $ git diff upstream/master -- subtree
>> -- still lots of deltas
>
> Does this show _ONLY_ additions?  Or does it include modifications
> and removals?
The reason I ask this question is because of 
http://thread.gmane.org/gmane.comp.version-control.git/234903/focus=234924
Luke Diamand· Jun 18, 2015, 22:47 UTC · re: Junio C Hamano · lore

Re: BUG: checkout won't checkout?

On 18 June 2015 at 23:28, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Luke Diamand <luke@diamand.org> writes:
>
>> This is probably user error, but I'm not sure what I'm doing wrong.
>> I'm posting here in case anyone else gets the same thing
>>
>> I'm using 2.4.4.598.gd7bed1d, i.e. 'next' as of today.
>>
>> I've somehow ended up with history skipping back in time, but git not
>> prepared to let let me fix it, or something.
>>
>> $ git diff upstream/master -- subtree
>>  - lots of deltas, which look like I've reverted this back several
>> revisions (which I haven't AFAIK)
>
> Are you on the right branch that you think you are working on?
Yes.
Show 7 quoted lines
>
>> $ git checkout upstream/master -- subtree
>> $ git diff upstream/master -- subtree
>> -- still lots of deltas
>
> Does this show _ONLY_ additions?  Or does it include modifications
> and removals?
There are indeed _ONLY_ additions.
Junio C Hamano· Jun 18, 2015, 22:53 UTC · re: Luke Diamand · lore

Re: BUG: checkout won't checkout?

Luke Diamand <luke@diamand.org> writes:
Show 8 quoted lines
>>> $ git checkout upstream/master -- subtree
>>> $ git diff upstream/master -- subtree
>>> -- still lots of deltas
>>
>> Does this show _ONLY_ additions?  Or does it include modifications
>> and removals?
>
> There are indeed _ONLY_ additions.

http://thread.gmane.org/gmane.comp.version-control.git/234903/focus=234912 http://thread.gmane.org/gmane.comp.version-control.git/234903/focus=234924

In short, it is an intended behaviour, both Peff and I consider that the intention is bad and the behaviour should be changed.

But nothing has happened yet (it is listed as one of the "leftover bits" http://git-blame.blogspot.com/p/leftover-bits.html).

Luke Diamand· Jun 18, 2015, 22:56 UTC · re: Junio C Hamano · lore

Re: BUG: checkout won't checkout?

On 18 June 2015 at 23:53, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Luke Diamand <luke@diamand.org> writes:
>
>>>> $ git checkout upstream/master -- subtree
>>>> $ git diff upstream/master -- subtree
>>>> -- still lots of deltas
>>>
>>> Does this show _ONLY_ additions?  Or does it include modifications
>>> and removals?
>>
>> There are indeed _ONLY_ additions.
>
> http://thread.gmane.org/gmane.comp.version-control.git/234903/focus=234912
> http://thread.gmane.org/gmane.comp.version-control.git/234903/focus=234924
>
> In short, it is an intended behaviour, both Peff and I consider that
> the intention is bad and the behaviour should be changed.
OK, thanks, it makes sense now!
>
> But nothing has happened yet (it is listed as one of the "leftover
> bits" http://git-blame.blogspot.com/p/leftover-bits.html).
OK, I'll keep it in mind.
Luke

← back to recent threads