{"thread":{"id":"37002","subject":"Is it possible to list unpushed tags without accessing remote?","startedAt":"2014-06-26T12:42:41Z","lastAt":"2014-06-27T07:41:58Z","messageCount":6,"participants":["Kirill Likhodedov","Shawn Pearce","Andreas Schwab","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"245017","messageId":"BAA3119F-8351-4BFD-B42A-C96E4C7A1440@jetbrains.com","threadId":"37002","inReplyTo":null,"subject":"Is it possible to list unpushed tags without accessing remote?","fromName":"Kirill Likhodedov","fromEmail":"kirill.likhodedov@jetbrains.com","sentAt":"2014-06-26T12:42:41Z","receivedAt":"2014-06-26T12:42:41Z","isPatch":false,"sender":{"key":"kirill.likhodedov@jetbrains.com","avatar":"https://gravatar.com/avatar/9fd55d2a110e8e96deb3ed7b503d7f3b9b5b1ed5ca9ef6683c15525b11b94e63?d=mp&s=160"},"body":"Hi,\n\nis it possible to know which tags are not yet pushed to a remote via a completely local command?\n\n(e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)\n\nI know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.\nI’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)\n\n\nThanks a lot!\n-- Kirill."},{"id":"245021","messageId":"CAJo=hJvdMURuaEZA3XEWE_Uuq8QRZ+mt8K2H8XrbTuZsVX9gKQ@mail.gmail.com","threadId":"37002","inReplyTo":"BAA3119F-8351-4BFD-B42A-C96E4C7A1440@jetbrains.com","subject":"Re: Is it possible to list unpushed tags without accessing remote?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2014-06-26T16:13:53Z","receivedAt":"2014-06-26T16:13:53Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Thu, Jun 26, 2014 at 5:42 AM, Kirill Likhodedov\n<kirill.likhodedov@jetbrains.com> wrote:\n> is it possible to know which tags are not yet pushed to a remote via a completely local command?\n>\n> (e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)\n>\n> I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.\n> I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)\n\nNo. The client doesn't track what tags the remote has.\n\nYou may be able to guess by looking at `git log --decorate upstream..`\nand seeing which tags, if any show up.\n"},{"id":"245028","messageId":"874mz76281.fsf@igel.home","threadId":"37002","inReplyTo":"CAJo=hJvdMURuaEZA3XEWE_Uuq8QRZ+mt8K2H8XrbTuZsVX9gKQ@mail.gmail.com","subject":"Re: Is it possible to list unpushed tags without accessing remote?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2014-06-26T16:54:22Z","receivedAt":"2014-06-26T16:54:22Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Shawn Pearce <spearce@spearce.org> writes:\n\n> On Thu, Jun 26, 2014 at 5:42 AM, Kirill Likhodedov\n> <kirill.likhodedov@jetbrains.com> wrote:\n>> is it possible to know which tags are not yet pushed to a remote via a completely local command?\n>>\n>> (e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)\n>>\n>> I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.\n>> I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)\n>\n> No. The client doesn't track what tags the remote has.\n\nNot by default, but it is easy to configure your clone to fetch tags to\na separate namespace.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"245035","messageId":"xmqqlhsj4hmq.fsf@gitster.dls.corp.google.com","threadId":"37002","inReplyTo":"874mz76281.fsf@igel.home","subject":"Re: Is it possible to list unpushed tags without accessing remote?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-06-26T19:04:29Z","receivedAt":"2014-06-26T19:04:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Schwab <schwab@linux-m68k.org> writes:\n\n> Shawn Pearce <spearce@spearce.org> writes:\n>\n>> On Thu, Jun 26, 2014 at 5:42 AM, Kirill Likhodedov\n>> <kirill.likhodedov@jetbrains.com> wrote:\n>>> is it possible to know which tags are not yet pushed to a remote via a completely local command?\n>>>\n>>> (e.g. the list of unpushed _commits_ may be received by ‘git log <upstream>..’)\n>>>\n>>> I know it is possible to execute 'git ls-remote’ or 'git push --dry-run’, but both ask the remote server.\n>>> I’m almost sure that the answer is “NO”, but want to receive a confirmation from Git gurus :)\n>>\n>> No. The client doesn't track what tags the remote has.\n>\n> Not by default, but it is easy to configure your clone to fetch tags to\n> a separate namespace.\n\nBut then in order to learn what tags the remote has, you need to\ntalk to the remote and it won't be \"complately a local\" operation\nanymore, no?\n"},{"id":"245038","messageId":"5968CD7E-9E90-422C-B4F7-C0151FDEB1B4@jetbrains.com","threadId":"37002","inReplyTo":"xmqqlhsj4hmq.fsf@gitster.dls.corp.google.com","subject":"Re: Is it possible to list unpushed tags without accessing remote?","fromName":"Kirill Likhodedov","fromEmail":"kirill.likhodedov@jetbrains.com","sentAt":"2014-06-26T19:20:44Z","receivedAt":"2014-06-26T19:20:44Z","isPatch":false,"sender":{"key":"kirill.likhodedov@jetbrains.com","avatar":"https://gravatar.com/avatar/9fd55d2a110e8e96deb3ed7b503d7f3b9b5b1ed5ca9ef6683c15525b11b94e63?d=mp&s=160"},"body":"\nOn 26 Jun 2014, at 23:04 , Junio C Hamano <gitster@pobox.com> wrote:\n\n> Andreas Schwab <schwab@linux-m68k.org> writes:\n> \n>> Not by default, but it is easy to configure your clone to fetch tags to\n>> a separate namespace.\n> \n> But then in order to learn what tags the remote has, you need to\n> talk to the remote and it won't be \"complately a local\" operation\n> anymore, no?\n\nIf 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. \n\nJust 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.\n"},{"id":"245054","messageId":"87pphu23zt.fsf@igel.home","threadId":"37002","inReplyTo":"xmqqlhsj4hmq.fsf@gitster.dls.corp.google.com","subject":"Re: Is it possible to list unpushed tags without accessing remote?","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2014-06-27T07:41:58Z","receivedAt":"2014-06-27T07:41:58Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> But then in order to learn what tags the remote has, you need to\n> talk to the remote and it won't be \"complately a local\" operation\n> anymore, no?\n\nJust like for every other remote ref.  If you need to know the\nultimative truth the only way is to ask the remote.  Your local copy is\njust a cache that may be outdated any time.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"}]}