From: Junio C Hamano Date: Mon, 12 Jul 2010 06:08:24 GMT Subject: Re: [PATCH 1/2] lib-rebase.sh: fake-editor.sh: Allow checking of commit header(s) in $GIT_EDITOR Message-ID: <7v7hl1fd0n.fsf@alter.siamese.dyndns.org> In-Reply-To: <1278764821-32647-1-git-send-email-ayiehere@gmail.com> Nazri Ramliy writes: > +test -z "$EXPECT_HEADER" || > + ( > + grep '^pick' < "$1" | cut -d' ' -f3- > commit_headers.$$ && Sending output from grep to cut does not sound very cool; wouldn't a single "sed" invocation more appropriate? > + diff "$EXPECT_HEADER" commit_headers.$$ > /dev/null Is "test_cmp" inappropriate here for some reason? > + ) || Do you need a subshell for this, or just a grouping {} sufficient? > + exit