{"thread":{"id":"48252","subject":"Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","startedAt":"2018-04-09T19:26:23Z","lastAt":"2018-04-10T06:30:51Z","messageCount":6,"participants":["Hari Lubovac","Stefan Beller","Johannes Sixt","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"344225","messageId":"CAFLu24=o0nQveRpMJV-6dhvft0H9PgdBahisBi4EEg=G0BwhpQ@mail.gmail.com","threadId":"48252","inReplyTo":null,"subject":"Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","fromName":"Hari Lubovac","fromEmail":"hlubovac@gmail.com","sentAt":"2018-04-09T19:26:17Z","receivedAt":"2018-04-09T19:26:23Z","isPatch":false,"sender":{"key":"hlubovac@gmail.com","avatar":"https://gravatar.com/avatar/7dab36f50a4265fbffed080c731347c7c789e745e6225b701bc16eb54b8ae9c1?d=mp&s=160"},"body":"It appears to be just a reporting issue. Probably not a big deal, but\nI thought I should report this, if it hasn't been noticed: when a\nbranch is switched to by being named with non-original\ncharacter-casing, then it's not clear which branch is current.\n\nExample:\n\nC:\\repo>git branch\n* bar\n  foo\n\nC:\\repo>git checkout Bar\nSwitched to branch 'Bar'\n\nC:\\repo>git branch\n  bar\n  foo\n"},{"id":"344227","messageId":"CAGZ79kZ6xWijnZZpcogVm_JCX3nGMzN8ebKyh1vYygNc_dqGFw@mail.gmail.com","threadId":"48252","inReplyTo":"CAFLu24=o0nQveRpMJV-6dhvft0H9PgdBahisBi4EEg=G0BwhpQ@mail.gmail.com","subject":"Re: Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-04-09T19:32:24Z","receivedAt":"2018-04-09T19:32:30Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Hi Hari,\n\nthanks for reporting a bug!\n\nOn Mon, Apr 9, 2018 at 12:26 PM, Hari Lubovac <hlubovac@gmail.com> wrote:\n> It appears to be just a reporting issue. Probably not a big deal, but\n> I thought I should report this, if it hasn't been noticed: when a\n> branch is switched to by being named with non-original\n> character-casing, then it's not clear which branch is current.\n>\n> Example:\n>\n> C:\\repo>git branch\n> * bar\n>   foo\n>\n> C:\\repo>git checkout Bar\n> Switched to branch 'Bar'\n>\n> C:\\repo>git branch\n>   bar\n>   foo\n\nIs this Git compiled under Windows or\nGit-for-Windows as distributed by Johannes?\n\nAFAICT Git-for-Windows prefers to have a bug on github\nhttps://github.com/git-for-windows/git/issues/new\n\nThanks,\nStefan\n"},{"id":"344231","messageId":"CAFLu24kTRrAq3cOH5H1=nBT94p7uFSsaYJsUC-wN1brPFHk3mQ@mail.gmail.com","threadId":"48252","inReplyTo":"CAGZ79kZ6xWijnZZpcogVm_JCX3nGMzN8ebKyh1vYygNc_dqGFw@mail.gmail.com","subject":"Re: Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","fromName":"Hari Lubovac","fromEmail":"hlubovac@gmail.com","sentAt":"2018-04-09T20:06:37Z","receivedAt":"2018-04-09T20:06:43Z","isPatch":false,"sender":{"key":"hlubovac@gmail.com","avatar":"https://gravatar.com/avatar/7dab36f50a4265fbffed080c731347c7c789e745e6225b701bc16eb54b8ae9c1?d=mp&s=160"},"body":"I don't know which party compiled it. I'm pretty sure I downloaded the\ninstaller from https://git-scm.com/downloads, although it might have\ncome shipped with Microsoft Visual Studio, which I use.\n\nI forgot this detail earlier:\n\ngit --version\ngit version 2.16.1.windows.2\n\nI'm a little behind; maybe I should upgrade.\n\nI just reported the same here:\nhttps://github.com/git-for-windows/git/issues/1623\n\nOn Mon, Apr 9, 2018 at 12:32 PM, Stefan Beller <sbeller@google.com> wrote:\n> Hi Hari,\n>\n> thanks for reporting a bug!\n>\n> On Mon, Apr 9, 2018 at 12:26 PM, Hari Lubovac <hlubovac@gmail.com> wrote:\n>> It appears to be just a reporting issue. Probably not a big deal, but\n>> I thought I should report this, if it hasn't been noticed: when a\n>> branch is switched to by being named with non-original\n>> character-casing, then it's not clear which branch is current.\n>>\n>> Example:\n>>\n>> C:\\repo>git branch\n>> * bar\n>>   foo\n>>\n>> C:\\repo>git checkout Bar\n>> Switched to branch 'Bar'\n>>\n>> C:\\repo>git branch\n>>   bar\n>>   foo\n>\n> Is this Git compiled under Windows or\n> Git-for-Windows as distributed by Johannes?\n>\n> AFAICT Git-for-Windows prefers to have a bug on github\n> https://github.com/git-for-windows/git/issues/new\n>\n> Thanks,\n> Stefan\n"},{"id":"344298","messageId":"4de8574c-1b64-408c-ca7e-c6e3de2dfa4a@kdbg.org","threadId":"48252","inReplyTo":"CAFLu24=o0nQveRpMJV-6dhvft0H9PgdBahisBi4EEg=G0BwhpQ@mail.gmail.com","subject":"Re: Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-04-10T05:20:52Z","receivedAt":"2018-04-10T05:21:01Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 09.04.2018 um 21:26 schrieb Hari Lubovac:\n> It appears to be just a reporting issue. Probably not a big deal, but\n> I thought I should report this, if it hasn't been noticed: when a\n> branch is switched to by being named with non-original\n> character-casing, then it's not clear which branch is current.\n> \n> Example:\n> \n> C:\\repo>git branch\n> * bar\n>    foo\n> \n> C:\\repo>git checkout Bar\n> Switched to branch 'Bar'\n> \n> C:\\repo>git branch\n>    bar\n>    foo\n\nThe bug is not that the branch is not marked, but that you are permitted \nto check out a branch that does not exist. This is a side-effect of the \nfact that branch names are sometimes stored using file names, and, as we \nknow, file names are case-insensitive on Windows. I don't know of any \nefforts to fix that (I assume that it is not just a simple fix). In the \nmeantime, I can only recommend: if it hurts, don't do it.\n\nIf you call `git gc` before the checkout command, I would expect that \nyou would not be able to check out branch 'Bar', because branches are \nrepresented unambiguously after 'gc' (not as file names).\n\n-- Hannes\n"},{"id":"344299","messageId":"nycvar.QRO.7.76.6.1804100813590.55@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz","threadId":"48252","inReplyTo":"CAGZ79kZ6xWijnZZpcogVm_JCX3nGMzN8ebKyh1vYygNc_dqGFw@mail.gmail.com","subject":"Re: Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-04-10T06:15:59Z","receivedAt":"2018-04-10T06:16:06Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Stefan,\n\nOn Mon, 9 Apr 2018, Stefan Beller wrote:\n\n> AFAICT Git-for-Windows prefers to have a bug on github\n> https://github.com/git-for-windows/git/issues/new\n\nI try to follow Postel's Law for contributions and bug reports. If there\nis enough detail in the bug report on this here mailing list, that's good\nenough for me.\n\nIf details are missing, I frequently suggest to follow that link because\nsome excellent contributors spent quality time on the issue reporting\ntemplate, helping bug reporters to avoid incomplete reports.\n\nThanks,\nJohannes\n"},{"id":"344300","messageId":"nycvar.QRO.7.76.6.1804100825280.55@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz","threadId":"48252","inReplyTo":"CAFLu24kTRrAq3cOH5H1=nBT94p7uFSsaYJsUC-wN1brPFHk3mQ@mail.gmail.com","subject":"Re: Windows > git.exe > the result of \"git branch\" does not always highlight the current branch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-04-10T06:30:45Z","receivedAt":"2018-04-10T06:30:51Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Hari,\n\nOn Mon, 9 Apr 2018, Hari Lubovac wrote:\n\n> I don't know which party compiled it. I'm pretty sure I downloaded the\n> installer from https://git-scm.com/downloads, although it might have\n> come shipped with Microsoft Visual Studio, which I use.\n\nIn both cases, this would be Git for Windows.\n\n> I forgot this detail earlier:\n> \n> git --version\n> git version 2.16.1.windows.2\n> \n> I'm a little behind; maybe I should upgrade.\n\nIt is not quite *necessary* to upgrade, but you will get a couple nice new\nfeatures and nice bug fixes.\n\nBut the bug you reported is still there ;-)\n\n> I just reported the same here:\n> https://github.com/git-for-windows/git/issues/1623\n\nThank you for opening this bug report. There are other bug reports\ndescribing related issues; they might even be covered by the same fixes.\n\nAssuming that you are eager enough to see this fixed, I started describing\nhow to go about building Git for Windows, where the code is located that\nneed to be fixed, and how to go about fixing it.\n\nThanks,\nJohannes\n"}]}