sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
273 stars 14 forks source link

Sublime Merge doesn't properly push to branch with uppercase letters in name. #1801

Open neiraitheforgiven opened 10 months ago

neiraitheforgiven commented 10 months ago

Version info

Description

Pushes not working correctly when multiple branches with the same (but differently cased) names exist.

Steps to reproduce

Steps to reproduce the behavior:

1. Using a non-Sublime Merge tool, create a branch on your repository with a name that includes capitals. This is bad form but it happened. 2. Create a local branch off of that branch. The branch will have the name but all in lowercase. 3. Make changes to files on the local branch. 4. Commit the changes. Sublime Merge will show that you are ahead of the remote branch. 5. Push the changes. Sublime Merge will show that you are caught up to the remote branch, and the changes graph will show the remote as in sync with your local. 6. Fetch. 7. If you have reproduced the behavior, Sublime Merge will show that your branch is ahead of the remote branch by the same number of changes as you had in step 4, and the changes graph will show the remote as back to where it was in step 4. 8. You can repeat 3-6 over and over again. Fetching will repeat the behavior in 7, again and again. 9. Creating another local off of the branch or merging the local will either get you the current or the step 4 version as the source depending on whether you have fetched. It appears that Sublime Merge had created a second lowercase branch, was pushing to that branch, and was fetching from the uppercase branch. **Expected behavior** Really, the best thing to have had happen in this case is that, when I created the branch in the first place, Sublime Merge informed me that the branch name was non-standard and asked if I wanted to rename the origin branch to not be wrong. I would have said yes. Otherwise, I would have expected to see both branches. Finally, if neither happened, I would have expected pushing the branch to have updated the correct branch, and fetching to have fetched from the same branch as I was pushing to.