-
Bug
-
Resolution: Won't Fix
-
Major
-
None
If a user renames a branch in such a way that a file somewhere underneath .git/refs/heads becomes a directory, or vice versa, Jenkins fails to update the branch list (see error output below).
Jenkins is not able to recover from this on its own; we are forced to click on "Wipe Out Current Workspace" for every job.
hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 1: stdout: stderr: error: unable to resolve reference refs/remotes/origin/foo/bar/blah: Not a directory From ssh://stash.teslamotors.com:7999/FW/firmware ! [new branch] foo/bar/blah -> origin/foo/bar/blah (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:161) at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:796) at hudson.plugins.git.GitSCM.access$000(GitSCM.java:60) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:988) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:953) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) ERROR: Could not fetch from any repository