{"thread":{"id":"19903","subject":"most annoying thing in git-push","startedAt":"2009-06-22T19:21:47Z","lastAt":"2009-06-23T15:20:39Z","messageCount":5,"participants":["Alexey I. Froloff","ZoltánFüzesi","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116784","messageId":"20090622192147.GE5743@altlinux.org","threadId":"19903","inReplyTo":null,"subject":"most annoying thing in git-push","fromName":"Alexey I. Froloff","fromEmail":"raorn@altlinux.org","sentAt":"2009-06-22T19:21:47Z","receivedAt":"2009-06-22T19:21:47Z","isPatch":false,"sender":{"key":"raorn@altlinux.org","avatar":"https://gravatar.com/avatar/66038c766e4a5b0f54ded23e91e2126aa3745bb5ffb529e5bd4ecf28636cd0aa?d=mp&s=160"},"body":"From git-fetch(1), -n option description: \"By default, tags that\npoint at objects that are downloaded from the remote repository\nare fetched and stored locally.\"\n\nIs is possible to add such functionality to git-push, so it will\npush tags that point at objects that were uploaded to the remote\nrepository?\n\n-- \nRegards,\nSir Raorn.\n"},{"id":"116803","messageId":"loom.20090623T050211-438@post.gmane.org","threadId":"19903","inReplyTo":"20090622192147.GE5743@altlinux.org","subject":"Re: most annoying thing in git-push","fromName":"ZoltánFüzesi","fromEmail":"zfuzesi@eaglet.hu","sentAt":"2009-06-23T05:21:39Z","receivedAt":"2009-06-23T05:21:39Z","isPatch":false,"sender":{"key":"zfuzesi@eaglet.hu","avatar":null},"body":"\nAlexey I. Froloff <raorn <at> altlinux.org> writes:\n> \n> From git-fetch(1), -n option description: \"By default, tags that\n> point at objects that are downloaded from the remote repository\n> are fetched and stored locally.\"\n> \n> Is is possible to add such functionality to git-push, so it will\n> push tags that point at objects that were uploaded to the remote\n> repository?\n> \n\nHi,\n\ngit-fetch -n does the opposite: \"This option disables this automatic tag \nfollowing.\" I guess you wanted to write git-fetch -t.\ngit-push --tags will help you, but it's a 2 step push: one for the branches and \none for the tags. I use .git/config to solve this:\n\n[remote \"origin\"]\n\turl = ...\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n\tpush = +refs/heads/*\n\tpush = +refs/tags/*\n\nWith these lines added git-push origin will upload all your branches and tags.\nIf you want to upload only some of them, you can enumerate them.\n"},{"id":"116805","messageId":"7vd48va3dd.fsf@alter.siamese.dyndns.org","threadId":"19903","inReplyTo":"20090622192147.GE5743@altlinux.org","subject":"Re: most annoying thing in git-push","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-23T06:08:46Z","receivedAt":"2009-06-23T06:08:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alexey I. Froloff\" <raorn@altlinux.org> writes:\n\n> Is is possible to add such functionality to git-push, so it will\n> push tags that point at objects that were uploaded to the remote\n> repository?\n\nI think it is doable, because the protocol is for the receiver to first\nadvertise all its existing refs, which means that the sender can learn\nwhat is missing by first enumerating the tags it has, subtracting what the\nreceiver has, and then computing the ones that are missing from the\nreceiver and are reachable from the commits it is pushing, before the\nsender has to respond which refs it wants to update with what object and\nthen send the packfile to transfer necessary objects.  You do not need to\nchange the protocol, nor what the receiving side does, to implement it.\nYou only need to update what the push side does.\n\nIt however is entirely a different matter if it is a sensible thing to do.\n\nOften, a fetch is made from a public distribution point, which by\ndefinition has only branches and tags that are meant for public\nconsumption.  It makes sense to auto-follow tags by default.\n\nOn the other hand, a push is almost always made from a private working\nrepository to a public distribution point, in order to update the latter\nwith only refs and objects meant for public consumption.  A developer\nworking in such a private working repository will use tags that are not\nmeant for public consumption while developing, and pushing all tags that\nare reachable from the commits that are being pushed out to the public\ndistribution point is not necessarily desirable, as it will push out many\ntags that are only private to the working repository.\n\nIt certainly is not a sensible default behaviour, even though it might be\nhandy as an option for special cases.\n"},{"id":"116807","messageId":"m3fxdrxt16.fsf@localhost.localdomain","threadId":"19903","inReplyTo":"7vd48va3dd.fsf@alter.siamese.dyndns.org","subject":"Re: most annoying thing in git-push","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-06-23T08:12:56Z","receivedAt":"2009-06-23T08:12:56Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n> \"Alexey I. Froloff\" <raorn@altlinux.org> writes:\n> \n> > Is is possible to add such functionality to git-push, so it will\n> > push tags that point at objects that were uploaded to the remote\n> > repository?\n[...]\n\n> It however is entirely a different matter if it is a sensible thing to do.\n> \n> Often, a fetch is made from a public distribution point, which by\n> definition has only branches and tags that are meant for public\n> consumption.  It makes sense to auto-follow tags by default.\n> \n> On the other hand, a push is almost always made from a private working\n> repository to a public distribution point, in order to update the latter\n> with only refs and objects meant for public consumption.  A developer\n> working in such a private working repository will use tags that are not\n> meant for public consumption while developing, and pushing all tags that\n> are reachable from the commits that are being pushed out to the public\n> distribution point is not necessarily desirable, as it will push out many\n> tags that are only private to the working repository.\n> \n> It certainly is not a sensible default behaviour, even though it might be\n> handy as an option for special cases.\n\nPerhaps if \"autofollowing\" of tags was enabled only for \nannotated/signed tags?\n\n-- \nJakub Narebski\nShadeHawk on #git\n"},{"id":"116822","messageId":"20090623152038.GK5743@altlinux.org","threadId":"19903","inReplyTo":"7vd48va3dd.fsf@alter.siamese.dyndns.org","subject":"Re: most annoying thing in git-push","fromName":"Alexey I. Froloff","fromEmail":"raorn@altlinux.org","sentAt":"2009-06-23T15:20:39Z","receivedAt":"2009-06-23T15:20:39Z","isPatch":false,"sender":{"key":"raorn@altlinux.org","avatar":"https://gravatar.com/avatar/66038c766e4a5b0f54ded23e91e2126aa3745bb5ffb529e5bd4ecf28636cd0aa?d=mp&s=160"},"body":"On Mon, Jun 22, 2009 at 11:08:46PM -0700, Junio C Hamano wrote:\n> It certainly is not a sensible default behaviour, even though it might be\n> handy as an option for special cases.\nI would be happy with --please-push-tags-too and push.follow-tags\noptions (or something similar).\n\n-- \nRegards,\nSir Raorn.\n"}]}