summaryrefslogtreecommitdiff
path: root/t/t5100/msg0005
diff options
context:
space:
mode:
authorLibravatar Jean-Noel Avila <jn.avila@free.fr>2017-05-11 14:06:32 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-12 15:18:13 +0900
commit6c486862636be1fe2d5785451c52f5379b0bad24 (patch)
treefb66b6b06626b230f60f9bced8d4cc845a7b6dec /t/t5100/msg0005
parentPrepare for 2.12.3 (diff)
downloadtgif-6c486862636be1fe2d5785451c52f5379b0bad24.tar.xz
usability: don't ask questions if no reply is required
There has been a bug report by a corporate user that stated that "spelling mistake of stash followed by a yes prints character 'y' infinite times." This analysis was false. When the spelling of a command contains errors, the git program tries to help the user by providing candidates which are close to the unexisting command. E.g Git prints the following: git: 'stahs' is not a git command. See 'git --help'. Did you mean this? stash and then exits. The problem with this hint is that it is not formally indicated as an hint and the user is in fact encouraged to reply to the question, whereas the Git command is already finished. The user was unlucky enough that it was the command he was looking for, and replied "yes" on the command line, effectively launching the `yes` program. The initial error is that the Git programs, when launched in command-line mode (without interaction) must not ask questions, because these questions would normally require a user input as a reply that they won't handle indeed. That's a source of confusion on UX level. To improve the general usability of the Git suite, the following rule was applied: if the sentence * appears in a non-interactive session * is printed last before exit * is a question addressing the user ("you") the sentence is turned into affirmative and proposes the option. The basic rewording of the question sentences has been extended to other spots found in the source. Requested at https://github.com/git/git-scm.com/issues/999 by rpai1 Signed-off-by: Jean-Noel Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100/msg0005')
0 files changed, 0 insertions, 0 deletions