path: root/builtin/read-tree.c
diff options
authorJean-Noel Avila <>2017-05-11 12:06:32 (GMT)
committerJunio C Hamano <>2017-05-12 06:18:13 (GMT)
commit6c486862636be1fe2d5785451c52f5379b0bad24 (patch)
treefb66b6b06626b230f60f9bced8d4cc845a7b6dec /builtin/read-tree.c
parent49800c940790cc7465d1b03e08d472ffd8684808 (diff)
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 by rpai1 Signed-off-by: Jean-Noel Avila <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/read-tree.c')
0 files changed, 0 insertions, 0 deletions