Closed yhpark closed 3 years ago
@ghthor I just found there's an untended change introduced from this fix: if the branch is remote-tracking, git status --porcelain -b
prints ## {local_branch}...{remote_branch}
so the branch name is now parsed like branch...origin/branch
. For me this is fine but if you want it the way before, changing the regex to something like ^## (?:Initial commit on )?(.*?)(?:\.\.\.| |$)
would work.
ref: git doc says branch name cannot contain two or more consecutive dots.
I think the change is fine. Just to clarify with some output. The change to the @branch
variable is purely for the output of gs
and I think showing the remote tracking branch as part of the output is an improvement here.
master
$ gs
# On branch: master | [*] => $e*
#
➤ Untracked files
#
# untracked: [1] lib/fun.sh
#
master...origin/master
$ gs
# On branch: master...origin/master | [*] => $e*
#
➤ Untracked files
#
# untracked: [1] lib/fun.sh
#
before:
after: