[PATCH] i18n: apply: split to fix a partial i18n message

Subsystems: the rest

DORMANTno replies

15 messages, 3 authors, 2016-06-15 · open the first message on its own page

[PATCH] i18n: apply: split to fix a partial i18n message

From: Jiang Xin <hidden>
Date: 2016-06-15 22:53:57

The 4th arg of "new mode (%o) of %s does not match old mode (%o)%s%s"
is blank string or string " of ". Even mark the string " of " for a
complete i18n, this message is still hard to translate right.

Split it into two slight different messages would make l10n teams happy.

Signed-off-by: Jiang Xin <redacted>
---
 builtin/apply.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index dda9ea0..b4428ea 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3262,10 +3262,18 @@ static int check_patch(struct patch *patch)
 		int same = !strcmp(old_name, new_name);
 		if (!patch->new_mode)
 			patch->new_mode = patch->old_mode;
-		if ((patch->old_mode ^ patch->new_mode) & S_IFMT)
-			return error(_("new mode (%o) of %s does not match old mode (%o)%s%s"),
-				patch->new_mode, new_name, patch->old_mode,
-				same ? "" : " of ", same ? "" : old_name);
+		if ((patch->old_mode ^ patch->new_mode) & S_IFMT) {
+			if (same)
+				return error(_("new mode (%o) of %s does not "
+					       "match old mode (%o)"),
+					patch->new_mode, new_name,
+					patch->old_mode);
+			else
+				return error(_("new mode (%o) of %s does not "
+					       "match old mode (%o) of %s"),
+					patch->new_mode, new_name,
+					patch->old_mode, old_name);
+		}
 	}
 
 	if (apply_data(patch, &st, ce) < 0)
-- 
1.7.10.2.559.g0ba0f00

Re: [PATCH] i18n: apply: split to fix a partial i18n message

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

On Thu, May 31, 2012 at 6:20 PM, Jiang Xin [off-list ref] wrote:
The 4th arg of "new mode (%o) of %s does not match old mode (%o)%s%s"
is blank string or string " of ". Even mark the string " of " for a
complete i18n, this message is still hard to translate right.
Your patch looks good. I have a habit of looking for similar spots and
the following patches are the result. These messages are not marked
for translation because I think mass-marking by file or by command is
better.

Not sure if it's the right way to fix these though. For example, while
1/1 looks very good from i18n perspective, code-wise it's quite ugly.
Grouping format strings in array also prevents gcc from checking
correct parameters, I think.

Nguyễn Thái Ngọc Duy (6):
  Remove i18n legos in notifying new branch tracking setup
  reflog: remove i18n legos in pruning message
  merge-recursive: remove i18n legos in conflict messages
  notes-merge: remove i18n legos in merge result message
  rerere: remove i18n legos in result message
  unpack-trees: remove i18n legos in unpack's porcelain error messages

 branch.c          | 48 +++++++++++++++++++++++++++++++++---------------
 builtin/reflog.c  |  8 ++++++--
 merge-recursive.c | 49 +++++++++++++++++++++++++++++++++----------------
 notes-merge.c     | 11 ++++++++---
 rerere.c          | 12 ++++++------
 unpack-trees.c    | 55 +++++++++++++++++++++++++++++++++----------------------
 6 files changed, 119 insertions(+), 64 deletions(-)

-- 
1.7.10.2.549.g9354186

[PATCH 1/6] Remove i18n legos in notifying new branch tracking setup

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 branch.c | 48 +++++++++++++++++++++++++++++++++---------------
 1 file changed, 33 insertions(+), 15 deletions(-)
diff --git a/branch.c b/branch.c
index eccdaf9..d8facf7 100644
--- a/branch.c
+++ b/branch.c
@@ -74,25 +74,43 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
 		strbuf_addf(&key, "branch.%s.rebase", local);
 		git_config_set(key.buf, "true");
 	}
