Repository navigation
Do not report all git fetch errors as "revision not found". - #16623
Conversation
8b68a13 to
04e7188
Compare
Signed-off-by: mefyl <quentin@tarides.com>
04e7188 to
cb360cd
Compare
|
This is the minimal non opinionated fix; @Alizter suggested moving the git output at the end, I have a separate MR ready for that since this might be more debatable. (unfortunately I don't think we can make a PR stack across repositories in github) |
Any reason not to target that PR at this fork? FWIW, forwarding the git error seems the most helpful to me, prima facie! |
I did not find how to; there is no branch in |
|
Stacked GitHub PRs don't work across forks unfortunately. I typically don't bother with them and just keep the earlier commits in the later PRs, since they will go away once it is rebased. |
Fair point, here goes: #16628 |
Description
Do not over-interpret a failure from git: report that we "could not fetch $REV from $REMOTE", not that the revision does not exist in the remote, which is wrong if eg. the remote is not accessible.
Related Issue and Motivation
Fixes #16466
Other design options
This does not try to be smart and determine the actual reason, in hope that the actual error from git included in the output will give enough information.
Git always exits 128 so some alternatives could be:
git ls-remoteto determine whether the remote is reachable, but the additional network roundtrip looks more like a liability to me.All in all I do not think it's worth the hassle.
Checklist