git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Hoelz <rob@hoelz.ro>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, josh@joshtriplett.org
Subject: Re: [PATCH] remote.<name>.pushurl does not consider aliases when pushing
Date: Sun, 17 Mar 2013 23:47:05 +0100	[thread overview]
Message-ID: <20130317234705.654fc987@hoelz.ro> (raw)
In-Reply-To: <7vppyxptbr.fsf@alter.siamese.dyndns.org>

On Sun, 17 Mar 2013 15:14:32 -0700
Junio C Hamano <gitster@pobox.com> wrote:

> Rob Hoelz <rob@hoelz.ro> writes:
> 
> > Hi everyone!  I found a bug in Git today and wrote up a fix; I did
> > my best to conform to the rules layed out in
> > Documentation/SubmittingPatches, but please let me know if I need
> > to change anything to get my work merged. =)  I have CC'ed Josh
> > Triplet, as he was the last one to touch the line I modified.  I
> > hope my commit messages explain the problem I encountered well
> > enough; if not, I can always go back and amend them.
> >
> > Patches follow.
> >
> > -Rob
> 
> 
> Please read Documentation/SubmittingPatches and follow it.  The
> above is most likely to be the cover letter of a two-patch series
> (meaning you will be sending three pieces of e-mail messages), or
> perhaps out of band comment below the three-dash line of a single
> patch (you will send only one piece of e-mail message).
> 
> See recent patches on the list from list regulars for good examples,
> e.g.
> 
>     http://thread.gmane.org/gmane.comp.version-control.git/218350
>     http://thread.gmane.org/gmane.comp.version-control.git/218177/focus=218361
> 
> > From 5007b11e86c0835807632cb41e6cfa75ce9a1aa1 Mon Sep 17 00:00:00
> > 2001 From: Rob Hoelz <rob@hoelz.ro>
> > Date: Sun, 17 Mar 2013 21:49:20 +0100
> > Subject: [PATCH 1/2] Add test for pushInsteadOf + pushurl
> >
> > git push currently doesn't consider pushInsteadOf when
> > using pushurl; this test tests that.
> >
> > Signed-off-by: Rob Hoelz <rob@hoelz.ro>
> > ---
> >  t/t5500-push-pushurl.sh | 37 +++++++++++++++++++++++++++++++++++++
> >  1 file changed, 37 insertions(+)
> >  create mode 100644 t/t5500-push-pushurl.sh
> 
> The number 5500 is already taken.  Please do not add a duplicate.
> 
> I also wonder if we need to waste a new test number for this;
> perhaps adding new tests to 5516 that already tests insteadOf might
> be a better fit, but I didn't carefully read it.
> 
> > diff --git a/t/t5500-push-pushurl.sh b/t/t5500-push-pushurl.sh
> > new file mode 100644
> 
> Test scripts are supposed to be executable.
> 
> > +test_expect_success 'test commit and push' '
> > +	test_commit one &&
> > +	git push origin master:master
> > +'
> > +
> > +test_expect_success 'check for commits in rw repo' '
> > +	cd ../rw/repo &&
> > +	git log --pretty=oneline | grep -q .
> > +'
> 
> Are both expected to succeed in patch 1/2 without any code change?
> 
> If you were doing a large code change, it is a good series structure
> to have tests first that are marked as "expect_failure" in an early
> patch, and then in a later patch that changes the code to fix it,
> update the tests that start to pass to "expect_success".
> 
> I personally do not think you need such a two-step approach for
> something small like this; instead you can just have a single patch
> that adds a set of tests that expect success and code change.
> 
> Thanks.
> 

Thanks for the feeback; another reply with the new patch follows.

      reply	other threads:[~2013-03-17 22:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 21:40 [PATCH] remote.<name>.pushurl does not consider aliases when pushing Rob Hoelz
2013-03-17 22:14 ` Junio C Hamano
2013-03-17 22:47   ` Rob Hoelz [this message]

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=20130317234705.654fc987@hoelz.ro \
    --to=rob@hoelz.ro \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=josh@joshtriplett.org \
    /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).