Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-06-03 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I.e. I was trying to avoid printing out the "error: pathspec 'master' > did not match any file(s) known to git." error altogether. That's still > arguably a good direction, since we *know* "master" would have otherwise > matched a remote branch, so that's

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-06-01 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 01 2018, Eric Sunshine wrote: > On Thu, May 31, 2018 at 3:52 PM, Ævar Arnfjörð Bjarmason > wrote: >> As the "checkout" documentation describes: >> >> If is not found but there does exist a tracking branch in >> exactly one remote (call it ) with a matching name, treat >>

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-06-01 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 01 2018, Junio C Hamano wrote: > Junio C Hamano writes: > >> Ævar Arnfjörð Bjarmason writes: >> >>> @@ -1269,6 +1270,16 @@ int cmd_checkout(int argc, const char **argv, const >>> char *prefix) >>> if (opts.patch_mode || opts.pathspec.nr) { >>> int ret =

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-06-01 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 01 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> @@ -1269,6 +1270,16 @@ int cmd_checkout(int argc, const char **argv, const >> char *prefix) >> if (opts.patch_mode || opts.pathspec.nr) { >> int ret = checkout_paths(, new_branch_info.name, >>

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-06-01 Thread Eric Sunshine
On Thu, May 31, 2018 at 3:52 PM, Ævar Arnfjörð Bjarmason wrote: > As the "checkout" documentation describes: > > If is not found but there does exist a tracking branch in > exactly one remote (call it ) with a matching name, treat > as equivalent to [...] / > This is a really useful

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-05-31 Thread Junio C Hamano
Junio C Hamano writes: > Ævar Arnfjörð Bjarmason writes: > >> @@ -1269,6 +1270,16 @@ int cmd_checkout(int argc, const char **argv, const >> char *prefix) >> if (opts.patch_mode || opts.pathspec.nr) { >> int ret = checkout_paths(, new_branch_info.name, >>

Re: [PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-05-31 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > @@ -1269,6 +1270,16 @@ int cmd_checkout(int argc, const char **argv, const > char *prefix) > if (opts.patch_mode || opts.pathspec.nr) { > int ret = checkout_paths(, new_branch_info.name, >

[PATCH v4 8/9] checkout: add advice for ambiguous "checkout "

2018-05-31 Thread Ævar Arnfjörð Bjarmason
As the "checkout" documentation describes: If is not found but there does exist a tracking branch in exactly one remote (call it ) with a matching name, treat as equivalent to [...] / hint: instead of ? Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt | 7