Or enable JGit and use it. JGit does not have all the features of CLI git and it does best with repos that are 50 MB or less.
On Sat, May 1, 2021, 2:08 AM Sverre Moe <sverre....@gmail.com> wrote: > I found out the reason for it. > As we build on different Linux distributions, we also are subject to > different versions of git installed. > The no branch was given on a Linux build agent with git-1.7 (yes a very > old Linux distribution, SLES 11). > > Perhaps a solution here would be to use the Jenkins tools support, making > sure we have the same version of git installed everywhere. > > fredag 30. april 2021 kl. 12:36:24 UTC+2 skrev Sverre Moe: > >> BRANCH1 >> + git branch >> * (no branch) >> >> BRANCH2 >> + git branch >> * (HEAD detached at 5abd860) >> >> The same project, but one branch does not return any branches on `git >> branch`. >> Any clue as to why? >> > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/f839ef26-358c-49e7-b2a7-91a89d8046aen%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/f839ef26-358c-49e7-b2a7-91a89d8046aen%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF92SK4VDKrF8z_yB7ZDfTL%3DwVuFh7c3j1%3DVEgCGS%2B%3DBw%40mail.gmail.com.