question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating branch can fail silently

See original GitHub issue

Description

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

  1. Create any branch with this format: some/branch/name
  2. 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

2018-10-25.desktop.production.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
j-f1commented, Oct 27, 2018

That message feels confusing to me since the user might not realize they’re creating files and folders when they make a new branch.

2reactions
NickCravercommented, Oct 27, 2018

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:

This branch path name conflicts with an existing path: <conflict branch path>. You can either change this branch or remove the previous branch to continue.

…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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found