diff options
author | Matthias Aßhauer <mha1993@live.de> | 2021-09-14 13:27:17 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-14 10:04:08 -0700 |
commit | a3952f8e7c0e74d9266bc9cf4ac50dd179129f72 (patch) | |
tree | 9c5cb48e1ce9461d8320bd41ab8094e3286e3f03 /Documentation/git.txt | |
parent | Git 2.33 (diff) | |
download | tgif-a3952f8e7c0e74d9266bc9cf4ac50dd179129f72.tar.xz |
help: make sure local html page exists before calling external processes
We check that git.html exists, regardless of the page the user wants to open.
Checking whether the requested page exists instead gives us a smoother user
experience in two use cases:
1) The requested page doesn't exist
When calling a git command and there is an error, most users reasonably expect
git to produce an error message on the standard error stream, but in this case
we pass the filepath to git web--browse which passes it on to a browser (or a
helper program like xdg-open or start that should in turn open a browser)
without any error and many GUI based browsers or helpers won't output such a
message onto the standard error stream.
Especially the helper programs tend to show the corresponding error message in
a message box and wait for user input before exiting. This leaves users in
interactive console sessions without an error message in their console,
without a console prompt and without the help page they expected.
2) git.html is missing for some reason, but the user asked for some other page
We currently refuse to show any local html help page when we can't find
git.html. Even if the requested help page exists. If we check for the requested
page instead, we can show the user all available pages and only error out on
those that don't exist.
Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git.txt')
0 files changed, 0 insertions, 0 deletions