상세 컨텐츠

본문 제목

repo sync 시 platform/external/bluetooth/bluedroid update-ref: fatal: cdeccf6fdd8c2d494ea2867cb37a025bf8879baf^0: not a valid SHA1 error 처리 방법

IT : GIT

by 휀스 2013. 2. 6. 00:30

본문



repo sync 시 platform/external/bluetooth/bluedroid update-ref: fatal: cdeccf6fdd8c2d494ea2867cb37a025bf8879baf^0: not a valid SHA1 error 처리 방법


Exception in thread Thread-26:3437)   

Traceback (most recent call last):

  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner

    self.run()

  File "/usr/lib/python2.7/threading.py", line 504, in run

    self.__target(*self.__args, **self.__kwargs)

  File "/home3/gittest/ext-src/.repo/repo/subcmds/sync.py", line 228, in _FetchHelper

    clone_bundle=not opt.no_clone_bundle)

  File "/home3/gittest/ext-src/.repo/repo/project.py", line 974, in Sync_NetworkHalf

    self._InitMRef()

  File "/home3/gittest/ext-src/.repo/repo/project.py", line 1747, in _InitMRef

    self._InitAnyMRef(R_M + self.manifest.branch)

  File "/home3/gittest/ext-src/.repo/repo/project.py", line 1759, in _InitAnyMRef

    self.bare_git.UpdateRef(ref, dst, message = msg, detach = True)

  File "/home3/gittest/ext-src/.repo/repo/project.py", line 1933, in UpdateRef

    self.update_ref(*cmdv)

  File "/home3/gittest/ext-src/.repo/repo/project.py", line 2005, in runner

    p.stderr))

platform/external/bluetooth/bluedroid update-ref: fatal: cdeccf6fdd8c2d494ea2867cb37a025bf8879baf^0: not a valid SHA1 error


JellyBean R1 upgrade 후 mirror 로 생성된 저장소에서 sync 시 commit id 가 없다는 error 가 발생하면서 더이상 sync 가 진행이 되지 않았다.

이럴때 git clone 으로 해당 repository 를 보면 cdeccf6fdd8c2d4 commit 이 존재함을 알 수 있다. 하지만 cdeccf6fdd8c2d4 는 어느 branch 에서도 존재하지 않는 no branch 상태의 commit id 라 접근을 하지 못한다.

이를 해결하기 위해 clone 으로 내려받은 git 에서 branch 를 만들어 주는 것이다. 해당 commit id cdeccf6fdd8c2d4 에 HEAD 가 있는 상태로 branch 를 만들면 해당 commit 은 더이상 dead commit 이 아니게 되어 접근 가능하게 된다. branch 를 만들어 주었으면 branch를 push 하고 다시 repo sync 를 실행하면 정상적으로 잘 sync 되어진다.

$ git checkout -b local-temp-branch
$ git push origin local-temp-branch

clone 받은 repository 의 저장소는 origin 이므로 위와 같이 써준다.


관련글 더보기