Closed BerkeleyTrue closed 1 year ago
Ah yes, I thought it had been fixed with #192 or another issue that I am not recalling at the moment. Thanks for filing the issue; I'll look into it.
Would you mind running with RUST_LOG=debug RUST_BACKTRACE=1 gfold
? Please feel free to redact any sensitive information, though I doubt that'll be the case.
@nickgerace Here is the output in a gist
https://gist.github.com/BerkeleyTrue/b9699f9dbd27e6b11e71ce57b314d2a6
I'm also still seeing this issue when the remote is something else then origin
.
Thank you @BerkeleyTrue and @AckslD. I'll try to catch this bug by adjusting the integration test payload and see what I can do.
@nickgerace I made an attempt to add a failing test reproducing this in #210. My rust skills are not very high but I hope it can help to find the underlying issue :)
Merged #210 and going to look further. CI needs to catch this as well if it does not.
Thank to @AckslD's PR, I think I figured it out.
The app tries to determine if a repository (with its current checked out branch) is in the "unpushed" state by checking if the local branch has a corresponding remote. If it does, then we check if the commits match. If it doesn't then we assume that the state is "unpushed". The problem here was in the latter check. During that check, we try to resolve the reference with a given short name, but we would fail if we could not. Well, if a remote branch doesn't exist with that short name (e.g. origin/HEAD
), then we will always fail, which is undesired behavior. I believe #215 should solve the issue.
EDIT: if #215 did not solve the problem, I'll re-open this issue.
Thanks @nickgerace, things seem to indeed work now for me :)
Glad to hear!
After updating to 4.0 recently I started experiencing this issue.
Error: no reference found for shorthand 'origin/HEAD'; class=Reference (4); code=NotFound (-3)
Downgrading back to 3.0 doesn't show the same issue
I saw there was a PR for a similar issue that was merged in quite some time ago. Did that not make it into the new release?