Creating branch can fail silently
See original GitHub issueDescription
If I have a branch enhancement/1
and I try to create enhancement/1/test
in the desktop GUI, it doesn’t create the branch as expected.
Version
- GitHub Desktop: 1.4.3
- Operating system: Microsoft Windows [Version 6.1.7601]
Steps to Reproduce
- Create any branch with this format:
some/branch/name
- Attempt to create a branch using the name from step 1 like this:
some/branch/name/any/number/of/slashes
Expected Behavior
I would have expected that the branch would be created or that I would be notified that it couldn’t be created.
Actual Behavior
The create branch box closes with no error indication and no branch created.
Additional Information
I did attempt to create a similar structure branch in git and received this error:
git branch "enhancement/1/test"
fatal: cannot lock ref 'refs/heads/enhancement/1/test': 'refs/heads/enhancement/1' exists; cannot create 'refs/heads/enhancement/1/test'
Logs
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
How can I make `git fetch --all` fail/show me failures ...
Add -q (or --quiet ) to silence the success messages. Then you're left with only error messages (if any). git fetch --all -pq....
Read more >Bug #1335638 “git fetch fails silently if remote repo is not che...”
Reproduction steps: 1) Create a git repository that has no branches at all (detached HEAD and no branches).
Read more >Branch merge silently fails | Sourcetree For Mac - Jira
Create a branch 'production'; Perform a commit in the branch; Run the following command in the repo so that it will have ambiguous...
Read more >git checkout [branch] silently fails, branch given in makefile ...
I should have mentioned: I'm running Drush 5.9, but a quick peek at the make.download.inc on the 8.x-6.x branch indicates this logic is ......
Read more >How to handle errors with grace: failing silently is not an option
Failing silently means errors can go undetected for quite a while before exploding suddenly at inconvenient and unpredictable times. Usually ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That message feels confusing to me since the user might not realize they’re creating files and folders when they make a new branch.
We had this on a project as well, we had
/channels
(a demo/proof-of-concept branch) which turned into a massive project and we wanted/channels/question-list
,/channels/auth-relay
, etc. I’m not sure it’s uncommon…I think the transform of something minor into something that grows might hit this case fairly often.I’d suggest a more generic error message, telling the user:
…or some such. Just saying: the fact that it’s directories underneath need not be a concern of the user IMO, I agree with others here on that front.