Re: [PATCH v2 2/2 / RFC] branch: quote branch/ref names to improve readability
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 8, 2017, 18:55 UTC
- Message-ID
- <CAGZ79ka779gwmLKuSumRdFj3PqXkUe8SfG2ri+qmf_9Z3gsckg@mail.gmail.com>
- In-Reply-To
- <20170808171136.31168-2-kaarticsivaraam91196@gmail.com>
On Tue, Aug 8, 2017 at 10:11 AM, Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> wrote:
> Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> > --- > branch.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-)
I like this patch.
In submodule.c we quote a lot of things (branches, submodules, paths), so this is another step to make the output as a whole more consistent. (Though wondering for non-submodule users, if they perceive it as inconsistency as other parts of the code may not follow the rigorous quoting)
Show 41 quoted lines
>
> diff --git a/branch.c b/branch.c
> index ad5a2299b..a40721f3c 100644
> --- a/branch.c
> +++ b/branch.c
> @@ -90,24 +90,24 @@ int install_branch_config(int flag, const char *local, const char *origin, const
> if (shortname) {
> if (origin)
> printf_ln(rebasing ?
> - _("Branch %s set up to track remote branch %s from %s by rebasing.") :
> - _("Branch %s set up to track remote branch %s from %s."),
> + _("Branch '%s' set up to track remote branch '%s' from '%s' by rebasing.") :
> + _("Branch '%s' set up to track remote branch '%s' from '%s'."),
> local, shortname, origin);
> else
> printf_ln(rebasing ?
> - _("Branch %s set up to track local branch %s by rebasing.") :
> - _("Branch %s set up to track local branch %s."),
> + _("Branch '%s' set up to track local branch '%s' by rebasing.") :
> + _("Branch '%s' set up to track local branch '%s'."),
> local, shortname);
> } else {
> if (origin)
> printf_ln(rebasing ?
> - _("Branch %s set up to track remote ref %s by rebasing.") :
> - _("Branch %s set up to track remote ref %s."),
> + _("Branch '%s' set up to track remote ref '%s' by rebasing.") :
> + _("Branch '%s' set up to track remote ref '%s'."),
> local, remote);
> else
> printf_ln(rebasing ?
> - _("Branch %s set up to track local ref %s by rebasing.") :
> - _("Branch %s set up to track local ref %s."),
> + _("Branch '%s' set up to track local ref '%s' by rebasing.") :
> + _("Branch '%s' set up to track local ref '%s'."),
> local, remote);
> }
> }
> --
> 2.14.0.rc1.434.g6eded367a
>