diff mbox series

[10/10] Update error message and code comment

Message ID 2a7169c8c1be425d4234e414c106ad1278aacdd6.1628004920.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Documentation updates: merge-strategies | expand

Commit Message

Elijah Newren Aug. 3, 2021, 3:35 p.m. UTC
From: Elijah Newren <newren@gmail.com>

There were two locations in the code that referred to 'merge-recursive'
but which were also applicable to 'merge-ort'.  Update them to more
general wording.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 builtin/merge.c | 2 +-
 sequencer.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Johannes Schindelin Aug. 3, 2021, 11:05 p.m. UTC | #1
Hi Elijah,

On Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:

> From: Elijah Newren <newren@gmail.com>
>
> There were two locations in the code that referred to 'merge-recursive'
> but which were also applicable to 'merge-ort'.  Update them to more
> general wording.
>
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
>  builtin/merge.c | 2 +-
>  sequencer.c     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/merge.c b/builtin/merge.c
> index a8a843b1f54..24b62a9c532 100644
> --- a/builtin/merge.c
> +++ b/builtin/merge.c
> @@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
>
>  		for (x = 0; x < xopts_nr; x++)
>  			if (parse_merge_opt(&o, xopts[x]))
> -				die(_("Unknown option for merge-recursive: -X%s"), xopts[x]);
> +				die(_("Unknown strategy option: -X%s"), xopts[x]);

Since we updated our rules to start `die()` messages with a lower-case
letter, we could sneak in this change here, too. That would save
translators one extra round.

Thank you,
Dscho

>
>  		o.branch1 = head_arg;
>  		o.branch2 = merge_remote_util(remoteheads->item)->name;
> diff --git a/sequencer.c b/sequencer.c
> index 7f07cd00f3f..a4e5c43fcf2 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -2065,7 +2065,7 @@ static int do_pick_commit(struct repository *r,
>  		/*
>  		 * We do not intend to commit immediately.  We just want to
>  		 * merge the differences in, so let's compute the tree
> -		 * that represents the "current" state for merge-recursive
> +		 * that represents the "current" state for the merge machinery
>  		 * to work on.
>  		 */
>  		if (write_index_as_tree(&head, r->index, r->index_file, 0, NULL))
> --
> gitgitgadget
>
Elijah Newren Aug. 3, 2021, 11:49 p.m. UTC | #2
On Tue, Aug 3, 2021 at 5:05 PM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> Hi Elijah,
>
> On Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:
>
> > From: Elijah Newren <newren@gmail.com>
> >
> > There were two locations in the code that referred to 'merge-recursive'
> > but which were also applicable to 'merge-ort'.  Update them to more
> > general wording.
> >
> > Signed-off-by: Elijah Newren <newren@gmail.com>
> > ---
> >  builtin/merge.c | 2 +-
> >  sequencer.c     | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/builtin/merge.c b/builtin/merge.c
> > index a8a843b1f54..24b62a9c532 100644
> > --- a/builtin/merge.c
> > +++ b/builtin/merge.c
> > @@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
> >
> >               for (x = 0; x < xopts_nr; x++)
> >                       if (parse_merge_opt(&o, xopts[x]))
> > -                             die(_("Unknown option for merge-recursive: -X%s"), xopts[x]);
> > +                             die(_("Unknown strategy option: -X%s"), xopts[x]);
>
> Since we updated our rules to start `die()` messages with a lower-case
> letter, we could sneak in this change here, too. That would save
> translators one extra round.

Sure, will do.
diff mbox series

Patch

diff --git a/builtin/merge.c b/builtin/merge.c
index a8a843b1f54..24b62a9c532 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -738,7 +738,7 @@  static int try_merge_strategy(const char *strategy, struct commit_list *common,
 
 		for (x = 0; x < xopts_nr; x++)
 			if (parse_merge_opt(&o, xopts[x]))
-				die(_("Unknown option for merge-recursive: -X%s"), xopts[x]);
+				die(_("Unknown strategy option: -X%s"), xopts[x]);
 
 		o.branch1 = head_arg;
 		o.branch2 = merge_remote_util(remoteheads->item)->name;
diff --git a/sequencer.c b/sequencer.c
index 7f07cd00f3f..a4e5c43fcf2 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2065,7 +2065,7 @@  static int do_pick_commit(struct repository *r,
 		/*
 		 * We do not intend to commit immediately.  We just want to
 		 * merge the differences in, so let's compute the tree
-		 * that represents the "current" state for merge-recursive
+		 * that represents the "current" state for the merge machinery
 		 * to work on.
 		 */
 		if (write_index_as_tree(&head, r->index, r->index_file, 0, NULL))