git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gti push interface inconsistency
@ 2009-10-26 22:23 Eugene Sajine
  2009-10-27  0:08 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Eugene Sajine @ 2009-10-26 22:23 UTC (permalink / raw)
  To: git

Hi,

I have a question:

Why I can't do

$ git push my_tag

It will fail because the remote is not specified, even if there is
only one origin remote

but can do

$ git push --tags

and it will push tags to origin...

Thanks,
Eugene

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gti push interface inconsistency
  2009-10-26 22:23 gti push interface inconsistency Eugene Sajine
@ 2009-10-27  0:08 ` Junio C Hamano
  2009-10-27  4:47   ` Eugene Sajine
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2009-10-27  0:08 UTC (permalink / raw)
  To: Eugene Sajine; +Cc: git

Eugene Sajine <euguess@gmail.com> writes:

> I have a question:
>
> Why I can't do
>
> $ git push my_tag
>
> It will fail because the remote is not specified, even if there is
> only one origin remote

Probably because git is not smart enough to understand the human language
to notice 't' 'a' 'g' is a tag and cannot be a remote name spelled
incorrectly, or git cannot read your mind and find out that you spelled
a name of the remote correctly but forgot to add the remote first.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gti push interface inconsistency
  2009-10-27  0:08 ` Junio C Hamano
@ 2009-10-27  4:47   ` Eugene Sajine
  0 siblings, 0 replies; 3+ messages in thread
From: Eugene Sajine @ 2009-10-27  4:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

>
> Probably because git is not smart enough to understand the human language
> to notice 't' 'a' 'g' is a tag and cannot be a remote name spelled
> incorrectly, or git cannot read your mind and find out that you spelled
> a name of the remote correctly but forgot to add the remote first.
>

;)
did you mean It is not smart enough yet?

My question was caused only by the fact that in both situations same
object type is transmitted to the origin repo. As understand that it
was done this way  in order to avoid specifying keys for remote...
I.e. "git push origin master" is kinda easier then something like "git
push -r origin master" (-r for remote).
But if for "git push --tags" the remote is not important (uses origin
by default) why it is important for "git push my_tag" or for "git push
origin master"?

Do you think

$ git push master

Which would default to origin have a chance to exist? (I would vote for this)
Or the correct aproach is to have

$ git push origin --tags

IMHO, In any case the push operation interface should be consistent.
Else it is a bit confusing (untill you didn't step on it and didn't
learn the difference).

Best regards,
Eugene

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-27  4:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 22:23 gti push interface inconsistency Eugene Sajine
2009-10-27  0:08 ` Junio C Hamano
2009-10-27  4:47   ` Eugene Sajine

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).