Re: [PATCH] submodule: check for NULL return of get_submodule_ref_store()
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 28, 2018, 20:08 UTC
- Message-ID
- <CAGZ79kYD+RC_Z7AH_uH9tZSDHhkikML4HkxUNGxkW8voHJ1i3A@mail.gmail.com>
- In-Reply-To
- <CAPig+cT1Yp8J8E0VDKdxvPdVD-UBsyDfQS+a83zOAW11ayfhnA@mail.gmail.com>
On Wed, Mar 28, 2018 at 11:57 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 14 quoted lines
> On Wed, Mar 28, 2018 at 2:38 PM, Stefan Beller <sbeller@google.com> wrote: >> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh >> @@ -821,6 +821,18 @@ test_expect_success 'moving the superproject does not break submodules' ' >> +test_expect_success 'moving the submodule does not break the superproject' ' >> + ( >> + cd addtest2 && >> + >> + mv repo repo.bak && >> + git submodule status >actual && >> + grep -e "^-" -e repo actual && >> + >> + mv repo.bak repo > > Should this "move back" be encapsulated in a test_when_finished?
I thought about that, but decided against it for some reason as I was debating where to put the test_when_finished. I mostly saw those at the very beginning of a test and wondered if it can be called from within a subshell. (I'd not want to put it at the beginning but rather adjacent to the move.)