# BUG: checkout won't checkout?

7 messages from 2015-06-18 to 2015-06-18. Participants: Luke Diamand, Junio C Hamano.
Thread: https://gitlist.dev/t/39674

## Luke Diamand, 2015-06-18 22:07

Subject: BUG: checkout won't checkout?
Message-ID: <CAE5ih7-=WPme_BxgAjtm9hrShxTk1z+uDM-LXzc3BcN3n2vqAg@mail.gmail.com>
URL: https://gitlist.dev/e/CAE5ih7-%3DWPme_BxgAjtm9hrShxTk1z%2BuDM-LXzc3BcN3n2vqAg%40mail.gmail.com

```
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, 2015-06-18 22:13

Subject: Re: BUG: checkout won't checkout?
Message-ID: <CAE5ih7_ferSqBGnk=08DegqqpgpO7Mq8XWu4k-KAP4ENdxE_rg@mail.gmail.com>
URL: https://gitlist.dev/e/CAE5ih7_ferSqBGnk%3D08DegqqpgpO7Mq8XWu4k-KAP4ENdxE_rg%40mail.gmail.com
In-Reply-To: <CAE5ih7-=WPme_BxgAjtm9hrShxTk1z+uDM-LXzc3BcN3n2vqAg@mail.gmail.com>

```
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:
> 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, 2015-06-18 22:28

Subject: Re: BUG: checkout won't checkout?
Message-ID: <xmqq4mm4d53f.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq4mm4d53f.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CAE5ih7-=WPme_BxgAjtm9hrShxTk1z+uDM-LXzc3BcN3n2vqAg@mail.gmail.com>

```
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?

> $ 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, 2015-06-18 22:32

Subject: Re: BUG: checkout won't checkout?
Message-ID: <xmqqzj3wbqcc.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqzj3wbqcc.fsf%40gitster.dls.corp.google.com
In-Reply-To: <xmqq4mm4d53f.fsf@gitster.dls.corp.google.com>

```
Junio C Hamano <gitster@pobox.com> 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?

The reason I ask this question is because of 

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

```

## Luke Diamand, 2015-06-18 22:47

Subject: Re: BUG: checkout won't checkout?
Message-ID: <CAE5ih79KhNXqvSNW-w8pMmiys2Dv24Rt4KFdRdoA9EuPDS3ELw@mail.gmail.com>
URL: https://gitlist.dev/e/CAE5ih79KhNXqvSNW-w8pMmiys2Dv24Rt4KFdRdoA9EuPDS3ELw%40mail.gmail.com
In-Reply-To: <xmqq4mm4d53f.fsf@gitster.dls.corp.google.com>

```
On 18 June 2015 at 23:28, Junio C Hamano <gitster@pobox.com> wrote:
> 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.

>
>> $ 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, 2015-06-18 22:53

Subject: Re: BUG: checkout won't checkout?
Message-ID: <xmqqvbekbpc0.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqvbekbpc0.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CAE5ih79KhNXqvSNW-w8pMmiys2Dv24Rt4KFdRdoA9EuPDS3ELw@mail.gmail.com>

```
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.

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, 2015-06-18 22:56

Subject: Re: BUG: checkout won't checkout?
Message-ID: <CAE5ih78-1EDFTNhxy-PZBtT=HHNMPa=nX0UyfoXYXZXEKy0hPw@mail.gmail.com>
URL: https://gitlist.dev/e/CAE5ih78-1EDFTNhxy-PZBtT%3DHHNMPa%3DnX0UyfoXYXZXEKy0hPw%40mail.gmail.com
In-Reply-To: <xmqqvbekbpc0.fsf@gitster.dls.corp.google.com>

```
On 18 June 2015 at 23:53, Junio C Hamano <gitster@pobox.com> wrote:
> 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

```
