git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-filter-branch.sh: Allow running in bare repositories
Date: Wed, 23 Jul 2008 15:29:12 -0700	[thread overview]
Message-ID: <7vk5fc9qvb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080723215509.32438.49155.stgit@localhost> (Petr Baudis's message of "Wed, 23 Jul 2008 23:55:42 +0200")

Petr Baudis <pasky@suse.cz> writes:

> Commit 46eb449c restricted git-filter-branch to non-bare repositories
> unnecessarily; git-filter-branch can work on bare repositories just
> fine.
>
> Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Signed-off-by: Petr Baudis <pasky@suse.cz>
> ---
>
>   I have my own opinion about the readability-fork ratio in this particular
> case, but there's no use arguing about this. ;-)

Grouping commands is perfectly fine when you think the readers may find it
easlier to follow the logic if you grouped them.  Use { } for that kind of
grouping; I do not have any problem with that.

Use of subshell ( ) is often done by inexperienced people or by careless
people without thinking.  Sometimes you would explicitly want to have a
subshell (e.g. when you want to chdir to do something there but do not
want to affect the main program), and sometimes you don't (e.g. you are
grouping just for precedence, and want assignments and side effects done
inside the group visible by the main program).

Careless uses of ( ) wastes reviewer's time because the code inside has to
be studied to find out if the writer really wanted to have an isolated
separate process that subshell gives, or just being plain careless.

      parent reply	other threads:[~2008-07-23 22:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 22:37 [PATCH] git-filter-branch.sh: Allow running in bare repositories Petr Baudis
2008-07-22 23:27 ` Johannes Schindelin
2008-07-22 23:36   ` Petr Baudis
2008-07-23  0:09     ` Junio C Hamano
2008-07-23 21:55       ` Petr Baudis
2008-07-23 21:59         ` Johannes Schindelin
2008-07-23 22:06           ` Petr Baudis
2008-07-23 22:15             ` [PATCHv3] " Petr Baudis
2008-07-23 22:29               ` Junio C Hamano
2008-07-23 22:29         ` Junio C Hamano [this message]

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=7vk5fc9qvb.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.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;
as well as URLs for NNTP newsgroup(s).