git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mark Rushakoff <mark.rushakoff@gmail.com>,
	Mark Rushakoff via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/1] Fix two documentation typos
Date: Sat, 3 Aug 2019 19:59:14 -0400	[thread overview]
Message-ID: <20190803235914.GA5353@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqsgqii9u3.fsf@gitster-ct.c.googlers.com>

On Sat, Aug 03, 2019 at 07:48:20AM -0700, Junio C Hamano wrote:

> > Then I noticed a "can not" and updated that and other occurrences in
> > Documentation to cannot. The glossary sentence with "can not" was
> > "Consequently, an object can not be changed." To me, that reads like "it is
> 
> Hmph, I am not a native speaker, but I have to say that this is the
> first time I heard that "I can not drive" to mean "I have a choice
> of not driving (even though I am capable of driving)".

I think in writing I would assume that "can not" is "unable to" (and a
brief skim of online resources indicates they have equivalent meanings).
But colloquially, I might say something like: "I can _not_ put mushrooms
in the soup if you'd prefer" (where the underscores indicate an emphasis
I'd give when speaking).

So I don't find it overly ambiguous, but I think there's no reason not
to prefer "cannot".

That said, I think in many error messages, "unable to" is often better
(and we already use it quite frequently). This one (that Mark mentioned
but didn't change in this patch) is especially bad:

  $ git grep -in 'can not' '*.c' | head -1
  builtin/checkout.c:834: fprintf(stderr, _("Can not do reflog for '%s': %s\n"),

because of the vague "do". Maybe "unable to create reflog for '%s': %s'"
would be better. Also, why isn't this an error()?

The other one he mentioned:

  $ git --no-pager grep -B2 -A3 'can not' builtin/mv.c
  builtin/mv.c-		else if (!strncmp(src, dst, length) &&
  builtin/mv.c-				(dst[length] == 0 || dst[length] == '/')) {
  builtin/mv.c:			bad = _("can not move directory into itself");
  builtin/mv.c-		} else if ((src_is_dir = S_ISDIR(st.st_mode))
  builtin/mv.c-				&& lstat(dst, &st) == 0)
  builtin/mv.c-			bad = _("cannot move directory over file");

is rather egregious as the message just below uses "cannot". And here
"cannot" makes more sense to me than "unable to", as we did not try a
thing that failed; it is literally something that one cannot do at all,
because it does not make sense. So it is Git saying "you cannot do
this", not "I was unable to do this". :)

-Peff

  reply	other threads:[~2019-08-03 23:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-03  5:33 Mark Rushakoff via GitGitGadget
2019-08-03  5:33 ` [PATCH 1/1] doc: typo: s/can not/cannot/ and s/is does/does/ Mark Rushakoff via GitGitGadget
2019-08-03 14:48 ` [PATCH 0/1] Fix two documentation typos Junio C Hamano
2019-08-03 23:59   ` Jeff King [this message]
2019-08-05 17:04     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190803235914.GA5353@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=mark.rushakoff@gmail.com \
    --subject='Re: [PATCH 0/1] Fix two documentation typos' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).