Re: Git branch capitalisation bug?
- From
- Ilya Kamenshchikov <ikamenshchikov@gmail.com>
- Date
- Apr 20, 2023, 07:04 UTC
- Message-ID
- <CAAp-DqKzutP2JQB25kzyMG56=sqArpqZ0341-ayaV48pca4skA@mail.gmail.com>
- In-Reply-To
- <xmqqfs93y166.fsf@gitster.g>
I've recollected the history of how this issue occurred more and did
few more tests. I'm now working with branch named "feature/git_repro":
1) The error first occurred when I worked with a colleague on a same
branch, and he really used capital "Feature/branch".
2) today, after initial push and doing git log, local git believes it
to be "Feature/repro_git", while `ls-remote` says it's
"feature/repro_git"
```
$ git checkout -b feature/repro_git
$ git push --set-upstream origin feature/repro_git
$ git log
commit 846df8e6d2f921d0ee2e7c427ca174fae291b040 (HEAD ->
feature/repro_git, origin/Feature/repro_git)
$ git ls-remote origin | grep repro
(base) 08:44:31
846df8e6d2f921d0ee2e7c427ca174fae291b040 refs/heads/feature/repro_git
```
3) So I conclude there must be some local information saying branch
has Capitalised name, while on remote all is normal.
$ ls .git/refs/remotes/origin
Feature/
# note: doesn't contain "feature/"
---
My wild speculation now: when I first checked out the branch
Feature/branch of my colleague, git has rewritten
.git/refs/remotes/origin/feature as capitalised Feature.
---
I will try to reproduce this on public GitHub later.Best Regards, -- Ilya Kamen
On Thu, Apr 13, 2023 at 10:34 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> > Torsten Bögershausen <tboegi@web.de> writes: > > > I am not sure, where this Capitalizations comes from. > > I don't have an account on boschdevcloud.com to test. > > Is it possible to reproduce it with a public repo ? > > Otherwise, should we suspect boschdevcloud.com for it ? > > > > Any other thoughts from anybody ? > > In the transcript I do not see any "git pull" done from the other > side, so the "origin/Feature/macos_tests" in the commit decoration > that can be seen in the last part of the transcript may have been > created locally. Output from > > $ git ls-remote origin | grep macos_tests > > might be a way to see which end of the connection has the issue. >