Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Steven Cole <elenstev@mesatop.com>, Petr Baudis <pasky@ucw.cz>,
	git@vger.kernel.org
Subject: Re: [PATCH] Add cg-printenv command.
Date: Sun, 08 May 2005 19:38:11 -0700	[thread overview]
Message-ID: <7vpsw115v0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <1115601540.8949.104.camel@pegasus> (Marcel Holtmann's message of "Mon, 09 May 2005 03:19:00 +0200")

MH> Hi Steven,
>> The cg-printenv command will print exported git environment variables.
SC> +echo "AUTHOR_NAME="$AUTHOR_NAME
SC> +echo "AUTHOR_EMAIL="$AUTHOR_EMAIL
SC> +echo "AUTHOR_DATE="$AUTHOR_DATE
SC> +echo "COMMIT_AUTHOR_NAME="$COMMIT_AUTHOR_NAME
SC> +echo "COMMIT_AUTHOR_EMAIL="$COMMIT_AUTHOR_EMAIL

MH> I like that idea. It is much more handy then using env and grep for the
MH> variable names.

I wonder what this command is used for?  In a script to be
"eval"ed?  Or just interactively by the end-user?

Even if it is just for human consumption, I think the echo
commands I quoted above have double quotes backwards.  Wouldn't
it make more sense to quote the variables so shell expansion
would not lose whitespaces inside of variable values, like this?

    echo AUTHOR_NAME="$AUTHOR_NAME"
    echo AUTHOR_EMAIL="$AUTHOR_EMAIL"
    echo AUTHOR_DATE="$AUTHOR_DATE"
    echo COMMIT_AUTHOR_NAME="$COMMIT_AUTHOR_NAME"
    echo COMMIT_AUTHOR_EMAIL="$COMMIT_AUTHOR_EMAIL"

If it is for eval consumption of course they have to be much
more careful.


  reply	other threads:[~2005-05-09  2:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09  1:11 [PATCH] Add cg-printenv command Steven Cole
2005-05-09  1:19 ` Marcel Holtmann
2005-05-09  2:38   ` Junio C Hamano [this message]
2005-05-09  3:25     ` Steven Cole
2005-05-09  3:40       ` Sean
2005-05-09  3:59         ` Steven Cole
2005-05-09  7:24           ` Petr Baudis
2005-05-09 13:35             ` Steven Cole

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

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

  git send-email \
    --in-reply-to=7vpsw115v0.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=elenstev@mesatop.com \
    --cc=git@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=pasky@ucw.cz \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox