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

suggest git remote set-head when not set for remote #608

Closed
arthurzam opened this issue Aug 1, 2023 · 0 comments
Closed

suggest git remote set-head when not set for remote #608

arthurzam opened this issue Aug 1, 2023 · 0 comments
Assignees

Comments

@arthurzam
Copy link
Member

<+Flow> arthurzam: re https://github.com/pkgcore/pkgdev/issues/107, maybe pkgdev(/pkgcore?) could detect the cases where set remote head is not set and warn (or even try to fix it by running "git remote set-head origin -a")
<+Flow> I am still not sure how this happens, but it seems I am not the only one who ran into this
<@arthurzam> Flow: do you think something like: upon failure in normal happy path, try to run `git rev-parse ${REMOTE_NAME}`, and if it fails, suggest running `git remote set-head ${REMOTE_NAME}`
<@arthurzam> sounds fine?
<+Flow> sounds git, err good
<+Flow> arthurzam: but I think you really want to also use -a with set-head
<@arthurzam> Flow: yeah, agreed
<+Flow> and, fwiw, I think there are multiple call sites where pkgcore/pkgdev assumes that origin is a valid reference to origin/HEAD
<+Flow> so that's probably something to factor out in an extra method?
<@arthurzam> Flow: I think I'll try to do it more generic (I remember less the git code in the stack)
<+Flow> whatever floats your goat :)
@arthurzam arthurzam self-assigned this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant