Re: [EGIT PATCH] Evaluate short refnames into full names during push
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Mar 7, 2009, 22:48 UTC
- Message-ID
- <20090307224831.GS16213@spearce.org>
- In-Reply-To
- <1236464299-11491-1-git-send-email-robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
Show 13 quoted lines
> @@ -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.