All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	John Keeping <john@keeping.me.uk>,
	Sverre Rabbelier <srabbelier@gmail.com>, Max Horn <max@quendi.de>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Subject: Re: [PATCH 1/6] transport-helper: clarify *:* refspec
Date: Thu, 18 Apr 2013 14:39:44 +0200	[thread overview]
Message-ID: <87ppxsvwq7.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <CAMP44s0c-c3pPW8t9p9qabjv46gSeE6y4p6STPeV+kqB77xOJA@mail.gmail.com> (Felipe Contreras's message of "Thu, 18 Apr 2013 03:18:43 -0500")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> On Thu, Apr 18, 2013 at 2:28 AM, Thomas Rast <trast@inf.ethz.ch> wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> The *:* refspec doesn't work, and never has, clarify the code and
>>> documentation to reflect that. This in effect reverts commit 9e7673e
>>> (gitremote-helpers(1): clarify refspec behaviour).
>> [...]
>>> -test_expect_success 'pulling with straight refspec' '
>>> -     (cd local2 &&
>>> -     GIT_REMOTE_TESTGIT_REFSPEC="*:*" git pull) &&
>>> -     compare_refs local2 HEAD server HEAD
>>> -'
>>> -
>>> -test_expect_failure 'pushing with straight refspec' '
>>> -     test_when_finished "(cd local2 && git reset --hard origin)" &&
>>> -     (cd local2 &&
>>> -     echo content >>file &&
>>> -     git commit -a -m eleven &&
>>> -     GIT_REMOTE_TESTGIT_REFSPEC="*:*" git push) &&
>>> -     compare_refs local2 HEAD server HEAD
>>> -'
>>
>> So what's wrong with the tests?  Do they fail to test what they claim
>> (how?), test something that wasn't reasonable to begin with, or
>> something entirely different?
>
> Look at the code comment, and look at the now updated documentation
> that assumes that *:* was reasonable. Given the available information,
> it would be reasonable to assume that *:* did work, but it didn't
> work, and it's not really possible to fix it, even if we wanted to, it
> would be a hack. It's better to accept that fact and stop worrying too
> much about what would be the best way to do the wrong thing.

Ok, you say that the *failing* test set an expectation that is
unrealistic, so let's drop it.

But then what about the successful test?  Does it actually work (and by
removing the test, you are saying that we don't care if we subsequently
break that (mis)feature)?  Or did it test the wrong thing?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-04-18 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18  0:05 [PATCH 0/6] transport-helper: some clarifications and a fix Felipe Contreras
2013-04-18  0:05 ` [PATCH 1/6] transport-helper: clarify *:* refspec Felipe Contreras
2013-04-18  7:28   ` Thomas Rast
2013-04-18  8:18     ` Felipe Contreras
2013-04-18 12:39       ` Thomas Rast [this message]
2013-04-18 13:06         ` Felipe Contreras
2013-04-18  0:05 ` [PATCH 2/6] transport-helper: update refspec documentation Felipe Contreras
2013-04-18  0:05 ` [PATCH 3/6] transport-helper: clarify pushing without refspecs Felipe Contreras
2013-04-18  0:14   ` Sverre Rabbelier
2013-04-18 18:56   ` Stefano Lattarini
2013-04-18  0:05 ` [PATCH 4/6] transport-helper: warn when refspec is not used Felipe Contreras
2013-04-18  0:05 ` [PATCH 5/6] transport-helper: trivial code shuffle Felipe Contreras
2013-04-18  0:05 ` [PATCH 6/6] transport-helper: update remote helper namespace Felipe Contreras
2013-04-18  4:14   ` Felipe Contreras

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=87ppxsvwq7.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=felipe.contreras@gmail.com \
    --cc=florian.achleitner.2.6.31@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=john@keeping.me.uk \
    --cc=jrnieder@gmail.com \
    --cc=max@quendi.de \
    --cc=srabbelier@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.