git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Angel via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Angel <the.f8er@gmail.com>
Subject: Re: [PATCH] doc: fix a typo inside `--bare` section
Date: Sun, 07 Jun 2020 10:01:38 -0700	[thread overview]
Message-ID: <xmqqh7vmn72l.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.649.git.1591445695220.gitgitgadget@gmail.com> (Angel via GitGitGadget's message of "Sat, 06 Jun 2020 12:14:55 +0000")

"Angel via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Mark Williams <the.f8er@gmail.com>
>
> Add a word `variable` and a `$` sign before variable's
> name in `--bare` argument section. Without this word someone
> might be confused.
>
> Signed-off-by: Mark Williams <the.f8er@gmail.com>
> ---
>     doc: fix a typo inside --bare section
>     
>     doc: fix a typo inside --bare section
>     
>     Add a word variable and a $ sign before variable's name in --bare 
>     argument section. Without this word someone might be confused.

A quick and dirty

  $ git grep 'GIT_[A-Z]*[^A-Za-z0-9] .*environment' Documentation/

tells us that adding "environment variable" is probably the right
thing to do, but we should not add the variable dereference '$' in
front (and fix some that do spell $GIT_PAGER etc. to lose '$').

In shell, $V is a notation to always name the value in the variable,
and it is clearer to refer to the variable itself without the '$'
sign.  '$V' means "the value that currently is in the variable V".

	V=newvalue
	W="old value of $V"

This is unlike C where using a variable as lvalue on the left hand
side of assignment does not need different spelling as the variable
is used as rvalue, e.g.

	variable = newvalue;
	another_variable = 2 * variable;

> -Create a bare repository. If `GIT_DIR` environment is not set, it is set to the
> -current working directory.
> +Create a bare repository. If the `$GIT_DIR` environment variable is not set, it
> +is set to the current working directory.
>  
>  --object-format=<format>::
>  
>
> base-commit: 20514004ddf1a3528de8933bc32f284e175e1012

  reply	other threads:[~2020-06-07 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-06 12:14 [PATCH] doc: fix a typo inside `--bare` section Angel via GitGitGadget
2020-06-07 17:01 ` Junio C Hamano [this message]
2020-06-07 18:54   ` F8ER

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=xmqqh7vmn72l.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=the.f8er@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).