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

When requesting HEAD, dont use --branch #612

Merged
merged 3 commits into from Aug 30, 2021
Merged

Conversation

bbimber
Copy link
Contributor

@bbimber bbimber commented May 10, 2021

@jimhester - this is related to #580, but I missed it before.

When the bioc development branch is specified, remotes will use 'HEAD' as the branch. This results in something like:

Downloading Bioconductor repo https://git.bioconductor.org/packages/SingleR
'/usr/bin/git' clone --depth 1 --no-hardlinks --branch HEAD https://git.bioconductor.org/packages/SingleR /tmp/Rtmpnl7qak/file945***70f4705f
Cloning into '/tmp/Rtmpnl7qak/file945***70f4705f'...
warning: Could not find remote branch HEAD to clone.

I think the right solution is to not include "--branch" in the git command if the requested branch is HEAD. I believe this has been a long-standing issue, that could not easily have been hit before.

Catch additional uses of --branch
@bbimber
Copy link
Contributor Author

bbimber commented Jun 9, 2021

@jimhester hello - sorry to bug but I wanted to check back on this PR. Again, I think this bug would have been hard to encounter before; however, if one tries to checkout bioconductor packages where release = 'Dev' it will be hit. The problem (unless I'm missing something in git), is that 'HEAD' isnt a valid value for '--branch'. This PR checks for 'HEAD' and prevents adding '--branch=HEAD'. If there's another solution to this I'm happy to adjust. Thanks in advance.

@bbimber
Copy link
Contributor Author

bbimber commented Aug 11, 2021

@jimhester hey - thought i'd check back on this. i've been using this branch on github actions for a couple months and this fix does work. is there a chance you'd be willing to accept the PR?

@jimhester
Copy link
Member

Can you please add a bullet to NEWS? It should briefly describe the change and end with (@yourname, #issuenumber).

@bbimber
Copy link
Contributor Author

bbimber commented Aug 17, 2021

@jimhester done

@bbimber
Copy link
Contributor Author

bbimber commented Aug 23, 2021

@jimhester just following up: anything else you need me to do here?

@bbimber
Copy link
Contributor Author

bbimber commented Aug 30, 2021

@jimhester good morning - just thought i'd check back again. is there anything else you need?

@jimhester jimhester merged commit 35f204c into r-lib:master Aug 30, 2021
@jimhester
Copy link
Member

Thanks a bunch!

@bbimber
Copy link
Contributor Author

bbimber commented Aug 30, 2021

@jimhester great - thanks!

@bbimber bbimber deleted the git_head branch August 30, 2021 17:24
@bbimber bbimber restored the git_head branch September 13, 2021 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants