{"thread":{"id":"34328","subject":"git fetch --prune removes branches from origin/ with inconsistent case in path names","startedAt":"2013-07-02T20:37:25Z","lastAt":"2015-03-30T13:58:59Z","messageCount":2,"participants":["Lee Winder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"222401","messageId":"CAJz8ETuFC=STDRbPOxsTDdYbuMh0phdR3AYCzW3AvOrSAmKpWw@mail.gmail.com","threadId":"34328","inReplyTo":null,"subject":"git fetch --prune removes branches from origin/ with inconsistent case in path names","fromName":"Lee Winder","fromEmail":"lee.winder@gmail.com","sentAt":"2013-07-02T20:37:25Z","receivedAt":"2013-07-02T20:37:25Z","isPatch":false,"sender":{"key":"lee.winder@gmail.com","avatar":null},"body":"When using git fetch --prune, git will remove any branches from\nremotes/origin/ that have inconsistent case in folder names.\n\nThis issue has been verified in versions 1.7.10.2, 1.7.11.1 and 1.8.3.2.\n\nI've described the reproduction steps here as I carried them out, and\nlisted the plaforms I used to replicate it.  The issue will most\nlikely occur on a different combination of platforms also.\n\n- On Mac, create a new repository and push a master branch to a central server\n- On Mac, create a branch called feature/lower_case_branch and push\nthis to the central server (note that 'feature' is all lower case)\n- On Windows, clone the repository but stay on master, do not checkout\nthe feature/lower_case_branch branch\n- On Windows, branch from master a branch called\nFeature/upper_case_branch (note the uppercase F) and push to the\nserver\n- On Mac, run git fetch and see that\nremote/origin/Feature/upper_case_branch is updated\n\nCouple of things to note here\n1) In the git fetch output it lists the branch with an upper case 'F'\n  * [new branch]      Feature/upper_case_branch ->\norigin/Feature/upper_case_branch\n2) When I run git branch --all it is actually listed with a lower case 'f'\n  remotes/origin/feature/upper_case_branch\n\nNow the problem happens when I run git fetch --prune, I get the following output\n  * [new branch]      Feature/upper_case_branch ->\norigin/Feature/upper_case_branch\n  x [deleted]         (none)     -> origin/feature/upper_case_branch\n\nNote the new branch uses 'F' and the deleted branch uses 'f'.\n\nThe results of this bug seem to be\n* Everytime I call git fetch it thinks Feature/upper_case_branch is a\nnew branch (if I call 'git branch' multiple times I always get the\n[new branch] output)\n* Whenever I run with --prune, git will *always* remove the branch\nwith a different folder name (from a case sensitive perspective) than\nthe one originally created on the current machine.\n\n\nThanks\nLee\n"},{"id":"258672","messageId":"loom.20150330T155535-398@post.gmane.org","threadId":"34328","inReplyTo":"CAJz8ETuFC=STDRbPOxsTDdYbuMh0phdR3AYCzW3AvOrSAmKpWw@mail.gmail.com","subject":"Re: git fetch --prune removes branches from origin/ with inconsistent case in path names","fromName":"","fromEmail":"","sentAt":"2015-03-30T13:58:59Z","receivedAt":"2015-03-30T13:58:59Z","isPatch":false,"sender":null,"body":"Lee Winder <lee.winder <at> gmail.com> writes:\n\n> \n> When using git fetch --prune, git will remove any branches from\n> remotes/origin/ that have inconsistent case in folder names.\n> ...\n> Thanks\n> Lee\n> \n\n\nHello,\n\nSame type of issue here using Jenkins.\n\nIn a gitBash console:\n$ git branch --list\n* feature/testCI1\n  feature/testCI2\n\nIn Jenkins Console output (git plugin is 2.3.5):\nSeen branch in repository origin/Feature/testCI1\nSeen branch in repository origin/Feature/testCI2\n\nBoth are running on Windows\n"}]}