From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 32A941F597 for ; Wed, 18 Jul 2018 06:23:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726317AbeGRHAA (ORCPT ); Wed, 18 Jul 2018 03:00:00 -0400 Received: from v055125.ppp.asahi-net.or.jp ([124.155.55.125]:39470 "EHLO mail.musha.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbeGRHAA (ORCPT ); Wed, 18 Jul 2018 03:00:00 -0400 Received: by mail.musha.org (Postfix, from userid 58) id 41VnCj5X5rznvwj; Wed, 18 Jul 2018 15:23:45 +0900 (JST) Received: from daemon.musha.org (daemon.local.idaemons.org [192.168.11.11]) by mail.musha.org (Postfix) with ESMTP id 41VnCW4K6MznvwZ; Wed, 18 Jul 2018 15:23:35 +0900 (JST) Date: Wed, 18 Jul 2018 15:23:35 +0900 Message-ID: <868t69oye0.knu@iDaemons.org> From: "Akinori MUSHA" To: Junio C Hamano Cc: Eric Sunshine , Git List Subject: Re: [PATCH] sequencer.c: terminate the last line of author-script properly In-Reply-To: References: <86a7qwpt9g.knu@iDaemons.org> Organization: Associated I. Daemons X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org That's perfectly fine with me. I just thought each test case would run in a separate shell process and that's why I chose not to use a subshell for the last lines. I've learned a lot from feedback from you all. Thanks! On Wed, 18 Jul 2018 08:25:22 +0900, Junio C Hamano wrote: > > I'll squash the following in (which I have been carrying in 'pu' for > the past few days) unless I hear otherwise soonish to correct the > issues raised during the review. > > Thanks. > > t/t3404-rebase-interactive.sh | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > index 2d189da2f1..b0cef509ab 100755 > --- a/t/t3404-rebase-interactive.sh > +++ b/t/t3404-rebase-interactive.sh > @@ -81,11 +81,13 @@ test_expect_success 'rebase -i writes out .git/rebase-merge/author-script in "ed > set_fake_editor && > FAKE_LINES="edit 1" git rebase -i HEAD^ && > test -f .git/rebase-merge/author-script && > - unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE && > - eval "$(cat .git/rebase-merge/author-script)" && > - test "$(git show --quiet --pretty=format:%an)" = "$GIT_AUTHOR_NAME" && > - test "$(git show --quiet --pretty=format:%ae)" = "$GIT_AUTHOR_EMAIL" && > - test "$(git show --quiet --date=raw --pretty=format:@%ad)" = "$GIT_AUTHOR_DATE" > + ( > + sane_unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE && > + eval "$(cat .git/rebase-merge/author-script)" && > + test "$(git show --quiet --pretty=format:%an)" = "$GIT_AUTHOR_NAME" && > + test "$(git show --quiet --pretty=format:%ae)" = "$GIT_AUTHOR_EMAIL" && > + test "$(git show --quiet --date=raw --pretty=format:@%ad)" = "$GIT_AUTHOR_DATE" > + ) > ' > > test_expect_success 'rebase -i with the exec command' ' > -- > 2.18.0-129-ge3331758f1 >