{"thread":{"id":"24673","subject":"understanding how remote tracking works","startedAt":"2010-08-09T01:17:34Z","lastAt":"2010-08-09T23:07:11Z","messageCount":11,"participants":["Geoff Russell","Ralf Ebert","Jonathan Nieder","Michael Witten","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147473","messageId":"AANLkTi=J3tDnZUg3k5bzDk2ydzYVVLKLwoW0gpBypYAs@mail.gmail.com","threadId":"24673","inReplyTo":null,"subject":"understanding how remote tracking works","fromName":"Geoff Russell","fromEmail":"geoffrey.russell@gmail.com","sentAt":"2010-08-09T01:17:34Z","receivedAt":"2010-08-09T01:17:34Z","isPatch":false,"sender":{"key":"geoffrey.russell@gmail.com","avatar":"https://gravatar.com/avatar/c30f497ccfa6bf06d86f30bd2ba092a2dd124c61c6bc902f7cb5c3f6486947de?d=mp&s=160"},"body":"I'm trying to get my head around tracking/remote repositories.\n\nWhy does \"git show-ref\" show me far more than in\nin .git/refs/remotes/origin?\n\n$ ls -l .git/refs/remotes/origin\ntotal 12\n-rw-r--r-- 1 geoff ssh 41 2010-08-09 10:17 BBBB\n-rw-r--r-- 1 geoff ssh 41 2010-08-09 10:27 CCCC\n-rw-r--r-- 1 geoff ssh 32 2010-08-09 10:13 HEAD\n\n$ git show-ref\n...\n21ff181dc71a2fb0ef161b3f55f93b8197312515 refs/remotes/origin/BBBB\nd2e8aa93940f42c4017f0029d94b9e0ead1d392d refs/remotes/origin/BRANCH\ne8ee2fb060589114d8fd5cf1d5c568365f2b3dbb refs/remotes/origin/CCCC\n979133b0762ed7b4b8b6e0ef0387a2a11e89c8ba refs/remotes/origin/HEAD\n2b568d757d92e8fd581a90888dc8b0bc95355565 refs/remotes/origin/LCG\nfe91bc2a45753830b832a9ccf24fdea5d7b73b4c refs/remotes/origin/SWAN\n83f9795420b54eb23327ec33d1907757ba8141cc refs/remotes/origin/brA\n2a0ea3f9823db8fb9f74171e38531f5be3cd66a5 refs/remotes/origin/brB\n979133b0762ed7b4b8b6e0ef0387a2a11e89c8ba refs/remotes/origin/master\n85bffc07ee7f3b07717c4ed74e0a6a56e52a48e4 refs/remotes/origin/mmmm\ne02730027b1b85d515bce08c17010408610061f4 refs/remotes/origin/nnnn\n\n\n\nCheers,\nGeoff Russell\n\nP.S. my git is at 1.6.2.3\n"},{"id":"147474","messageId":"i3nlq0$8un$1@dough.gmane.org","threadId":"24673","inReplyTo":"AANLkTi=J3tDnZUg3k5bzDk2ydzYVVLKLwoW0gpBypYAs@mail.gmail.com","subject":"Re: understanding how remote tracking works","fromName":"Ralf Ebert","fromEmail":"info@ralfebert.de","sentAt":"2010-08-09T01:31:44Z","receivedAt":"2010-08-09T01:31:44Z","isPatch":false,"sender":{"key":"info@ralfebert.de","avatar":"https://gravatar.com/avatar/4cd7ff4e970e3882f949fb8f42b39141307e5e504d199129f1377c9c1aea0cb9?d=mp&s=160"},"body":"Hi Geoff,\n\n> Why does \"git show-ref\" show me far more than in\n> in .git/refs/remotes/origin?\n\nprobably the other refs come from .git/packed-refs . See \nhttp://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html .\n\nGreetings,\nRalf\n"},{"id":"147475","messageId":"20100809013243.GA9385@burratino","threadId":"24673","inReplyTo":"AANLkTi=J3tDnZUg3k5bzDk2ydzYVVLKLwoW0gpBypYAs@mail.gmail.com","subject":"[PATCH/RFC] Documentation: add a FILES section for show-ref","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-09T01:32:43Z","receivedAt":"2010-08-09T01:32:43Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"A peek at where the refs are kept might help understanding, even if,\nas the DESCRIPTION section suggests, direct access is not part of the\npublic API.\n\nBalance that out with a pointer to update-ref.\n\nSuggested-by: Geoff Russell <geoffrey.russell@gmail.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n Documentation/git-show-ref.txt |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt\nindex 3f9d9c6..3fe961d 100644\n--- a/Documentation/git-show-ref.txt\n+++ b/Documentation/git-show-ref.txt\n@@ -163,9 +163,15 @@ flag, so you can do\n \n to get a listing of all tags together with what they dereference.\n \n+FILES\n+-----\n+`.git/refs/*`, `.git/packed-refs`\n+\n SEE ALSO\n --------\n-linkgit:git-ls-remote[1]\n+linkgit:git-ls-remote[1],\n+linkgit:git-update-ref[1],\n+linkgit:gitrepository-layout[5]\n \n AUTHORS\n -------\n-- \n1.7.2.1.544.ga752d.dirty\n"},{"id":"147476","messageId":"AANLkTinktpx-rXj1K0BSy0Qwo62SEGFAJWvhKo0nJq=i@mail.gmail.com","threadId":"24673","inReplyTo":"i3nlq0$8un$1@dough.gmane.org","subject":"Re: understanding how remote tracking works","fromName":"Geoff Russell","fromEmail":"geoffrey.russell@gmail.com","sentAt":"2010-08-09T01:53:58Z","receivedAt":"2010-08-09T01:53:58Z","isPatch":false,"sender":{"key":"geoffrey.russell@gmail.com","avatar":"https://gravatar.com/avatar/c30f497ccfa6bf06d86f30bd2ba092a2dd124c61c6bc902f7cb5c3f6486947de?d=mp&s=160"},"body":"Hi Ralf,\n\nOn Mon, Aug 9, 2010 at 11:01 AM, Ralf Ebert <info@ralfebert.de> wrote:\n> Hi Geoff,\n>\n>> Why does \"git show-ref\" show me far more than in\n>> in .git/refs/remotes/origin?\n>\n> probably the other refs come from .git/packed-refs . See\n> http://www.kernel.org/pub/software/scm/git/docs/git-pack-refs.html .\n\nYes. Many thanks. I'm working my way through Jon Loeliger's Git book and it's\nconfusing when the actual behaviour differs from that in the book :)\n\nCheers,\nGeoff\n"},{"id":"147477","messageId":"AANLkTi=usaZGfOM67acmdAWwvbHe_eHyjmRLGmdTYNaC@mail.gmail.com","threadId":"24673","inReplyTo":"AANLkTinktpx-rXj1K0BSy0Qwo62SEGFAJWvhKo0nJq=i@mail.gmail.com","subject":"Re: understanding how remote tracking works","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":"2010-08-09T02:13:07Z","receivedAt":"2010-08-09T02:13:07Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"On Sun, Aug 8, 2010 at 20:53, Geoff Russell <geoffrey.russell@gmail.com> wrote:\n> I'm working my way through Jon Loeliger's Git book and it's\n> confusing when the actual behaviour differs from that in the book\n\nThis probably results from the git culture's conflation (or should I\nsay confusion?) of low-level and high-level representations and\ncommands.\n"},{"id":"147478","messageId":"20100809021900.GA10596@burratino","threadId":"24673","inReplyTo":"AANLkTi=usaZGfOM67acmdAWwvbHe_eHyjmRLGmdTYNaC@mail.gmail.com","subject":"Re: understanding how remote tracking works","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-09T02:19:00Z","receivedAt":"2010-08-09T02:19:00Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Michael Witten wrote:\n> On Sun, Aug 8, 2010 at 20:53, Geoff Russell <geoffrey.russell@gmail.com> wrote:\n\n>> I'm working my way through Jon Loeliger's Git book and it's\n>> confusing when the actual behaviour differs from that in the book\n>\n> This probably results from the git culture's conflation (or should I\n> say confusion?) of low-level and high-level representations and\n> commands.\n\nI guess I’ll bite.  What does that mean?  We have “show-ref” and\n“update-ref” precisely as low-level commands that are independent\nof representation.\n\nProbably the more relevant question: what do you want to do about it?\n"},{"id":"147479","messageId":"AANLkTik7e8hS6Vk0ZJawQ56hFbXz5ri+nb4kqAJ+USBP@mail.gmail.com","threadId":"24673","inReplyTo":"20100809021900.GA10596@burratino","subject":"Re: understanding how remote tracking works","fromName":"Geoff Russell","fromEmail":"geoffrey.russell@gmail.com","sentAt":"2010-08-09T03:46:31Z","receivedAt":"2010-08-09T03:46:31Z","isPatch":false,"sender":{"key":"geoffrey.russell@gmail.com","avatar":"https://gravatar.com/avatar/c30f497ccfa6bf06d86f30bd2ba092a2dd124c61c6bc902f7cb5c3f6486947de?d=mp&s=160"},"body":"On Mon, Aug 9, 2010 at 11:49 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Michael Witten wrote:\n>> On Sun, Aug 8, 2010 at 20:53, Geoff Russell <geoffrey.russell@gmail.com> wrote:\n>\n>>> I'm working my way through Jon Loeliger's Git book and it's\n>>> confusing when the actual behaviour differs from that in the book\n>>\n>> This probably results from the git culture's conflation (or should I\n>> say confusion?) of low-level and high-level representations and\n>> commands.\n\nI often find the low-level commands easier to understand ... and they\ndon't change as often.\n\nGeoff\n"},{"id":"147536","messageId":"7vaaov60rv.fsf@alter.siamese.dyndns.org","threadId":"24673","inReplyTo":"20100809021900.GA10596@burratino","subject":"Re: understanding how remote tracking works","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-09T19:31:32Z","receivedAt":"2010-08-09T19:31:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Michael Witten wrote:\n>> On Sun, Aug 8, 2010 at 20:53, Geoff Russell <geoffrey.russell@gmail.com> wrote:\n>\n>>> I'm working my way through Jon Loeliger's Git book and it's\n>>> confusing when the actual behaviour differs from that in the book\n>>\n>> This probably results from the git culture's conflation (or should I\n>> say confusion?) of low-level and high-level representations and\n>> commands.\n>\n> I guess I’ll bite.  What does that mean?  We have “show-ref” and\n> “update-ref” precisely as low-level commands that are independent\n> of representation.\n\nI tend to agree with Michael (modulo s/ culture/'s early&/) here.  Many\ndocuments written in the early days, the \"tutorial\" document by Linus\nbeing the most prominent example, were written in a way to focus exposing\nthe implementation details to show how simple the structure is.  These\ndocuments and tips by early adopters, simply by virtue of being old, are\nfound more easily by search engines.  Later we started encouraging use of\nshow-ref and update-ref to isolate users from the implementation details\nthat can be changed for performance reasons.\n\n> Probably the more relevant question: what do you want to do about it?\n\nContinue the current course of encouraging the use of plumbing commands\nand not looking at the low-level implementation detail.  Perhaps help\npeople update their documents, moving stale descriptions into \"historical\nnote\" sections.\n"},{"id":"147537","messageId":"7v62zj60oc.fsf@alter.siamese.dyndns.org","threadId":"24673","inReplyTo":"20100809013243.GA9385@burratino","subject":"Re: [PATCH/RFC] Documentation: add a FILES section for show-ref","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-09T19:33:39Z","receivedAt":"2010-08-09T19:33:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Looks good; thanks.\n"},{"id":"147554","messageId":"20100809205309.GA3204@burratino","threadId":"24673","inReplyTo":"7vaaov60rv.fsf@alter.siamese.dyndns.org","subject":"Re: understanding how remote tracking works","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-09T20:53:09Z","receivedAt":"2010-08-09T20:53:09Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> I tend to agree with Michael (modulo s/ culture/'s early&/) here.  Many\n> documents written in the early days, the \"tutorial\" document by Linus\n> being the most prominent example, were written in a way to focus exposing\n> the implementation details to show how simple the structure is.\n[...]\n>> Probably the more relevant question: what do you want to do about it?\n>\n> Continue the current course of encouraging the use of plumbing commands\n> and not looking at the low-level implementation detail.  Perhaps help\n> people update their documents, moving stale descriptions into \"historical\n> note\" sections.\n\nThanks for deciphering.\n\nSo here’s a list from a quick Google search for “.git/refs” (alas, the\nsearch engine is not strong enough to return the right hits for “git\n\"layering violation\"”).  Some nice pages here, actually.\n\n . http://linux.yyz.us/git-howto.html#diff_branch\n . http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/07/git-for-windows-developers-git-series-part-3.aspx\n . http://gitfu.wordpress.com/2008/05/25/git-describe-great-another-way-to-refer-to-commits/\n . http://www-cs-students.stanford.edu/~blynn/gitmagic/ch08.html\n . http://google-opensource.blogspot.com/2008/05/export-git-project-to-google-code.html\n   and http://code.google.com/p/support/wiki/ImportingFromGit\n . http://blog.stevecoinc.com/2010/02/stupid-git-tricks.html\n\nIt would be nice to find ways to suggest updates (but please\ncoordinate so as not to flood the authors with mail).\n\nThere are a lot of instances of “rm -r .git/refs/original” after\nrunning filter-branch, too.  Maybe filter-branch ought to provide\nsome synonym for\n\n eval \"$(\n\tgit for-each-ref refs/heads/\\* --shell --format='git update-ref -d %(refname) &&' &&\n\techo :\n )\"\n"},{"id":"147583","messageId":"20100809230711.GH4429@burratino","threadId":"24673","inReplyTo":"20100809205309.GA3204@burratino","subject":"discarding refs/original/* after filter-branch (Re: understanding how remote tracking works)","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-09T23:07:11Z","receivedAt":"2010-08-09T23:07:11Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n\n> There are a lot of instances of “rm -r .git/refs/original” after\n> running filter-branch, too.  Maybe filter-branch ought to provide\n> some synonym for\n> \n>  eval \"$(\n> \tgit for-each-ref refs/heads/\\* --shell --format='git update-ref -d %(refname) &&' &&\n> \techo :\n>  )\"\n\nThat should have read as\n\n ...\n\tgit for-each-ref refs/original --shell ...\n\nSorry about that.\n"}]}