From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
"Christian Couder" <christian.couder@gmail.com>,
git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Stefan Beller" <sbeller@google.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Jonathan Tan" <jonathantanmy@google.com>,
"Duy Nguyen" <pclouds@gmail.com>,
"Derrick Stolee" <stolee@gmail.com>,
"Carlos Martín Nieto" <cmn@dwim.me>,
"Michael Haggerty" <mhagger@alum.mit.edu>,
"David Turner" <novalis@novalis.org>,
"Christian Couder" <chriscool@tuxfamily.org>,
"David Turner" <dturner@twopensource.com>
Subject: Re: [PATCH] t: make many tests depend less on the refs being files
Date: Mon, 21 May 2018 13:49:40 +0200 [thread overview]
Message-ID: <20180521114940.11288-1-szeder.dev@gmail.com> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1805211126140.77@tvgsbejvaqbjf.bet>
> > diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
> > index 8f5c811dd7..c3b89ae783 100755
> > --- a/t/t9903-bash-prompt.sh
> > +++ b/t/t9903-bash-prompt.sh
> > @@ -148,7 +148,7 @@ test_expect_success 'prompt - inside .git directory' '
> > test_expect_success 'prompt - deep inside .git directory' '
> > printf " (GIT_DIR!)" >expected &&
> > (
> > - cd .git/refs/heads &&
> > + cd .git/objects &&
> > __git_ps1 >"$actual"
> > ) &&
> > test_cmp expected "$actual"
>
> This one looks wrong.
It's right, though.
> Why not `cd .git` instead?
That case is covered in the previous test.
Once upon a time it mattered how deep we were in the .git directory
when running __git_ps1(), because it executed different branches of a
long-ish if-elif chain. For the prompt it doesn't matter anymore,
because those ifs were eliminated, but for the completion script it
still does, which brings us to:
Christian! There is a similar test, '__git_find_repo_path - parent is
a .git directory' in 't9902-completion.sh', which, too, performs a 'cd
.git/refs/heads'.
next prev parent reply other threads:[~2018-05-21 11:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 5:51 [PATCH] t: make many tests depend less on the refs being files Christian Couder
2018-05-21 9:41 ` Johannes Schindelin
2018-05-21 11:49 ` SZEDER Gábor [this message]
2018-05-23 5:27 ` Christian Couder
2018-05-21 12:30 ` Christian Couder
2018-05-21 12:37 ` Johannes Schindelin
2018-05-21 19:34 ` Stefan Beller
2018-05-23 5:33 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180521114940.11288-1-szeder.dev@gmail.com \
--to=szeder.dev@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=cmn@dwim.me \
--cc=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jonathantanmy@google.com \
--cc=jrnieder@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=novalis@novalis.org \
--cc=pclouds@gmail.com \
--cc=sbeller@google.com \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.