Re: git-checkout changes the index but not the checked out files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/23/07, Junio C Hamano <junkio@xxxxxxx> wrote:
Shouldn't happen.  Details?

Hmnmm. Not sure really what to look for ;-)

If I try it on my git checkout (checkout origin/pu and then checkout
master) nothing strange happens. But if I do it on my project,
(fetchable from http://git.catalyst.net.nz/moodle-r2.git ) between a
"local" mdl18-local and origin/MOODLE_18_STABLE, it all goes weird.

Just re-ran the process with bash -x, and it switches to a detached
head when going to origin/MOODLE_18_STABLE (as expected). And when
switching back, it all looks _almost_ reasonable except that there's a
call to git-read-tree with -m and 2 sha1s. It is trying to merge
mdl18-local and mdl18-topnz apparently.

In fact:

- I am on mdl18-local
- git-status is clean
- git checkout mdl18-local reports "Already on branch "mdl18-local"
but it does a merge anyway

The problem seems to be that the SHA1 returned here is bogus:

  $ git-rev-parse --verify 'mdl18-local^0'
  warning: refname 'mdl18-local' is ambiguous.
  a26c09be05a08e5f911ef84b5f8010ba155ea77d

If I disambiguate it one way or the other, I get correct results

  $ git-rev-parse --verify 'refs/heads/mdl18-local^0'
  634dcf72a31d0c75a98c1d69dd4763def7bcf2d5
  $ git-rev-parse --verify 'remotes/origin/mdl18-local^0'
  6e6ae22a2960d3ac321acd1cdfa09f23068f33b4

but the ambiguous "git-rev-parse --verify 'mdl18-local^0'" returns the
SHA1 for a head called 'mdl18-topnz' that I am not asking for. Why?

cheers,


m
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]