{"thread":{"id":"16388","subject":"[RFC] On how to manage tags fetched from remote?","startedAt":"2008-11-19T02:27:37Z","lastAt":"2008-11-19T07:50:42Z","messageCount":4,"participants":["rae l","Junio C Hamano","Kalle Olavi Niemitalo"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96122","messageId":"91b13c310811181827y4e37815egaa34ba164d9f4269@mail.gmail.com","threadId":"16388","inReplyTo":null,"subject":"[RFC] On how to manage tags fetched from remote?","fromName":"rae l","fromEmail":"crquan@gmail.com","sentAt":"2008-11-19T02:27:37Z","receivedAt":"2008-11-19T02:27:37Z","isPatch":false,"sender":{"key":"crquan@gmail.com","avatar":"https://gravatar.com/avatar/8689a8a26f5d1c7515ca8226258710684dac5c5208b84a9e16a086377f2d3ded?d=mp&s=160"},"body":"The application field:\n\nI use one git working tree to track many remote git repository:\n\n $ git remote -v\n 227-archives\tssh://192.168.3.227/vmos/linux-with-dm-patches.git\n block\tgit://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git\n btrfs\tgit://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git\n cryptodev\tgit://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git\n djbw-md\tgit://git.kernel.org/pub/scm/linux/kernel/git/djbw/md.git\n dk-block\tgit://git.kernel.dk/linux-2.6-block\n fastboot\tgit://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git\n gfs2-2.6-nmw\tgit://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw.git\n linux-2.6-stable\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git\n linux-2.6-target\tgit://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-target.git\n linux-iscsi\tgit://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git\n linux-mm-trees\tgit://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git\n linux-nfs-server\tgit://git.linux-nfs.org/projects/bfields/linux.git\n lio-core-2.6\tgit://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git\n ocfs2\tgit://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git\n origin\tgit://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n rostedt-rt\tgit://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git\n staging\tgit://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git\n tj-misc\tgit://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git\n tytso-ext4\tgit://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git\n utrace\tgit://git.kernel.org/pub/scm/linux/kernel/git/frob/utrace.git\n v16.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git\n v21.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.21.y.git\n v22.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.22.y.git\n v23.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.23.y.git\n v24.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.24.y.git\n v25.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git\n v26.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.26.y.git\n v27.y\tgit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git\n xfs\tgit://oss.sgi.com:8090/xfs/xfs-2.6.git\n\nAmong them only 227-archives is where I will push to, others are all fetch only,\n\nWhen I want to update, I just issue a \"git remote -v update\" command,\n\nI'd like tags from origin, and from the stable kernel team, those tags\nare all named well,\nlike v2.6.27, v2.6.27.1, v2.6.28-rc1, ...\n\nBut some tags from some other developeres are named bad, some tags named origin,\nor named block, which will be ambigous when I want to refer a local remote name.\n\nAsking every developer to delete their ambigous tag name is very troublesome!\n\nThe problem is because tags have no namespace, not similar to remote\nbranches have\nnamespaces which I named for the remote. Like this command: \"git branch -a\":\n\n  master\n  my-test\n  block/bfq\n  block/blktrace\n  block/cmdfilter\n  block/dynpipe\n  block/fcache\n  block/for-linus\n  djbw-md/for-neil\n  ...\n\nThe local branch have no namespace, while remote branches all have\ntheir remote name first.\n\nOne solution to avoid the ambigous names is that give tags namespaces,\ntoo; But then a tag\nwill not be a simple tag anymore;\n\nAnother approach is not fetching tags from remotes which have ambigous\ntag names; the current\ngit implementation will need I run \"git fetch -n <remote>\" many times,\nI cannot use just one\n\"git remote -v update\";\n\nTo achieve one \"git remote -v update\", there are two approaches, too:\n1. Bypassing any switches or other arguments after \"git remote udpate\"\ndirectly to git fetch,\n  then \"git remote update -n\" will call \"git fetch -n\";\n  But this will disable all tags in all remotes;\n2. Store a no-tags config item to the remote config, which like:\n  [remote \"linux-iscsi\"]\n\turl = git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git\n\tfetch = +refs/heads/*:refs/remotes/linux-iscsi/*\n\tfetch-tags = false\n  when git fetch read the no-tags config, it will disable tags from this remote;\n\nI think the last approach is the best, and most feasible;\n\nHowever, please comment. Thanks.\n\n-- \nCheng Renquan, Shenzhen, China\nSteven Wright  - \"Cross country skiing is great if you live in a small country.\"\n"},{"id":"96123","messageId":"7vzljwsads.fsf@gitster.siamese.dyndns.org","threadId":"16388","inReplyTo":"91b13c310811181827y4e37815egaa34ba164d9f4269@mail.gmail.com","subject":"Re: [RFC] On how to manage tags fetched from remote?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-11-19T02:43:59Z","receivedAt":"2008-11-19T02:43:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"rae l\" <crquan@gmail.com> writes:\n\n> I use one git working tree to track many remote git repository:\n> ...\n> 2. Store a no-tags config item to the remote config, which like:\n>   [remote \"linux-iscsi\"]\n> \turl = git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git\n> \tfetch = +refs/heads/*:refs/remotes/linux-iscsi/*\n> \tfetch-tags = false\n>   when git fetch read the no-tags config, it will disable tags from this remote;\n\nSlurping very many (possibly unrelated) projects into one repository is\nyour choice (I wouldn't comment if it is a sane choice -- I do not have\ntime to ponder the pros and cons.  If it suits your needs, that's good\nenough) If you do not want tags from some repositories but do want from\nsome others copied to that repository, per remote configuration feature is\nexactly how it was designed to be used.\n"},{"id":"96125","messageId":"91b13c310811182003o451c8222kc336aea7ed6eeb6@mail.gmail.com","threadId":"16388","inReplyTo":"7vzljwsads.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC] On how to manage tags fetched from remote?","fromName":"rae l","fromEmail":"crquan@gmail.com","sentAt":"2008-11-19T04:03:58Z","receivedAt":"2008-11-19T04:03:58Z","isPatch":false,"sender":{"key":"crquan@gmail.com","avatar":"https://gravatar.com/avatar/8689a8a26f5d1c7515ca8226258710684dac5c5208b84a9e16a086377f2d3ded?d=mp&s=160"},"body":"On Wed, Nov 19, 2008 at 10:43 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Slurping very many (possibly unrelated) projects into one repository is\nNo. They are all kernel development related. You know the linux kernel\nhas many subsystem,\nfrom http://git.kernel.org/, hundreds of repos, most are kernel\ndevelopment related.\nEvery subsystem has a single maintainer git repository, with linus's\ngit repos is the center,\nSo if one want to track the kernel development, he needs to track many repo.\n\nThe kernel is in developing at a very high speed, so always complex\nand different than other projbects.\n\n> your choice (I wouldn't comment if it is a sane choice -- I do not have\n> time to ponder the pros and cons.  If it suits your needs, that's good\n> enough) If you do not want tags from some repositories but do want from\n> some others copied to that repository, per remote configuration feature is\n> exactly how it was designed to be used.\n\nI think this is a good idea for me and I will implement it. Thanks for review.\n\n-- \nCheng Renquan, Shenzhen, China\nLily Tomlin  - \"The trouble with the rat race is that even if you win,\nyou're still a rat.\"\n"},{"id":"96126","messageId":"87skpotar1.fsf@Astalo.kon.iki.fi","threadId":"16388","inReplyTo":"91b13c310811181827y4e37815egaa34ba164d9f4269@mail.gmail.com","subject":"Re: [RFC] On how to manage tags fetched from remote?","fromName":"Kalle Olavi Niemitalo","fromEmail":"kon@iki.fi","sentAt":"2008-11-19T07:50:42Z","receivedAt":"2008-11-19T07:50:42Z","isPatch":false,"sender":{"key":"kon@iki.fi","avatar":null},"body":"\"rae l\" <crquan@gmail.com> writes:\n\n> 2. Store a no-tags config item to the remote config, which like:\n>   [remote \"linux-iscsi\"]\n> \turl = git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git\n> \tfetch = +refs/heads/*:refs/remotes/linux-iscsi/*\n> \tfetch-tags = false\n>   when git fetch read the no-tags config, it will disable tags from this remote;\n\nA config option like that already exists.  I am using:\n\n[remote \"git.debian.org\"]\n\turl = git://git.debian.org/git/collab-maint/elinks.git\n\tfetch = +refs/heads/*:refs/remotes/git.debian.org/*\n\tfetch = refs/tags/*:refs/tags/git.debian.org/*\n\ttagopt = --no-tags\n\nSo I have e.g. a ref called refs/tags/git.debian.org/orig-0.11.4\nthat points to a tag object that says \"tag orig-0.11.4\".  I hope\ngit fsck will never be changed to complain about that.\n"}]}