From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <l.s.r@web.de>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Duy Nguyen" <pclouds@gmail.com>,
"Git Mailing List" <git@vger.kernel.org>,
"Ralf Thielow" <ralf.thielow@gmail.com>,
"Taufiq Hoven" <taufiq.hoven@gmail.com>
Subject: Re: [PATCH 2/3] stripspace: respect repository config
Date: Tue, 22 Nov 2016 16:19:21 -0500 [thread overview]
Message-ID: <20161122211920.3qdohxdktykqhyga@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqoa17p8k0.fsf@gitster.mtv.corp.google.com>
On Tue, Nov 22, 2016 at 12:24:15PM -0800, Junio C Hamano wrote:
> > Do you want to do another round of -rc3? Ship with the
> > minor regressions and fix them up in v2.11.1?
>
> I am leaning towards the former (though we may also end up doing the
> latter).
I think I'd lead towards -rc3, as well. Our schedule is somewhat
arbitrary anyway, and one week is less important than somebody picking
up the new release and trying to puzzle out a regression that we already
have a fix for.
> Here is an initial attempt. It turns out that write_archive() must
> be callable outside a repository to respond to "git archive --list",
> which happens in parse_archive_args(), and the "have-repository?"
> check cannot be moved before that to the caller.
Right, that makes sense. t5000 already tests git-archive outside of a
repo, although it does it in a funny way (it sets GIT_DIR rather than
relying on GIT_CEILING_DIRECTORIES). We should cover that and make sure
that --remote works outside of a repo. Those work now, but we want to
make sure we don't regress them.
And then we want to test that --remote can read a configured remote
name.
And then post-v2.11, we'd want to check that --remote=foo outside of a
repo produces a sane error instead of looking for a bogus
$GIT_DIR/remotes/foo.
Something like this, which does all but the last (and that should
probably happen separately post-release).
---
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 80b238734..09df7f045 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -94,6 +94,20 @@ check_tar() {
'
}
+# run "$@" inside a non-git directory
+nongit () {
+ test -d non-repo ||
+ mkdir non-repo ||
+ return 1
+
+ (
+ GIT_CEILING_DIRECTORIES=$(pwd) &&
+ export GIT_CEILING_DIRECTORIES &&
+ cd non-repo &&
+ "$@"
+ )
+}
+
test_expect_success \
'populate workdir' \
'mkdir a &&
@@ -179,6 +193,12 @@ test_expect_success 'git archive --remote' \
'git archive --remote=. HEAD >b5.tar &&
test_cmp_bin b.tar b5.tar'
+test_expect_success 'git archive --remote with configured remote' '
+ git config remote.foo.url . &&
+ git archive --remote=foo HEAD >b5-nick.tar &&
+ test_cmp_bin b.tar b5-nick.tar
+'
+
test_expect_success \
'validate file modification time' \
'mkdir extract &&
@@ -197,9 +217,15 @@ test_expect_success 'git archive with --output, override inferred format' '
test_cmp_bin b.tar d4.zip
'
-test_expect_success \
- 'git archive --list outside of a git repo' \
- 'GIT_DIR=some/non-existing/directory git archive --list'
+test_expect_success 'git archive --list outside of a git repo' '
+ nongit git archive --list
+'
+
+test_expect_success 'git archive --remote outside of a git repo' '
+ git archive HEAD >expect.tar &&
+ nongit git archive --remote="$PWD" HEAD >actual.tar &&
+ test_cmp_bin expect.tar actual.tar
+'
test_expect_success 'clients cannot access unreachable commits' '
test_commit unreachable &&
next prev parent reply other threads:[~2016-11-22 21:19 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 14:18 [PATCH 0/3] Fix problems with rebase -i when core.commentchar is defined Johannes Schindelin
2016-11-21 14:18 ` [PATCH 1/3] rebase -i: identify problems with core.commentchar Johannes Schindelin
2016-11-21 18:15 ` Junio C Hamano
2016-11-21 18:24 ` Junio C Hamano
2016-11-21 19:05 ` [PATCH 1/3] rebase -i: highlight " Junio C Hamano
2016-11-21 19:05 ` [PATCH 2/3] stripspace: respect repository config Junio C Hamano
2016-11-21 20:28 ` Junio C Hamano
2016-11-22 16:11 ` Johannes Schindelin
2016-11-21 19:05 ` [PATCH 3/3] rebase -i: handle core.commentChar=auto Junio C Hamano
2016-11-21 20:29 ` Junio C Hamano
2016-11-21 20:25 ` [PATCH 1/3] rebase -i: highlight problems with core.commentchar Junio C Hamano
2016-11-22 16:09 ` Johannes Schindelin
2016-11-22 17:05 ` Junio C Hamano
2016-11-23 11:05 ` Johannes Schindelin
2016-11-21 18:49 ` [PATCH 1/3] rebase -i: identify " Jeff King
2016-11-21 19:12 ` Junio C Hamano
2016-11-21 23:38 ` Jeff King
2016-11-22 16:09 ` Johannes Schindelin
2016-11-21 14:18 ` [PATCH 2/3] stripspace: respect repository config Johannes Schindelin
2016-11-22 10:10 ` Duy Nguyen
2016-11-22 16:13 ` Johannes Schindelin
2016-11-22 17:10 ` Junio C Hamano
2016-11-22 19:10 ` Junio C Hamano
2016-11-22 19:50 ` Jeff King
2016-11-22 20:24 ` Junio C Hamano
2016-11-22 21:19 ` Jeff King [this message]
2016-11-22 21:22 ` Junio C Hamano
2016-11-22 21:43 ` Jeff King
2016-11-22 21:55 ` Junio C Hamano
2016-11-23 0:12 ` Jeff King
2016-11-22 21:24 ` Jeff King
2016-11-21 14:18 ` [PATCH 3/3] rebase -i: handle core.commentChar=auto Johannes Schindelin
2016-11-21 18:26 ` Johannes Sixt
2016-11-21 18:40 ` Junio C Hamano
2016-11-21 18:58 ` Johannes Sixt
2016-11-21 19:07 ` Junio C Hamano
2016-11-21 19:14 ` Johannes Sixt
2016-11-22 16:04 ` Johannes Schindelin
2016-11-22 10:31 ` Duy Nguyen
2016-11-21 16:58 ` [PATCH 0/3] Fix problems with rebase -i when core.commentchar is defined Jacob Keller
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161122211920.3qdohxdktykqhyga@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=pclouds@gmail.com \
--cc=ralf.thielow@gmail.com \
--cc=taufiq.hoven@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).