Re: [PATCH] git-credential-store: skip empty lines and comments from store
- From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
- Date
- Apr 27, 2020, 00:46 UTC
- Message-ID
- <20200427004640.GA28818@Carlos-MBP>
- In-Reply-To
- <CAPig+cR8HKcbNxxw65ERz0iHvnO5aC6RXvF9NjvFTySXpcHCSQ@mail.gmail.com>
On Sun, Apr 26, 2020 at 08:19:35PM -0400, Eric Sunshine wrote:
Show 13 quoted lines
> [Cc:+Dirk -- so he knows his bug report[1] wasn't ignored] > On Sun, Apr 26, 2020 at 7:48 PM Carlo Marcelo Arenas Belón > <carenas@gmail.com> wrote: > > diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh > > @@ -120,4 +120,21 @@ test_expect_success 'erase: erase matching credentials from both xdg and home fi > > +test_expect_success 'get: allow for empty lines or comments in store file' ' > > + echo "#this is a comment" >"$HOME/.git-credentials" && > > + echo "" >>"$HOME/.git-credentials" && > > + echo "https://user:pass@example.com" >>"$HOME/.git-credentials" && > > + echo " " >>"$HOME/.git-credentials" && > > Is there a reason you don't use a here-doc for the above (which would > be less noisy)? For instance:
because I didn't knew it existed ;), thanks for your help and will include for next version.
Carlo