Bug #301

Job configurator fails to checkout git branch

Added by Sebastian Wrede over 9 years ago. Updated about 8 years ago.

Status:ResolvedStart date:2014-10-05
Priority:HighDue date:
Assignee:Jan Moringen% Done:

100%

Category:build-generatorSpent time:-
Target version:-

Description

Environment: Ubuntu 14.04.1

Problem: Can't checkout a specific branch in a git repository. The example project here is rsb-matlab. However, I also experienced this problem with other projects. Using the command line, the checkout of this specific branch works without problems.

swrede@ubuntu:~/workspace/citk$ job-configurator --on-error=continue -d distributions/fleximon.distribution -t 'templates/*.template'
1 problem during ANALYZE/PROJECT phase:

  ANALYSIS-ERROR:
    Error during analysis of #<PROJECT-SPEC rsb-matlab {F52FB81}> Caused by:
    > Error during analysis of https://code.cor-lab.org/git/rsb.git.matlab Caused by:
    > > Command
    > >
    > >   ("git" "--work-tree" #P"/tmp/project.irnkL8/rsb.git.matlab/" "--git-dir" #P"/tmp/project.irnkL8/rsb.git.matlab/.git/" "checkout" "--quiet" "fleximon")
    > >
    > > failed with output:
    > >
    > > error: pathspec 'fleximon' did not match any file(s) known to git.
    > > 

1 problem during RESOLVE/DISTRIBUTION phase:

  SIMPLE-ERROR:
    Could not find version "fleximon" in project #<PROJECT-SPEC rsb-matlab {F52FB81}>.

History

#1 Updated by Sebastian Wrede over 9 years ago

  • Description updated (diff)

#2 Updated by Sebastian Wrede over 9 years ago

Just an observation: This does not happen on my Ubuntu 12.02 install. Maybe it is related to the different git versions, which are:

  • Ubuntu 14.04: 1.9.1
  • Ubuntu 12.04: 1.7.9.5

#3 Updated by Jan Moringen over 9 years ago

Seems to be change in git behavior for shallow clones (note the --depth=1 and the different number of transferred objects):

jmoringe@mica:/tmp $ git --version
git version 1.7.9.5
jmoringe@mica:/tmp$ git clone --depth=1 https://code.cor-lab.org/git/rsb.git.matlab
Cloning into 'rsb.git.matlab'...
remote: Counting objects: 120, done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 120 (delta 45), reused 50 (delta 8)
Receiving objects: 100% (120/120), 4.22 MiB, done.
Resolving deltas: 100% (45/45), done.
jmoringe@mica:/tmp$ cd rsb.git.matlab/
jmoringe@mica:/tmp/rsb.git.matlab$ git branch fleximon
jmoringe@mica:/tmp/rsb.git.matlab$

jmoringe@fuchsit /t/rsb.git.matlab:master> git --version
git version 2.1.1
jmoringe@fuchsit /tmp> git clone --depth=1 https://code.cor-lab.org/git/rsb.git.matlab
Cloning into 'rsb.git.matlab'...
remote: Counting objects: 50, done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 50 (delta 5), reused 29 (delta 0)
Unpacking objects: 100% (50/50), done.
Checking connectivity... done.
jmoringe@fuchsit /tmp> cd rsb.git.matlab/
jmoringe@fuchsit /t/rsb.git.matlab:master> git checkout fleximon
error: pathspec 'fleximon' did not match any file(s) known to git.

#4 Updated by Jan Moringen over 9 years ago

  • Status changed from New to In Progress

Newer git versions seem to require the --no-single-branch clone option to make all branches available in a shallow clone. See http://git-scm.com/docs/git-clone.

#5 Updated by Johannes Wienke over 9 years ago

Maybe we can get around this error by specifying the branch already at teh clone operation using -b?

#6 Updated by Jan Moringen over 8 years ago

  • % Done changed from 0 to 50

Will probably be solved by the solution for #412.

#7 Updated by Jan Moringen about 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Should be fixed in build-generator master.

Also available in: Atom PDF