-
Notifications
You must be signed in to change notification settings - Fork 413
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
Better error message for old versions of Git #11197
base: main
Are you sure you want to change the base?
Conversation
3125099
to
5b9b8ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I like that it doesn't add additional calls to detect that flag!
Added some comments to improve and probably needs to either be rebased on #11198 when it is merged or just exclude the change to setup.default.ml
.
Stdune.Io.read_file path, exit_code) | ||
~prefix:"dune" | ||
~suffix:"run_with_exit_code" | ||
~dir:(Path.of_string (Filename.get_temp_dir_name ())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put
let temp_dir = Path.of_string @@ Filename.get_temp_dir_name () in
in the definition of the function since that stays constant throughout the whole run of the function, no need to compute this on every run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, it'd be computed the same number of times if it were in the function definition - I checked it with some debug prints, but maybe I'm missing something.
c3edae8
to
d4c5928
Compare
d4c5928
to
d9c750f
Compare
Old versions of git don't support the flag. This patch detects this particular failure and prints an error message hinting that. Signed-off-by: Sudha Parimala <[email protected]>
Signed-off-by: Sudha Parimala <[email protected]>
d9c750f
to
346ac96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
(CI issue is unrelated to this PR)
Old versions of git don't support the
--no-write-fetch-head
flag. This patch detects this particular failure and prints an error message hinting that. Fixes #10976. Prints the following error message --