git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Salikh Zakirov <Salikh.Zakirov@Intel.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] Make git-clone --use-separate-remote the default
Date: Fri, 24 Nov 2006 13:14:00 +0300	[thread overview]
Message-ID: <ek6glc$pn$1@sea.gmane.org> (raw)
In-Reply-To: <7vpsbde4fy.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> -- >8 --
> [PATCH] refs outside refs/{heads,tags} match less strongly.
> 
> Pushing 'foo' when both heads/foo and tags/foo exist at the
> remote end is still considered an error and you would need to
> disambiguate between them by being more explicit.
> 
> When neither heads/foo nor tags/foo exists at the remote,
> pushing 'foo' when there is only remotes/origin/foo is not
> ambiguous, while it still is ambiguous when there are more than
> one such weaker match (remotes/origin/foo and remotes/alt/foo,
> for example).

git-push.1 has following description:

    Some short-cut notations are also supported.

              o   tag <tag> means the same as refs/tags/<tag>:refs/tags/<tag>.

              o  A parameter <ref> without a colon is equivalent to
                 <ref>:<ref>, hence updates <ref>  in
                 the destination from <ref> in the source.

Maybe this is only my reading of manual page, but I understood
it like it does not leave the room for ambiguity, because it is using
_the same_ refspec as the local one.

That's why, when I do

   git-push repo x

and it results in

   git-push repo refs/heads/x:refs/remotes/origin/x

instead of expected

   git-push repo refs/heads/x:refs/heads/x

just because the remote repo did not have refs/heads/x, but happened
to have refs/remotes/origin/x, would be highly surprising to me.

The expected behaviour on 'git-push repo x' in my understanding is
1) git finds the exact reference for 'x' (i.e. either refs/heads/x or
refs/tags/x) according to local lookup rules
2) git uses the found reference _unambiguously_ to create or update exactly the
same reference in the remote repo.

Am I the only one to have this understanding?

  reply	other threads:[~2006-11-24 10:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-23 22:58 [PATCH] Make git-clone --use-separate-remote the default Petr Baudis
2006-11-23 23:12 ` Junio C Hamano
2006-11-23 23:39   ` Andy Whitcroft
2006-11-23 23:42   ` Petr Baudis
2006-11-23 23:45     ` J. Bruce Fields
2006-11-24  0:17     ` Junio C Hamano
2006-11-24  5:47       ` Junio C Hamano
2006-11-24  6:36         ` Junio C Hamano
2006-11-24 10:14           ` Salikh Zakirov [this message]
2006-11-24 11:24             ` Junio C Hamano
2006-11-24 11:56               ` Salikh Zakirov
2006-11-24 23:28               ` Salikh Zakirov
2006-11-25  0:04                 ` Junio C Hamano
2006-11-24 11:32             ` Sergey Vlasov
2006-11-24 11:37               ` Junio C Hamano
2006-11-24  9:22       ` Jakub Narebski
2006-11-24  9:58 ` Salikh Zakirov

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='ek6glc$pn$1@sea.gmane.org' \
    --to=salikh.zakirov@intel.com \
    --cc=git@vger.kernel.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).