#810766 regression: git-sh-prompt: incorrectly determines the upstream for repos produced by recent git svn clone --stdlayout

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Paul Wise
Date:
2021-09-22 04:29:22 UTC
Severity:
normal
#810766#5
Date:
2016-01-12 01:42:10 UTC
From:
To:
I recently did a git svn clone of the Planet Debian SVN and I noticed
that the normal upstream indicator in the git part of my $PS1 was not
working properly. The issue appears to be that the code decides that
the upstream is trunk instead of origin/trunk. trunk gives an error
from git rev-list but origin/trunk does not. It works for normal git
svn clone because there the remote branch is just named git-svn with
no origin/ prefix. I'm using the below settings for my bash git PS1.
In case you need a small repo to reproduce this with, try neomis.
It still works with some of my old repos because the remote branch is
just trunk instead of origin/trunk, so I think git-svn changed this.

http://neomis.googlecode.com/svn

pabs@chianamo ~ $ git svn clone --stdlayout svn+ssh://svn.debian.org/svn/planet-debian
...
pabs@chianamo ~ $ cd planet-debian
pabs@chianamo ~/planet-debian (master) $ cd ..
pabs@chianamo ~ $ git svn clone svn+ssh://svn.debian.org/svn/secure-testing
...
pabs@chianamo ~ $ cd secure-testing
pabs@chianamo ~/secure-testing (master=) $ cd ..
pabs@chianamo ~ $ grep GIT_PS1 ~/.bash.d/git
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM=auto
export GIT_PS1_SHOWUPSTREAM=name
export GIT_PS1_SHOWCOLORHINTS=true
export GIT_PS1_DESCRIBE_STYLE=branch

#810766#10
Date:
2016-01-12 02:02:23 UTC
From:
To:
Just in case it wasn't clear, git-sh-prompt should support both the new
default branch name of origin/trunk and the old one of just trunk.
Otherwise the support will break with old repositories.

#810766#15
Date:
2021-09-22 04:21:30 UTC
From:
To:
Hello,

Good morning,

We have gone through your samples from a partner and Here is our  Order
List. Please do bear in mind that we are very much in  need of this
order, quote your competitive prices.

Kindly send the Order confirmation.

Your early reply will be much appreciated.

Best Regards,

Maryanah Erwin.

PT FINDORA INTERNUSA

Jln Pahlawan 66 Kec. Arjawinangun

45162 CIREBON West-Java INDONESIA

tel : +62 231 357334

fax: +62 231 357260

email: marketing@findora.com