From: Rudolf Polzer <divVerent@alientrap.org>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
Junio C Hamano <gitster@pobox.com>,
Nanako Shiraishi <nanako3@lavabit.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Miles Bader <miles@gnu.org>,
Martin Langhoff <martin.langhoff@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH v2] Add push --set-upstream
Date: Sat, 16 Jan 2010 19:13:51 +0100 [thread overview]
Message-ID: <20100116181350.GA28938@rm.endoftheinternet.org> (raw)
In-Reply-To: <be6fef0d1001151700se963950i6932d30bae3ca940@mail.gmail.com>
On Sat, Jan 16, 2010 at 09:00:30AM +0800, Tay Ray Chuan wrote:
> Hi,
>
> I'm adding people from the "git push --track" thread here, since this
> feature is related to what they want.
>
> (sorry for any line-wrap mangling in the patch.)
Looks perfect to me, and if people want it, one could add the same option as an
alias to the current --track option to the checkout and branch commands.
> > + /* Chase symbolic refs (mainly for HEAD). */
> > + localname = i->peer_ref->name;
> > + remotename = i->name;
> > + tmp = resolve_ref(localname, sha, 1, &flag);
> > + if (tmp && flag & REF_ISSYMREF &&
> > + !prefixcmp(tmp, "refs/heads/"))
> > + localname = tmp;
I would never have thought of that case - good catch.
> > @@ -974,6 +1016,10 @@ int transport_push(struct transport *transport,
> > verify_remote_names(refspec_nr, refspec);
> >
> > if (transport->push) {
> > + /* Maybe FIXME. But no important transport uses this case. */
> > + if (flags & TRANSPORT_PUSH_SET_UPSTREAM)
> > + die("This transport does not support using --set-upstream");
> > +
That's ONE way to do it - and seriously, I don't know if anyone uses that
transport :P
However, one possible improvement for this case would be setting ALL pushed
refs as tracking if the push succeeded, and none otherwise.
Are new transports going to be added that use transport->push, or is that
interface deprecated anyway?
Best regards,
Rudolf Polzer
prev parent reply other threads:[~2010-01-16 18:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 22:47 [PATCH v2] Add push --set-upstream Ilari Liusvaara
2010-01-15 23:40 ` Junio C Hamano
2010-01-15 23:53 ` Junio C Hamano
2010-01-16 0:03 ` Nanako Shiraishi
2010-01-16 0:06 ` Junio C Hamano
2010-01-16 0:53 ` Tay Ray Chuan
2010-01-16 0:55 ` Sverre Rabbelier
2010-01-16 0:58 ` Tay Ray Chuan
2010-01-16 1:02 ` Sverre Rabbelier
2010-01-16 1:10 ` Junio C Hamano
2010-01-16 4:18 ` Junio C Hamano
2010-01-16 4:55 ` Tay Ray Chuan
2010-01-16 22:28 ` Nanako Shiraishi
2010-01-16 1:00 ` Tay Ray Chuan
2010-01-16 18:13 ` Rudolf Polzer [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=20100116181350.GA28938@rm.endoftheinternet.org \
--to=divverent@alientrap.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ilari.liusvaara@elisanet.fi \
--cc=martin.langhoff@gmail.com \
--cc=miles@gnu.org \
--cc=nanako3@lavabit.com \
--cc=rctay89@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 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).