git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org, Daniel Cheng <j16sdiz+freenet@gmail.com>
Subject: Re: [EGIT PATCH] Evaluate short refnames into full names during push
Date: Sat, 7 Mar 2009 14:48:31 -0800	[thread overview]
Message-ID: <20090307224831.GS16213@spearce.org> (raw)
In-Reply-To: <1236464299-11491-1-git-send-email-robin.rosenberg@dewire.com>

Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> @@ -243,10 +244,24 @@ else if (TransportLocal.canHandle(remote))
>  		final Collection<RefSpec> procRefs = expandPushWildcardsFor(db, specs);
>  
>  		for (final RefSpec spec : procRefs) {
> -			final String srcRef = spec.getSource();
> +			String srcRef = spec.getSource();
> +			final Ref src = db.getRef(srcRef);
> +			if (src != null)
> +				srcRef = src.getName();
> +			String remoteName = spec.getDestination();
>  			// null destination (no-colon in ref-spec) is a special case
> -			final String remoteName = (spec.getDestination() == null ? spec
> -					.getSource() : spec.getDestination());

Oh, right.  I forgot about the fact that Marek put the code here, as
then "push = master" in a config file works...

OK.  I'll apply.

-- 
Shawn.

  reply	other threads:[~2009-03-07 22:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 16:05 [JGit] Push to new Amazon S3 does not work? ("funny refname") Daniel Cheng
2009-03-07 17:50 ` Robin Rosenberg
2009-03-07 21:10   ` Shawn O. Pearce
2009-03-07 22:18     ` [EGIT PATCH] Evaluate short refnames into full names during push Robin Rosenberg
2009-03-07 22:48       ` Shawn O. Pearce [this message]
2009-03-08 15:21         ` [EGIT PATCH] Prevent an exception if the user tries to push a non-existing ref Robin Rosenberg
2009-03-09 15:50           ` Shawn O. Pearce
2009-03-09 21:29             ` Robin Rosenberg

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=20090307224831.GS16213@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=j16sdiz+freenet@gmail.com \
    --cc=robin.rosenberg@dewire.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).