Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on checkout with branch name containing slash #295

Closed
zdateh opened this issue Oct 25, 2023 · 2 comments · Fixed by #316
Closed

Error on checkout with branch name containing slash #295

zdateh opened this issue Oct 25, 2023 · 2 comments · Fixed by #316
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)

Comments

@zdateh
Copy link

zdateh commented Oct 25, 2023

image

The full error is:

M	rtn/saCLN05.mac

fatal: cannot lock ref 'refs/heads/feature': 'refs/heads/feature/smxc_latest' exists; cannot create 'refs/heads/feature'

The modified *.mac I know about, but git would normally be fine with branchcheckout when a file is modified. It looks like the branchname is causing a fatal severe error. The branch being checked out via the studio Git UI is
feature/chgNNNNNN_some_description
The error mentions another branch
feature/smxc_latest
which also exists in the repo, but wasn't checked out immediately previously. My guess is the slash is confusing the scripts in some way, causing multiple branch names containing feature/* to clash in some way? Just my guess!

Doing the checkout of the same branch via Git bash works fine:

Switched to a new branch 'feature/chg0172358_contact_detail_BEDs'
M       rtn/saCLN05.mac
branch 'feature/chg0172358_contact_detail_BEDs' set up to track 'origin/feature/chg0172358_contact_detail_BEDs'.

Thanks,
Chris

@isc-tleavitt
Copy link
Collaborator

isc-tleavitt commented Oct 25, 2023

@zdateh could you grab the full git command being run from the IRIS audit database?

@zdateh
Copy link
Author

zdateh commented Oct 25, 2023

It seems to run many O/S commands recorded separately in the audit when using the UI, but I think it's this one (censored out some PID):

Execute O/S command
Directory: g:\nbss\cache\dev_cb_app\
Command: "C:\Program Files\Git\bin\git.exe" -C C:\SOURCECONTROL\DEV_CJB\database\ -c "core.sshCommand=ssh -F /dev/null -o StrictHostKeyChecking=accept-new -i C:\\Users\\My.Name\\.ssh\\id_rsa" -c user.name=My.Name -c [email protected] -c color.ui=true checkout -b feature origin/feature/chg0172358_contact_details_from_bs_select
Flags: /SHELL /STDOUT="C:\Users\other.name\AppData\Local\Temp\Jg6n98us"
/STDERR="C:\Users\other.name\AppData\Local\Temp\T9nxSibG"

Perhaps the slashes need escaping in the branch name?

@isc-tleavitt isc-tleavitt added bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers) labels Dec 7, 2023
@isc-tleavitt isc-tleavitt added this to the Q1 2024 Polishing milestone Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants