threads / patch / 26797

patchgit status: fix grammar when in detached head

Subject: [PATCH] git status: fix grammar when in detached head

## tl;dr

2 messages between Mar 19, 2011 and Mar 19, 2011. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Piotr Krukowiecki· Mar 19, 2011, 21:33 UTC · lore
Signed-off-by: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
---
 wt-status.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Not a native English speaker, but IMO the previous version isn't correct.

Show changes to wt-status.c +1 −1
diff --git a/wt-status.c b/wt-status.c
index 4daa8bb..3214f52 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -643,7 +643,7 @@ void wt_status_print(struct wt_status *s)
 		else if (!strcmp(branch_name, "HEAD")) {
 			branch_name = "";
 			branch_status_color = color(WT_STATUS_NOBRANCH, s);
-			on_what = "Not currently on any branch.";
+			on_what = "Not on any branch currently.";
 		}
 		color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "# ");
 		color_fprintf(s->fp, branch_status_color, "%s", on_what);
-- 
1.7.4.1.295.ged435

-- 
Piotr Krukowiecki
Jeff King· Mar 19, 2011, 22:16 UTC · re: Piotr Krukowiecki · lore

Re: [PATCH] git status: fix grammar when in detached head

On Sat, Mar 19, 2011 at 10:33:29PM +0100, Piotr Krukowiecki wrote:
> Not a native English speaker, but IMO the previous version isn't 
> correct.

The previous version is fine (well, it's not actually a complete sentence because it doesn't contain a verb, but that seems not to be the issue).

Breaking it down with the implied beginning, it is:
  [You are] not currently on any branch.
    |   |    |      |     \------------/
    1   2    3      4           5

1 = subject 2 = verb 3 = adverb (modifying "are") 4 = adverb (modifying "are") 5 = prepositional phrase functioning as predicate nominative

You can put an adverb before or after the verb it modifies. For clarity, it's usually a good idea to keep the adverb close to its verb, though in simple sentences it's not necessary, and putting the adverb at the beginning or end of the sentence can emphasize it.

So:
Show 10 quoted lines
> diff --git a/wt-status.c b/wt-status.c
> index 4daa8bb..3214f52 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -643,7 +643,7 @@ void wt_status_print(struct wt_status *s)
>  		else if (!strcmp(branch_name, "HEAD")) {
>  			branch_name = "";
>  			branch_status_color = color(WT_STATUS_NOBRANCH, s);
> -			on_what = "Not currently on any branch.";
> +			on_what = "Not on any branch currently.";

Both are correct, as is "Currently not on any branch." As would be "You currently are not on any branch" if we were including the implied subject and verb.

I think the current version is my favorite, as it gives the most emphasis to "not" and "branch", but that is just personal taste. At any rate, I'd rather not change it lightly as things like editor syntax highlighters recognize the current phrase (though I suppose they may soon have to deal with i18n issues anyway).

-Peff

← back to recent threads