git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jeff King" <peff@peff.net>,
	"Torsten Bögershausen" <tboegi@web.de>,
	git@vger.kernel.org,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] t1308: do not get fooled by symbolic links to the source tree
Date: Fri, 3 Jun 2016 08:05:56 +0200	[thread overview]
Message-ID: <57511E44.1090708@kdbg.org> (raw)
In-Reply-To: <xmqqeg8fs0dw.fsf_-_@gitster.mtv.corp.google.com>

Am 03.06.2016 um 00:15 schrieb Junio C Hamano:
> When your $PWD does not match $(/bin/pwd), e.g. you have your copy
> of the git source tree in one place, point it with a symbolic link,
> and then "cd" to that symbolic link before running 'make test', one
> of the tests in t1308 expects that the per-user configuration was
> reported to have been read from the true path (i.e. relative to the
> target of such a symbolic link), but the test-config program reports
> a path relative to $PWD (i.e. the symbolic link).
>
> Instead, expect a path relative to $HOME (aka $TRASH_DIRECTORY), as
> per-user configuration is read from $HOME/.gitconfig and the test
> framework sets these shell variables up in such a way to avoid this
> problem.

> diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
> index 065d5eb..cf716b4 100755
> --- a/t/t1308-config-set.sh
> +++ b/t/t1308-config-set.sh
> @@ -237,7 +237,7 @@ test_expect_success 'iteration shows correct origins' '
>   	key=foo.bar
>   	value=from-home
>   	origin=file
> -	name=$(pwd)/.gitconfig
> +	name=$HOME/.gitconfig

I haven't tested this, yet, but my guess is that this breaks on Windows: 
test-config will produce C:/foo style path, but the updated test would 
expect /c/foo style path. Dscho, do you have an idea how to fix this?

>   	scope=global
>
>   	key=foo.bar
>

-- Hannes

  parent reply	other threads:[~2016-06-03  6:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 22:15 What's cooking in git.git (May 2016, #09; Tue, 31) Junio C Hamano
2016-06-02 14:01 ` What's cooking in git.git (May 2016, #09; Tue, 31) t1308 broken Torsten Bögershausen
2016-06-02 21:22   ` Junio C Hamano
2016-06-02 21:31     ` Junio C Hamano
2016-06-02 21:39       ` Jeff King
2016-06-02 22:15         ` [PATCH] t1308: do not get fooled by symbolic links to the source tree Junio C Hamano
2016-06-02 23:16           ` Jeff King
2016-06-02 23:23             ` Stefan Beller
2016-06-03  1:07               ` Jeff King
2016-06-03  6:05           ` Johannes Sixt [this message]
2016-06-03  6:10             ` Jeff King
2016-06-03  6:53               ` Johannes Sixt
2016-06-03  9:19                 ` Torsten Bögershausen
2016-07-14 12:35                   ` Johannes Schindelin

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=57511E44.1090708@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).