Re: [PATCH v3 3/3] checkout: reorder option handling

2012-09-07 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy   writes:

> + if (opts->track != BRANCH_TRACK_UNSPECIFIED)
> + die(_("%s cannot be used with updating paths"), "--track");

I think most of the places we try to enclose these literals inside
quotes, so I'd squash in a patch to make this:

die(_("'%s' cannot be used with updating paths"), "--track");

and update others to match.

> + if (new->name && !new->commit)
> + die(_("Cannot switch branch to a non-commit '%s'."),
> + new->name);

This is one of the only few places that end a sentence with a full-stop.

> + /* Try to give more helpful suggestion, new_branch &&
> +argc > 1 will be caught later */

Style;

> + 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?"),
> + opts.new_branch, argv[0]);
>  
>   if (opts.force_detach)
>   die(_("git checkout: --detach does not take a path 
> argument"));

I tried this codepath and the message left me feeling uneasy.  I'd do:

die(_("git checkout: --detach does not take a path argument 
'%s'"),
argv[0]);

Other than these, I didn't find anything obviously wrong with my
final review before merging to 'next', so I'll merge it soonish.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 3/3] checkout: reorder option handling

2012-08-30 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy  writes:

>  Changes since v2 (the first two patches are not resent):
> ...
>   - merge cmd_checkout_entry() into checkout_paths()

I didn't think of this when I reviewed the previous one; I think it
makes sense.  Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html