git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>,
	Michael Haggerty <mhagger@alum.mit.edu>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Introducing a test_create_repo_bare (was Re: [PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes)
Date: Wed, 17 Dec 2014 15:51:15 -0800	[thread overview]
Message-ID: <xmqq61d996oc.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAGZ79kY=TP31VJxPZnjb04og-vHU+-c4d+AgAkis2Q7yeDeXbg@mail.gmail.com> (Stefan Beller's message of "Wed, 17 Dec 2014 15:20:22 -0800")

Stefan Beller <sbeller@google.com> writes:

> On Tue, Dec 16, 2014 at 11:46 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
>>> +     (
>>> +             cd upstream && git config receive.denyCurrentBranch warn
>>> +     ) &&
>>
>> I was wondering how you would do this part after suggesting use of
>> test_create_repo, knowing very well that one of them was a bare one
>> ;-).
>>
>> We might want to extend test_create_repo to allow creating a bare
>> repository, but this is also OK.
>
> So I searching through all the tests, where it would make sense to do that.
> I searched for "denyCurrentBranch" and came up with this list where I think
> it makes sense to replace (git init | test_create_repo | or alike) by a
> test_create_repo_bare or add the --bare option to test_create_repo
>
> places where test_create_repo_bare is easily introducable:
> t5517-push-mirror.sh # setup an upstream repo
> t5543-atomic-push.sh # setup an upstream repo
> t5701-clone-local.sh # Test  'clone empty repository'
>
> not as easy:
> t5400-send-pack.sh # we commit to that repo while being inside
> t5405-send-pack-rewind.sh # we commit to that repo while being inside
> t5516-fetch-push.sh # we test the various denyCurrentBranch options
>
> unsure:
> t5522-pull-symlink.sh # just cloning the repo
>
> So I think we don't need the test_create_repo_bare yet.

Thanks for digging.

We already knew we do not *NEED* it.  We have been surviving without
one.

You need to remember that adding and using a new helper is *NOT* the
ultimate goal; categorizing those that do not want bare repositories
as "not as easy" is misguided.  They truly do not want bare, so they
are not our target audience in the first place.  For the same reason,
"easily introduceable" is not a good criteria to look for.

The issue is if some existing tests will be helped, if we had such a
helper.  That is, do we "git init --bare" by hand in some test?  Are
these tests in such a hand-crafted repositories more susceptible to
future breakages because they do not use the template from the built
location or they do not disable hooks?  If we had such tests, then
they would benefit by having a "bare" mode of test_create_repo.

  reply	other threads:[~2014-12-17 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 23:20 Introducing a test_create_repo_bare (was Re: [PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes) Stefan Beller
2014-12-17 23:51 ` Junio C Hamano [this message]
2014-12-18  0:14   ` Stefan Beller
2014-12-18  0:28   ` Jonathan Nieder
2014-12-18 17:06     ` Junio C Hamano

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=xmqq61d996oc.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=mhagger@alum.mit.edu \
    --cc=sbeller@google.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 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).