jenkinsci / jenkinsci/git-plugin

[JENKINS-24934] Can't use matrix job with pre-build merge

Open
#2,539 5 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

We are using special merge simulator projects for feature branches where

the idea is that the feature branch is automatically merged onto the

master before compiling and testing it so that also the merging behavior

is verified. All of these projects are multi configuration jobs. So far

this worked quite well but since a few days we are noticing a weird

behavior:

In one of the feature branches we did some force pushing and after that

we noticed two error conditions.

1. The coordinator performed the merge successfully, which created a new

revision with hash 5af79d528388216aa25a24c27f0a16d8dc55bdb6. All slaves

of the multi configuration project then try to checkout that revision,

which obviously does not exist in their local repositories. Hence, they

end up with

```
FATAL: Could not checkout master with start point
5af79d528388216aa25a24c27f0a16d8dc55bdb6
hudson.plugins.git.GitException: Could not checkout master with start
point 5af79d528388216aa25a24c27f0a16d8dc55bdb6
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1448)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
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:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f
5af79d528388216aa25a24c27f0a16d8dc55bdb6" returned status code 128:
stdout:
stderr: fatal: reference is not a tree:
5af79d528388216aa25a24c27f0a16d8dc55bdb6

at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1065)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1075)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1431)
... 11 more

```

2. After wiping the workspace of that job we ended up in a second error

condition already on the coordinator side:

```
Merging Revision 5af79d528388216aa25a24c27f0a16d8dc55bdb6 () onto
origin/master using default strategy
FATAL: Could not checkout master with start point
5af79d528388216aa25a24c27f0a16d8dc55bdb6
hudson.plugins.git.GitException: Could not checkout master with start
point 5af79d528388216aa25a24c27f0a16d8dc55bdb6
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1448)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
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:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f
5af79d528388216aa25a24c27f0a16d8dc55bdb6" returned status code 128:
stdout:
stderr: fatal: reference is not a tree:
5af79d528388216aa25a24c27f0a16d8dc55bdb6

at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1065)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1075)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1431)
... 11 more

```

It seems that the master cached the last revision (which it generated

locally, so it will never be available after pulling) and refused to

forget about this revision.

---
Originally reported by languitar, imported from: Can't use matrix job with pre-build merge


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

We are using special merge simulator projects for feature branches where
the idea is that the feature branch is automatically merged onto the
master before compiling and testing it so that also the merging behavior
is verified. All of these projects are multi configuration jobs. So far
this worked quite well but since a few days we are noticing a weird
behavior:

In one of the feature branches we did some force pushing and after that
we noticed two error conditions.

1. The coordinator performed the merge successfully, which created a new
revision with hash 5af79d528388216aa25a24c27f0a16d8dc55bdb6. All slaves
of the multi configuration project then try to checkout that revision,
which obviously does not exist in their local repositories. Hence, they
end up with



FATAL: Could not checkout master with start point

5af79d528388216aa25a24c27f0a16d8dc55bdb6
hudson.plugins.git.GitException: Could not checkout master with start
point 5af79d528388216aa25a24c27f0a16d8dc55bdb6
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1448)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
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:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f
5af79d528388216aa25a24c27f0a16d8dc55bdb6" returned status code 128:
stdout:
stderr: fatal: reference is not a tree:
5af79d528388216aa25a24c27f0a16d8dc55bdb6

at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1065)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1075)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1431)
... 11 more


2. After wiping the workspace of that job we ended up in a second error
condition already on the coordinator side:



Merging Revision 5af79d528388216aa25a24c27f0a16d8dc55bdb6 () onto

origin/master using default strategy
FATAL: Could not checkout master with start point
5af79d528388216aa25a24c27f0a16d8dc55bdb6
hudson.plugins.git.GitException: Could not checkout master with start
point 5af79d528388216aa25a24c27f0a16d8dc55bdb6
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1448)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
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:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f
5af79d528388216aa25a24c27f0a16d8dc55bdb6" returned status code 128:
stdout:
stderr: fatal: reference is not a tree:
5af79d528388216aa25a24c27f0a16d8dc55bdb6

at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1065)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1075)
at
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1431)
... 11 more



It seems that the master cached the last revision (which it generated
locally, so it will never be available after pulling) and refused to
forget about this revision.

environment

```
Jenkins LTS on Debian Wheezy

Git client plugin 1.10.2

Git plugin 2.2.6
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.