2012-11-20 2 views
4

리포 중 일부 커밋의 경우 커밋을 체크 아웃 한 다음 마스터 브랜치로 돌아 가면 예기치 않은 경고가 발생합니다. (지금까지 내가 말할 수있는) 문제분리 헤드에서 브랜치로 다시 전환 할 때 자식이 "커밋이 남았습니다"

# Check out one of the commits in question: 
$ git checkout dd33caa5b004b0e3bd449152f9335e40450db91c 
Note: checking out 'dd33caa5b004b0e3bd449152f9335e40450db91c'. 

You are in 'detached HEAD' state. You can look around, make experimental 
[...] 
HEAD is now at dd33caa... Organized DataStore build files, added cleanup targets. 

# Now switch back to the master branch so I can work: 
$ git checkout master 
Warning: you are leaving 17 commits behind, not connected to 
any of your branches: 

    dd33caa Organized DataStore build files, added cleanup targets. 
    4916eec Fixes to C++ codegen to use maven features. 
    a26291d Merge branch 'master' of [redacted origin repo address] 
    93ae0b9 Add protobuf 2.4.1 jar file to install scripts. Add QTDIR to build script. 
... and 13 more. 

If you want to keep them by creating a new branch, this may be a good time 
to do so with: 

git branch new_branch_name dd33caa5b004b0e3bd449152f9335e40450db91c 

Switched to branch 'master' 

모든 커밋 마스터에서 도달 할 수 있으며,이 깨끗한 클론은 (분리 된 머리 상태에있는 동안 나는 어떤 커밋을하지 않은 : 남겨되고 커밋 우리 저장소의). 마스터 브랜치의 역사는 다음과 같습니다 :

* 04d7fcc (HEAD, origin/master, origin/HEAD, master) Removed files from DataS 
* ecaa2f5 Fixed .gitignore. 
* dd33caa Organized DataStore build files, added cleanup targets. 
* 4916eec Fixes to C++ codegen to use maven features. 
* a26291d Merge branch 'master' of [redacted] 
|\ 
| * 93ae0b9 Add protobuf 2.4.1 jar file to install scripts. Add QTDIR to buil 
| * 3cba845 switched to protobug 2.4.1 jar files 
| * 1046d22 fixed GATEWAY_ROOT 
| * ebcda06 edit windows build scripting path for new repo location 
| * bda1e17 add windows build scripts from old repo 
* | 371883d Merge branch 'master' of [redacted] 
|\ \ 
| |/ 
| * 771c579 Fix MCast and RMCast service names in gateway manager config 
* | 864fb25 First cut at DataStore code generation update to sync with refact 
|/ 
* f505e46 Testing new repository 
* 111d89a Merge branch 'master' of [redacted] 

어떤 일이 벌어지고 있을지 모릅니다. 특정 사용자의 커밋에 연결되어있는 것 같습니다. OSX에서는 Git 1.7.9.6으로, 우분투에서는 Git 1.7.9.5와 함께 재현 할 수 있지만, 우분투에서는 1.8.0이 아닙니다. Git 버그일까요? 그래도 릴리스 노트와 관련이있는 것은 보이지 않습니다 ...

+2

실제로'dd33caa'는'ecaa2f5'의 부모 커밋입니까? 그런 식으로 보일지 모르지만 고아 지점 ('git checkout - morphan newbranch')은'git log --graph --pretty = oneline --all'과 같이 나타납니다. – twalberg

+0

예 , (이 의견 양식의 한계로 인해서, 당신을 보여줄 수는 없습니다.) – JonathonW

+0

흠 .... 다른 "정상적인"시나리오가 그 상황을 초래할 것이 확실하지 않으므로 버그를 제안하는 경향이 있습니다. – twalberg

답변

5

예, 이것은 Git 버그처럼 보입니다. 고정 된 것을 발견하는 데 관심이 있다면, 당신은 이등분을 할 수 있습니다. 복제 git.git, 깨진 버전을 체크 아웃하고 문제가 발생하는지 확인 최신을 확인하고 고정 중인지 확인하고 문제 해결 확약하는 찾기 위해 양분을 실행

$ git clone git://github.com/git/git.git 
$ cd git 
$ git checkout v1.7.9.5 
$ make 
$ (cd my-repo && /path/to/my/git checkout dd33caa && /path/to/my/git checkout master 2>&1 | grep "leaving .* commits behind") 
$ git checkout v1.8.0 
$ make 
$ (cd my-repo && /path/to/my/git checkout dd33caa && /path/to/my/git checkout master 2>&1 | grep "leaving .* commits behind") 
# if the above gave the expected results: 
$ git bisect start v1.7.9.5 v1.8.0 
$ git bisect run bash -c "make && cd my-repo && /path/to/my/git checkout dd33caa && (! /path/to/my/git checkout master 2>&1 | grep -q 'leaving .* commits behind')" 

것은 당신을 떠나지한다 당신의 버그를 고쳤던 커밋. 버그를 도입 한 커밋을 찾으려고하는 일반적인 이분법과는 반대의 작업을 수행하고 있습니다.

+1

그래, 버그와 그 수정을 발견했습니다. 이전에 분리 된 HEAD의 커밋이 심볼릭 참조에 의해 지시되는 커밋을 통해서만 도달 할 수있는 경우 발생하는보고 버그입니다.이 버그는 [add416a] (https://github.com/)에서 수정되었습니다. git/git/commit/add416a6c05b580e005726f318463698d746384d), 6 월에 돌아온다. – JonathonW

+0

@JonathonW :이 버그는 Git 버전'v1.7.11.5'에서 발표 된 [add416a] (https://github.com/git/git/commit/add416a6c05b580e005726f318463698d746384d)에서 수정되었습니다. – Flimm

관련 문제