git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git branch case insensitivity (Possible bug)

From
AGAlexander Gallego <gallego.alexx@gmail.com>
Date
Jan 9, 2013, 15:46 UTC
Message-ID
<CAL+iW28LdnNiho4KksLX_S_-+bKX+77GPJ0zqQfkz4JpBJRskw@mail.gmail.com>
Hello,
Here is a pastebin where I've reproduced the steps on a clean git repo.
http://pastebin.com/0vQZEat0
Brief description of the problem:
1.Basically one creates a local branch call it 'imp_fix' (branch off
master --> this doesn't matter)
2.One does work, commit, etc
3.One rebases imp_fix with master via: (inside imp_fix) git rebase master
4.One checks out master via: git checkout master
5.One merges an incorrect name "imp_Fix" (notice the capital F)
6.The expected output is that git would say, silly you --> that branch
does not exist.
7. Instead it merges (what I think is incorrectly) imp_fix.
Kindly let me know if I can provide more details.
For your convenience here is the paste:

agallego@agallego-macpro.local] /tmp $ git clone git@bitbucket.org/agallego/gitbug Cloning into 'gitbug'... warning: You appear to have cloned an empty repository.

[agallego@agallego-macpro.local] /tmp $ cd gitbug

[agallego@agallego-macpro.local] /tmp/gitbug $ ls

[agallego@agallego-macpro.local] /tmp/gitbug $ echo "Trying to reproduce a bug" > README

[agallego@agallego-macpro.local] /tmp/gitbug $ ls README

[agallego@agallego-macpro.local] /tmp/gitbug $ git add .

[agallego@agallego-macpro.local] /tmp/gitbug
$ git commit -am "adding readme"
[master (root-commit) 0bfd62a] adding readme
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 README
[agallego@agallego-macpro.local] /tmp/gitbug
$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 230 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: bb/acl: agallego is allowed. accepted payload.
To git@bitbucket.org:agallego/gitbug
 * [new branch]      master -> master

[agallego@agallego-macpro.local] /tmp/gitbug $ git checkout imp_fix error: pathspec 'imp_fix' did not match any file(s) known to git.

[agallego@agallego-macpro.local] /tmp/gitbug $ git branch imp_fix

[agallego@agallego-macpro.local] /tmp/gitbug $ git checkout imp_fix Switched to branch 'imp_fix'

[agallego@agallego-macpro.local] /tmp/gitbug $ echo "imp_fix" >> README

[agallego@agallego-macpro.local] /tmp/gitbug
$ git commit -am "step 2, create an imp_fix branch and then merge"
[imp_fix 178c8f3] step 2, create an imp_fix branch and then merge
 1 files changed, 1 insertions(+), 0 deletions(-)

[agallego@agallego-macpro.local] /tmp/gitbug $ ls README

[agallego@agallego-macpro.local] /tmp/gitbug $ git rebase master Current branch imp_fix is up to date.

[agallego@agallego-macpro.local] /tmp/gitbug $ git checkout master Switched to branch 'master'

[agallego@agallego-macpro.local] /tmp/gitbug
$ git merge imp_Fix
Merge made by the 'recursive' strategy.
 README |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
[agallego@agallego-macpro.local] /tmp/gitbug
$ git push origin master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 392 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: bb/acl: agallego is allowed. accepted payload.
To git@bitbucket.org:agallego/gitbug
   0bfd62a..f99f8a1  master -> master

Sincerely, Alexander Gallego

---*---
------*
*  *  *
Next: Andreas Ericsson
Message 1 of 5 in “git branch case insensitivity (Possible bug)”
  1. Alexander GallegoJan 9, 2013
  2. Andreas EricssonJan 9, 2013
  3. Alexander GallegoJan 9, 2013
  4. Johannes SixtJan 9, 2013
  5. Joshua JensenJan 9, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.