+	strbuf_release(&key);
 
 	if (flag & BRANCH_CONFIG_VERBOSE) {
-		strbuf_reset(&key);
-
-		strbuf_addstr(&key, origin ? "remote" : "local");
-
-		/* Are we tracking a proper "branch"? */
-		if (remote_is_branch) {
-			strbuf_addf(&key, " branch %s", shortname);
-			if (origin)
-				strbuf_addf(&key, " from %s", origin);
+		if (rebasing) {
+			if (remote_is_branch) {
+				if (origin)
+					printf("Branch %s set up to track remote branch %s from %s by rebasing.\n",
+					       local, shortname, origin);
+				else
+					printf("Branch %s set up to track local branch %s by rebasing.\n",
+					       local, shortname);
+			} else {
+				if (origin)
+					printf("Branch %s set up to track remote ref %s by rebasing.\n",
+					       local, remote);
+				else
+					printf("Branch %s set up to track local ref %s by rebasing.\n",
+					       local, remote);
+			}
+		} else {
+			if (remote_is_branch) {
+				if (origin)
+					printf("Branch %s set up to track remote branch %s from %s.\n",
+					       local, shortname, origin);
+				else
+					printf("Branch %s set up to track local branch %s.\n",
+					       local, shortname);
+			} else {
+				if (origin)
+					printf("Branch %s set up to track remote ref %s.\n",
+					       local, remote);
+				else
+					printf("Branch %s set up to track local ref %s.\n",
+					       local, remote);
+			}
 		}
-		else
-			strbuf_addf(&key, " ref %s", remote);
-		printf("Branch %s set up to track %s%s.\n",
-		       local, key.buf,
-		       rebasing ? " by rebasing" : "");
 	}
-	strbuf_release(&key);
 }
 
 /*
-- 
1.7.10.2.549.g9354186

[PATCH 2/6] reflog: remove i18n legos in pruning message

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 builtin/reflog.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 062d7da..6cedcec 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -330,8 +330,12 @@ static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
 		printf("keep %s", message);
 	return 0;
  prune:
-	if (!cb->newlog || cb->cmd->verbose)
-		printf("%sprune %s", cb->newlog ? "" : "would ", message);
+	if (!cb->newlog || cb->cmd->verbose) {
+		if (cb->newlog)
+			printf("prune %s", message);
+		else
+			printf("would prune %s", message);
+	}
 	return 0;
 }
 
-- 
1.7.10.2.549.g9354186

[PATCH 3/6] merge-recursive: remove i18n legos in conflict messages

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 merge-recursive.c | 49 +++++++++++++++++++++++++++++++++----------------
 1 file changed, 33 insertions(+), 16 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 680937c..1cc6360 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1018,9 +1018,27 @@ static void handle_change_delete(struct merge_options *o,
 				 const unsigned char *o_sha, int o_mode,
 				 const unsigned char *a_sha, int a_mode,
 				 const unsigned char *b_sha, int b_mode,
-				 const char *change, const char *change_past)
+				 const char *change)
 {
 	char *renamed = NULL;
+	int idx;
+
+	const char *msg[] = {
+		"CONFLICT (rename/delete): %s deleted in %s and renamed in %s. Version %s of %s left in tree.",
+		"CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s of %s left in tree.",
+	};
+	const char *renamed_msg[] = {
+		"CONFLICT (rename/delete): %s deleted in %s and renamed in %s. Version %s of %s left in tree at %s.",
+		"CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s of %s left in tree at %s.",
+	};
+
+	if (!strcmp(change, "rename"))
+		idx = 0;
+	else if (!strcmp(change, "modify"))
+		idx = 1;
+	else
+		die("BUG: unsupport action %s", change);
+
 	if (dir_in_way(path, !o->call_depth)) {
 		renamed = unique_path(o, path, a_sha ? o->branch1 : o->branch2);
 	}
@@ -1034,22 +1052,21 @@ static void handle_change_delete(struct merge_options *o,
 		remove_file_from_cache(path);
 		update_file(o, 0, o_sha, o_mode, renamed ? renamed : path);
 	} else if (!a_sha) {
-		output(o, 1, "CONFLICT (%s/delete): %s deleted in %s "
-		       "and %s in %s. Version %s of %s left in tree%s%s.",
-		       change, path, o->branch1,
-		       change_past, o->branch2, o->branch2, path,
-		       NULL == renamed ? "" : " at ",
-		       NULL == renamed ? "" : renamed);
+		if (renamed)
+			output(o, 1, renamed_msg[idx], path, o->branch1,
+			       o->branch2, o->branch2, path, renamed);
+		else
+			output(o, 1, msg[idx], path, o->branch1,
+			       o->branch2, o->branch2, path);
 		update_file(o, 0, b_sha, b_mode, renamed ? renamed : path);
 	} else {
-		output(o, 1, "CONFLICT (%s/delete): %s deleted in %s "
-		       "and %s in %s. Version %s of %s left in tree%s%s.",
-		       change, path, o->branch2,
-		       change_past, o->branch1, o->branch1, path,
-		       NULL == renamed ? "" : " at ",
-		       NULL == renamed ? "" : renamed);
-		if (renamed)
+		if (renamed) {
+			output(o, 1, renamed_msg[idx], path, o->branch2,
+			       o->branch1, o->branch1, path, renamed);
 			update_file(o, 0, a_sha, a_mode, renamed);
+		} else
+			output(o, 1, msg[idx], path, o->branch2,
+			       o->branch1, o->branch1, path);
 		/*
 		 * No need to call update_file() on path when !renamed, since
 		 * that would needlessly touch path.  We could call
@@ -1085,7 +1102,7 @@ static void conflict_rename_delete(struct merge_options *o,
 			     orig->sha1, orig->mode,
 			     a_sha, a_mode,
 			     b_sha, b_mode,
-			     "rename", "renamed");
+			     "rename");
 
 	if (o->call_depth) {
 		remove_file_from_cache(dest->path);
@@ -1568,7 +1585,7 @@ static void handle_modify_delete(struct merge_options *o,
 			     o_sha, o_mode,
 			     a_sha, a_mode,
 			     b_sha, b_mode,
-			     "modify", "modified");
+			     "modify");
 }
 
 static int merge_content(struct merge_options *o,
-- 
1.7.10.2.549.g9354186

[PATCH 4/6] notes-merge: remove i18n legos in merge result message

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 notes-merge.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/notes-merge.c b/notes-merge.c
index 74aa77c..43d5ce0 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -523,9 +523,14 @@ static int merge_from_diffs(struct notes_merge_options *o,
 	conflicts = merge_changes(o, changes, &num_changes, t);
 	free(changes);
 
-	if (o->verbosity >= 4)
-		printf("Merge result: %i unmerged notes and a %s notes tree\n",
-			conflicts, t->dirty ? "dirty" : "clean");
+	if (o->verbosity >= 4) {
+		if (t->dirty)
+			printf("Merge result: %i unmerged notes and a dirty notes tree\n",
+			       conflicts);
+		else
+			printf("Merge result: %i unmerged notes and a clean notes tree\n",
+			       conflicts);
+	}
 
 	return conflicts ? -1 : 1;
 }
-- 
1.7.10.2.549.g9354186

[PATCH 5/6] rerere: remove i18n legos in result message

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 rerere.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/rerere.c b/rerere.c
index dcb525a..da18fc3 100644
--- a/rerere.c
+++ b/rerere.c
@@ -544,13 +544,13 @@ static int do_plain_rerere(struct string_list *rr, int fd)
 
 		if (has_rerere_resolution(name)) {
 			if (!merge(name, path)) {
-				if (rerere_autoupdate)
+				const char *msg;
+				if (rerere_autoupdate) {
 					string_list_insert(&update, path);
-				fprintf(stderr,
-					"%s '%s' using previous resolution.\n",
-					rerere_autoupdate
-					? "Staged" : "Resolved",
-					path);
+					msg = "Staged '%s' using previous resolution.\n";
+				} else
+					msg = "Resolved '%s' using previous resolution.\n";
+				fprintf(stderr, msg, path);
 				goto mark_resolved;
 			}
 		}
-- 
1.7.10.2.549.g9354186

[PATCH 6/6] unpack-trees: remove i18n legos in unpack's porcelain error messages

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:53:57

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 unpack-trees.c | 55 +++++++++++++++++++++++++++++++++----------------------
 1 file changed, 33 insertions(+), 22 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index ad40109..41c5714 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -53,35 +53,46 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
 void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 				  const char *cmd)
 {
-	int i;
+	int i, idx;
 	const char **msgs = opts->msgs;
-	const char *msg;
-	char *tmp;
-	const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches";
-	if (advice_commit_before_merge)
-		msg = "Your local changes to the following files would be overwritten by %s:\n%%s"
-			"Please, commit your changes or stash them before you can %s.";
+	struct strbuf msg = STRBUF_INIT;
+	const char *overwrite_advice[] = {
+		"Please, commit your changes or stash them before you can merge.",
+		"Please, commit your changes or stash them before you can switch branches."
+	};
+	const char *remove_untracked_advice[] = {
+		"Please move or remove them before you can merge.",
+		"Please move or remove them before you can switch branches."
+	};
+
+	if (!strcmp(cmd, "merge"))
+		idx = 0;
+	else if (!strcmp(cmd, "checkout"))
+		idx = 1;
 	else
-		msg = "Your local changes to the following files would be overwritten by %s:\n%%s";
-	tmp = xmalloc(strlen(msg) + strlen(cmd) + strlen(cmd2) - 2);
-	sprintf(tmp, msg, cmd, cmd2);
-	msgs[ERROR_WOULD_OVERWRITE] = tmp;
-	msgs[ERROR_NOT_UPTODATE_FILE] = tmp;
+		die("BUG: unsupported command %s", cmd);
+
+	strbuf_addf(&msg, "Your local changes to the following files "
+		    "would be overwritten by %s:\n%%s", cmd);
+	if (advice_commit_before_merge)
+		strbuf_addstr(&msg, overwrite_advice[idx]);
+	msgs[ERROR_WOULD_OVERWRITE] = strbuf_detach(&msg, NULL);
+	msgs[ERROR_NOT_UPTODATE_FILE] = msgs[ERROR_WOULD_OVERWRITE];
 
 	msgs[ERROR_NOT_UPTODATE_DIR] =
 		"Updating the following directories would lose untracked files in it:\n%s";
 
+	strbuf_addf(&msg, "The following untracked working tree "
+		    "files would be removed by %s:\n%%s", cmd);
 	if (advice_commit_before_merge)
-		msg = "The following untracked working tree files would be %s by %s:\n%%s"
-			"Please move or remove them before you can %s.";
-	else
-		msg = "The following untracked working tree files would be %s by %s:\n%%s";
-	tmp = xmalloc(strlen(msg) + strlen(cmd) + strlen("removed") + strlen(cmd2) - 4);
-	sprintf(tmp, msg, "removed", cmd, cmd2);
-	msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = tmp;
-	tmp = xmalloc(strlen(msg) + strlen(cmd) + strlen("overwritten") + strlen(cmd2) - 4);
-	sprintf(tmp, msg, "overwritten", cmd, cmd2);
-	msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = tmp;
+		strbuf_addstr(&msg, remove_untracked_advice[idx]);
+	msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = strbuf_detach(&msg, NULL);
+
+	strbuf_addf(&msg, "The following untracked working tree "
+		    "files would be overwritten by %s:\n%%s", cmd);
+	if (advice_commit_before_merge)
+		strbuf_addstr(&msg, remove_untracked_advice[idx]);
+	msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = strbuf_detach(&msg, NULL);
 
 	/*
 	 * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we
-- 
1.7.10.2.549.g9354186

Re: [PATCH 2/6] reflog: remove i18n legos in pruning message

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:53:57

Nguyễn Thái Ngọc Duy wrote:
quoted hunk
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -330,8 +330,12 @@ static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
 		printf("keep %s", message);
 	return 0;
  prune:
-	if (!cb->newlog || cb->cmd->verbose)
-		printf("%sprune %s", cb->newlog ? "" : "would ", message);
+	if (!cb->newlog || cb->cmd->verbose) {
+		if (cb->newlog)
+			printf("prune %s", message);
+		else
+			printf("would prune %s", message);
+	}
Thanks.  Style: how about

	if (!cb->newlog)
		printf("would prune %s", message);
	else if (cb->cmd->verbose)
		printf("prune %s", message);

?  I think that would be more readable than the lego original.

BTW I'm not sure if this message would be a good candidate for
translation.  Especially in the --dry-run case, it feels like output
that is intended to be simple enough for scripts to parse.  (Though on
the other hand, I don't know of any scripts or use cases that actually
parse it, so maybe nobody would mind.)

Re: [PATCH 3/6] merge-recursive: remove i18n legos in conflict messages

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:53:57

Nguyễn Thái Ngọc Duy wrote:
+	const char *msg[] = {
+		"CONFLICT (rename/delete): %s deleted in %s and renamed in %s. Version %s of %s left in tree.",
+		"CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s of %s left in tree.",
+	};
+	const char *renamed_msg[] = {
+		"CONFLICT (rename/delete): %s deleted in %s and renamed in %s. Version %s of %s left in tree at %s.",
+		"CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s of %s left in tree at %s.",
+	};
Is lego by sentence ok?  i.e., having 4 translated messages:

	CONFLICT (rename/delete): %s deleted in %s and renamed in %s.
	CONFLICT (modify/delete): %s deleted in %s and modified in %s.
	Version %s of %s left in tree.
	Version %s of %s left in tree at %s.

Re: [PATCH 3/6] merge-recursive: remove i18n legos in conflict messages

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:53:57

On Thu, May 31, 2012 at 8:52 PM, Jonathan Nieder [off-list ref] wrote:
Nguyễn Thái Ngọc Duy wrote:
quoted
+     const char *msg[] = {
+             "CONFLICT (rename/delete): %s deleted in %s and renamed in %s. Version %s of %s left in tree.",
+             "CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s of %s left in tree.",
+     };
+     const char *renamed_msg[] = {
+             "CONFLICT (rename/delete): %s deleted in %s and renamed in %s. Version %s of %s left in tree at %s.",
+             "CONFLICT (modify/delete): %s deleted in %s and modified in %s. Version %s of %s left in tree at %s.",
+     };
Is lego by sentence ok?  i.e., having 4 translated messages:

       CONFLICT (rename/delete): %s deleted in %s and renamed in %s.
       CONFLICT (modify/delete): %s deleted in %s and modified in %s.
       Version %s of %s left in tree.
       Version %s of %s left in tree at %s.
Yeah, should have separated these sentences, less work for translators.
-- 
Duy

Re: [PATCH 1/6] Remove i18n legos in notifying new branch tracking setup

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:53:57

Nguyễn Thái Ngọc Duy wrote:
Not sure if it's the right way to fix these though. For example, while
1/1 looks very good from i18n perspective, code-wise it's quite ugly.
Grouping format strings in array also prevents gcc from checking
correct parameters, I think.
[...]
quoted hunk
--- a/branch.c
+++ b/branch.c
@@ -74,25 +74,43 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
[...]
-		strbuf_addstr(&key, origin ? "remote" : "local");
-
-		/* Are we tracking a proper "branch"? */
-		if (remote_is_branch) {
-			strbuf_addf(&key, " branch %s", shortname);
-			if (origin)
-				strbuf_addf(&key, " from %s", origin);
+		if (rebasing) {
+			if (remote_is_branch) {
+				if (origin)
+					printf("Branch %s set up to track remote branch %s from %s by rebasing.\n",
+					       local, shortname, origin);
+				else
[...]
+			} else {
+				if (origin)
[...]
+			}
+		} else {
+			if (remote_is_branch) {
[...]

I think a table-driven version of this switchboard would be much
easier to read, even if it would hurt gcc's -Wformat checking.  If the
-Wformat safety is too precious to lose, would something like the
following work?

	switch (tracking_msg_flags) {
	case REBASING | REMOTE_IS_BRANCH | ORIGIN:
		printf(_("Branch %s set up to track remote branch %s ..."),
			...
		break;
	case REBASING | REMOTE_IS_BRANCH:
		printf(_(...

Re: [PATCH 2/6] reflog: remove i18n legos in pruning message

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:53:57

On Thu, May 31, 2012 at 8:45 PM, Jonathan Nieder [off-list ref] wrote:
Thanks.  Style: how about

       if (!cb->newlog)
               printf("would prune %s", message);
       else if (cb->cmd->verbose)
               printf("prune %s", message);

?  I think that would be more readable than the lego original.
thanks
BTW I'm not sure if this message would be a good candidate for
translation.  Especially in the --dry-run case, it feels like output
that is intended to be simple enough for scripts to parse.  (Though on
the other hand, I don't know of any scripts or use cases that actually
parse it, so maybe nobody would mind.)
it's gray area. reflog is not categorized as plumbing. Maybe adding
--plumbing for scripts?
-- 
Duy

Re: [PATCH 2/6] reflog: remove i18n legos in pruning message

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:53:57

Nguyen Thai Ngoc Duy wrote:
                                                       Maybe adding
--plumbing for scripts?
That wouldn't take care of existing scripts, and new scripts should
use LC_ALL=C to defend themselves when they don't want to be impacted
by i18n.

Do you have some other reason in mind that a script should choose to
pass --plumbing here?  Is it an output format flag specific to 'git
reflog expire', in the spirit of status --porcelain, or a more generic
"I care about output stability" flag that spans multiple commands?

Jonathan

Re: [PATCH 2/6] reflog: remove i18n legos in pruning message

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:53:57

On Thu, May 31, 2012 at 9:10 PM, Jonathan Nieder [off-list ref] wrote:
Nguyen Thai Ngoc Duy wrote:
quoted
                                                       Maybe adding
--plumbing for scripts?
That wouldn't take care of existing scripts, and new scripts should
use LC_ALL=C to defend themselves when they don't want to be impacted
by i18n.

Do you have some other reason in mind that a script should choose to
pass --plumbing here?  Is it an output format flag specific to 'git
reflog expire', in the spirit of status --porcelain, or a more generic
"I care about output stability" flag that spans multiple commands?
I was thinking (but without checking) that this is the only way a
script can check for expired reflog entries. Maybe something more
script friendly, like ref names only.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help