Re: [PATCH 2/4] usability: fix am and checkout for nevermind questions
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 3, 2017, 16:51 UTC
- Message-ID
- <20170503165158.GZ28740@aiede.svl.corp.google.com>
- In-Reply-To
- <20170503162931.30721-2-jn.avila@free.fr>
Jean-Noel Avila wrote:
> Subject: usability: fix am and checkout for nevermind questions > > Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Thanks for working on improving Git's UX. I agree with the goal in general (we should not gratuitously surprise users) but I think I lack context for appreciating this particular example.
This is a good place to describe the motivation behind the patch and what effective change it would have.
[...]
> +++ b/builtin/am.c
[...]
> if (is_empty_file(am_path(state, "patch"))) {
> - printf_ln(_("Patch is empty. Was it split wrong?"));
> + printf_ln(_("Patch is empty. It may have been split wrong."));[...]
> if (unmerged_cache()) {
> printf_ln(_("You still have unmerged paths in your index.\n"
> - "Did you forget to use 'git add'?"));
> + "You might want to use 'git add' on them."));[...]
> if (opts.new_branch && argc == 1)
> die(_("Cannot update paths and switch to branch '%s' at the same time.\n"
> - "Did you intend to checkout '%s' which can not be resolved as commit?"),
> + "'%s' can not be resolved as commit, but it should."),In the current state I think this patch makes things worse (questions are not automatically a bad thing), which would make it especially useful to see more about the motivation so we can find out whether there's another way.
Thanks, Jonathan