Re: [PATCH 04/18] t1401-symbolic-ref: avoid direct filesystem access
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Apr 21, 2021, 09:09 UTC
- Message-ID
- <CAFQ2z_MMAM6jZ0+zRi+8fyS69Qw4fKQSsXgQW2zW7tcMdmN=QQ@mail.gmail.com>
- In-Reply-To
- <871rb45ftz.fsf@evledraar.gmail.com>
On Wed, Apr 21, 2021 at 8:09 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 23 quoted lines
>
>
> On Mon, Apr 19 2021, Han-Wen Nienhuys via GitGitGadget wrote:
>
> > From: Han-Wen Nienhuys <hanwen@google.com>
> >
> > Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> > ---
> > t/t1401-symbolic-ref.sh | 23 +++++++++--------------
> > 1 file changed, 9 insertions(+), 14 deletions(-)
> >
> > diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh
> > index a4ebb0b65fec..fd5980d3fb40 100755
> > --- a/t/t1401-symbolic-ref.sh
> > +++ b/t/t1401-symbolic-ref.sh
> > @@ -7,18 +7,13 @@ test_description='basic symbolic-ref tests'
> > # the git repo, meaning that further tests will operate on
> > # the surrounding git repo instead of the trash directory.
> > reset_to_sane() {
> > - echo ref: refs/heads/foo >.git/HEAD
> > + git --git-dir .git symbolic-ref HEAD refs/heads/foo
>
> Isn't that "--git-dir .git" entirely redundant?See the comment above the changed line: we don't want auto-detection to clobber the surrounding git repo.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado