{"thread":{"id":"6792","subject":"When to run git-update-server-info","startedAt":"2007-02-13T04:49:49Z","lastAt":"2007-02-13T05:20:52Z","messageCount":2,"participants":["Pavel Roskin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"34370","messageId":"1171342189.2326.68.camel@dv","threadId":"6792","inReplyTo":null,"subject":"When to run git-update-server-info","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2007-02-13T04:49:49Z","receivedAt":"2007-02-13T04:49:49Z","isPatch":false,"sender":{"key":"proski@gnu.org","avatar":null},"body":"Hello!\n\nIt looks like that either the documentation is misleading or git is not\nworking as promised.\n\nDocumentation/repository-layout.txt says:\n\ninfo/refs::\n        This file is to help dumb transports to discover what\n        refs are available in this repository.  Whenever you\n        create/delete a new branch or a new tag, `git\n        update-server-info` should be run to keep this file\n        up-to-date if the repository is published for dumb\n        transports.  The `git-receive-pack` command, which is\n        run on a remote repository when you `git push` into it,\n        runs `hooks/update` hook to help you achieve this.\n\nMy understanding of the above text is that git-update-server-info only\nneeds to be run if a new branch or tag is created, not on every\ngit-push.  Just because hooks/update is run on every push, it doesn't\nmean that it needs to be done every time.\n\nWhat happens in reality is that git-pull refuses to pull new revisions\nfrom the repository if git-update-server-info is not run after a simple\ngit-push (from another repository, of course) that didn't create any\nbranch or tag.  However, git-clone would load all revisions.  I'm\naccessing the repository over http.\n\nThe problem it, there is more than one way to get the branch revisions,\none is from info/refs and the other is from individual files under\nrefs/heads and refs/tags.  Using database terms, the git repository in\nnot normalized, so we get an update anomaly.\n\nI understand that accessing one file could be faster over http, so I\ntend to think that it's the documentation needs to be fixed.  If that's\nthe case, maybe hooks/update should be created executable by default?\n\nAlternatively, git-update-server-info functionality could be embedded\ninto git-receive-pack to simplify server setup.\n\n-- \nRegards,\nPavel Roskin\n"},{"id":"34374","messageId":"7vps8e3a6j.fsf@assigned-by-dhcp.cox.net","threadId":"6792","inReplyTo":"1171342189.2326.68.camel@dv","subject":"Re: When to run git-update-server-info","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-13T05:20:52Z","receivedAt":"2007-02-13T05:20:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pavel Roskin <proski@gnu.org> writes:\n\n> Hello!\n>\n> It looks like that either the documentation is misleading or git is not\n> working as promised.\n>\n> Documentation/repository-layout.txt says:\n>\n> info/refs::\n>         This file is to help dumb transports to discover what\n>         refs are available in this repository.  Whenever you\n>         create/delete a new branch or a new tag, `git\n>         update-server-info` should be run to keep this file\n>         up-to-date if the repository is published for dumb\n>         transports.  The `git-receive-pack` command, which is\n>         run on a remote repository when you `git push` into it,\n>         runs `hooks/update` hook to help you achieve this.\n>\n> My understanding of the above text is that git-update-server-info only\n> needs to be run if a new branch or tag is created, not on every\n> git-push.  Just because hooks/update is run on every push, it doesn't\n> mean that it needs to be done every time.\n\nI agree the above can be interpreted as such, and documentation\nupdates is needed.  The information in info/refs are used in\nfull, not just the list of ref names on the far right of each\nline but also the object name at the beginning of each line.\n\n> I understand that accessing one file could be faster over http, so I\n> tend to think that it's the documentation needs to be fixed.  If that's\n> the case, maybe hooks/update should be created executable by default?\n\nThe repository that serve things over http are _minorities_, so\nI do not think that is a good idea.\n"}]}