git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is it possible to list unpushed tags without accessing remote?
@ 2014-06-26 12:42 Kirill Likhodedov
  2014-06-26 16:13 ` Shawn Pearce
  0 siblings, 1 reply; 6+ messages in thread
From: Kirill Likhodedov @ 2014-06-26 12:42 UTC (permalink / raw)
  To: git

Hi,

is it possible to know which tags are not yet pushed to a remote via a completely local command?

(e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)

I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.
I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)


Thanks a lot!
-- Kirill.

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

* Re: Is it possible to list unpushed tags without accessing remote?
  2014-06-26 12:42 Is it possible to list unpushed tags without accessing remote? Kirill Likhodedov
@ 2014-06-26 16:13 ` Shawn Pearce
  2014-06-26 16:54   ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Shawn Pearce @ 2014-06-26 16:13 UTC (permalink / raw)
  To: Kirill Likhodedov; +Cc: git

On Thu, Jun 26, 2014 at 5:42 AM, Kirill Likhodedov
<kirill.likhodedov@jetbrains.com> wrote:
> is it possible to know which tags are not yet pushed to a remote via a completely local command?
>
> (e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)
>
> I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.
> I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)

No. The client doesn't track what tags the remote has.

You may be able to guess by looking at `git log --decorate upstream..`
and seeing which tags, if any show up.

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

* Re: Is it possible to list unpushed tags without accessing remote?
  2014-06-26 16:13 ` Shawn Pearce
@ 2014-06-26 16:54   ` Andreas Schwab
  2014-06-26 19:04     ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2014-06-26 16:54 UTC (permalink / raw)
  To: Shawn Pearce; +Cc: Kirill Likhodedov, git

Shawn Pearce <spearce@spearce.org> writes:

> On Thu, Jun 26, 2014 at 5:42 AM, Kirill Likhodedov
> <kirill.likhodedov@jetbrains.com> wrote:
>> is it possible to know which tags are not yet pushed to a remote via a completely local command?
>>
>> (e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)
>>
>> I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.
>> I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)
>
> No. The client doesn't track what tags the remote has.

Not by default, but it is easy to configure your clone to fetch tags to
a separate namespace.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Is it possible to list unpushed tags without accessing remote?
  2014-06-26 16:54   ` Andreas Schwab
@ 2014-06-26 19:04     ` Junio C Hamano
  2014-06-26 19:20       ` Kirill Likhodedov
  2014-06-27  7:41       ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2014-06-26 19:04 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Shawn Pearce, Kirill Likhodedov, git

Andreas Schwab <schwab@linux-m68k.org> writes:

> Shawn Pearce <spearce@spearce.org> writes:
>
>> On Thu, Jun 26, 2014 at 5:42 AM, Kirill Likhodedov
>> <kirill.likhodedov@jetbrains.com> wrote:
>>> is it possible to know which tags are not yet pushed to a remote via a completely local command?
>>>
>>> (e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)
>>>
>>> I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.
>>> I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)
>>
>> No. The client doesn't track what tags the remote has.
>
> Not by default, but it is easy to configure your clone to fetch tags to
> a separate namespace.

But then in order to learn what tags the remote has, you need to
talk to the remote and it won't be "complately a local" operation
anymore, no?

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

* Re: Is it possible to list unpushed tags without accessing remote?
  2014-06-26 19:04     ` Junio C Hamano
@ 2014-06-26 19:20       ` Kirill Likhodedov
  2014-06-27  7:41       ` Andreas Schwab
  1 sibling, 0 replies; 6+ messages in thread
From: Kirill Likhodedov @ 2014-06-26 19:20 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Andreas Schwab, Shawn Pearce, git


On 26 Jun 2014, at 23:04 , Junio C Hamano <gitster@pobox.com> wrote:

> Andreas Schwab <schwab@linux-m68k.org> writes:
> 
>> Not by default, but it is easy to configure your clone to fetch tags to
>> a separate namespace.
> 
> But then in order to learn what tags the remote has, you need to
> talk to the remote and it won't be "complately a local" operation
> anymore, no?

If I understand the solution correctly, it looks like it is not needed, if I’m OK with knowing which tags the remote had during the last fetch. 

Just like with commits: 'git log origin/master..’ can give me incorrect results if e.g. commits were rebased on the remote site. But we usually ignore such possibility as improbable.

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

* Re: Is it possible to list unpushed tags without accessing remote?
  2014-06-26 19:04     ` Junio C Hamano
  2014-06-26 19:20       ` Kirill Likhodedov
@ 2014-06-27  7:41       ` Andreas Schwab
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2014-06-27  7:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Shawn Pearce, Kirill Likhodedov, git

Junio C Hamano <gitster@pobox.com> writes:

> But then in order to learn what tags the remote has, you need to
> talk to the remote and it won't be "complately a local" operation
> anymore, no?

Just like for every other remote ref.  If you need to know the
ultimative truth the only way is to ask the remote.  Your local copy is
just a cache that may be outdated any time.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2014-06-27  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 12:42 Is it possible to list unpushed tags without accessing remote? Kirill Likhodedov
2014-06-26 16:13 ` Shawn Pearce
2014-06-26 16:54   ` Andreas Schwab
2014-06-26 19:04     ` Junio C Hamano
2014-06-26 19:20       ` Kirill Likhodedov
2014-06-27  7:41       ` Andreas Schwab

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