{"thread":{"id":"1530","subject":"How do I track pu branch?","startedAt":"2005-08-16T01:56:06Z","lastAt":"2005-08-16T03:17:49Z","messageCount":4,"participants":["Martin Langhoff","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"7339","messageId":"46a038f9050815185629e5c4b6@mail.gmail.com","threadId":"1530","inReplyTo":null,"subject":"How do I track pu branch?","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2005-08-16T01:56:06Z","receivedAt":"2005-08-16T01:56:06Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Following an extenal repo, I am not getting all the heads. This is by\ndesign, AFAIK, and the question is how do I find what heads the repo\noffers and pull them in so I can call them by name?\n\ncheers,\n\n\nmartin\n"},{"id":"7340","messageId":"7v4q9qr4gn.fsf@assigned-by-dhcp.cox.net","threadId":"1530","inReplyTo":"46a038f9050815185629e5c4b6@mail.gmail.com","subject":"Re: How do I track pu branch?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-16T02:38:32Z","receivedAt":"2005-08-16T02:38:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Langhoff <martin.langhoff@gmail.com> writes:\n\n> Following an extenal repo, I am not getting all the heads. This is by\n> design, AFAIK, and the question is how do I find what heads the repo\n> offers and pull them in so I can call them by name?\n\nI suspect the Subject: line and your question do not mesh well,\nbut anyway..\n\n\t$ git ls-remote http://www.kernel.org/pub/scm/git/git.git/\n        2150cc99fe29fd81db1e9c5971e13bcb78373ebf\trefs/heads/master\n        ce1eb6614e4e8308585b75029ad0823389890eb9\trefs/heads/pu\n        14fb44880c1143ae0259842c808c036e78b516f6\trefs/heads/rc\n        0918385dbd9656cab0d1d81ba7453d49bbc16250\trefs/tags/junio-gpg-pub\n        d6602ec5194c87b0fc87103ca4d67251c76f233a\trefs/tags/v0.99\n        f25a265a342aed6041ab0cc484224d9ca54b6f41\trefs/tags/v0.99.1\n        c5db5456ae3b0873fc659c19fafdde22313cc441\trefs/tags/v0.99.2\n        7ceca275d047c90c0c7d5afb13ab97efdf51bd6e\trefs/tags/v0.99.3\n        b3e9704ecdf48869f635f0aa99ddfb513f885aff\trefs/tags/v0.99.4\n\nNOTE.  When talking to http(s) URL, the server side needs to be\nprepared to support the dumb server protocol.  That is, to have\nrun git-update-server-info there whenever the repository is\nupdated.  Other transports do not have this restriction.\n\n-jc\n"},{"id":"7341","messageId":"7vd5oepp3n.fsf@assigned-by-dhcp.cox.net","threadId":"1530","inReplyTo":"7v4q9qr4gn.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do I track pu branch?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-16T02:55:40Z","receivedAt":"2005-08-16T02:55:40Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Martin Langhoff <martin.langhoff@gmail.com> writes:\n>\n>> Following an extenal repo, I am not getting all the heads. This is by\n>> design, AFAIK, and the question is how do I find what heads the repo\n>> offers and pull them in so I can call them by name?\n\nSorry, \"git ls-remote\" was the answer to only the first\nquestion.  Regarding your second question.\n\nOnce you have found out about them, the way to use shorthand the\ncurrent tool offers is:\n\n\t$ echo 'http://www.kernel.org/pub/scm/git/git.git/#pu' \\\n            >.git/branches/ko-pu\n\t$ git fetch ko-pu\n\nAny \"git fetch\" creates .git/FETCH_HEAD file which holds the\nSHA1 object name of the fetched commit, but when shorthand\nrecorded in .git/branches is involved, it additionally creates\nthe file \".git/refs/heads/ko-pu\".  Then you could:\n\n\t$ git checkout -b for-junio ko-pu\n        $ git apply --index <cvsimport-use-kk-flag.patch\n        $ git commit -v -s\n        $ git format-patch ko-pu..HEAD\n\nNote.  As I may have said elsewhere, \"pu\" branch in git.git\nrepository is rebased almost daily, so please be prepared to\nthrow away any branches you may fork off from it.\n\nNote.  The shorthand notation for the pull/fetch side is planned\nto be enhanced so that you can keep track of multiple remote\nheads.  That has not happened yet.\n"},{"id":"7343","messageId":"46a038f90508152017290a4de9@mail.gmail.com","threadId":"1530","inReplyTo":"7v4q9qr4gn.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do I track pu branch?","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2005-08-16T03:17:49Z","receivedAt":"2005-08-16T03:17:49Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 8/16/05, Junio C Hamano <junkio@cox.net> wrote:\n> Martin Langhoff <martin.langhoff@gmail.com> writes:\n> \n> > Following an extenal repo, I am not getting all the heads. This is by\n> > design, AFAIK, and the question is how do I find what heads the repo\n> > offers and pull them in so I can call them by name?\n> \n> I suspect the Subject: line and your question do not mesh well,\n> but anyway..\n\nAnd even then, your answer is great. Thanks! \n\nI was half-expecting a mechanism to track \"all branches/heads from a\nremote repo\" by rsync'ing the refs/heads directory outside of the git\nprotocol. That's perhaps why I had the wrong mindset.\n\nAll in all, it is a bit of a roundabout way of tracking things. \n\ncheers,\n\n\nmartin\n"}]}