{"thread":{"id":"21331","subject":"Detached HEAD and \"git log --all\"","startedAt":"2009-10-22T20:37:01Z","lastAt":"2009-10-23T08:36:44Z","messageCount":3,"participants":["Jakub Narebski","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125737","messageId":"200910222237.04056.jnareb@gmail.com","threadId":"21331","inReplyTo":null,"subject":"Detached HEAD and \"git log --all\"","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-10-22T20:37:01Z","receivedAt":"2009-10-22T20:37:01Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"When discussing differences between concept and implementation\nof branches in Git and in Mercurial on StackOverflow[1] (abusing\nSO comment system a bit), Steve Losh[2] wrote that he was surprised\nby the fact that \"git log --all\" doesn't include commits made\non detached HEAD.\n\nWhile documentation clearly states:\n\n  --all  Pretend as if all the refs in `$GIT_DIR/refs/` are listed\n         on the command line as <commit>.\n\nand HEAD is in `$GIT_DIR/HEAD`, which is outside `$GIT_DIR/refs/`,\nit is nevertheless a bit strange that \"git log --all\" doesn't list\nall (everything).\n\nThis is of course only an issue if we are on detached HEAD; I guess\nthat semantics of `--all` option to git-log predates this feature.\n\n[1] http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930\n[2] http://stevelosh.com/blog/entry/2009/8/30/a-guide-to-branching-in-mercurial/\n\n-- \nJakub Narębski      http://stackoverflow.com/users/46058/jakub-narebski\n"},{"id":"125779","messageId":"4AE16A70.9050200@drmicha.warpmail.net","threadId":"21331","inReplyTo":"200910222237.04056.jnareb@gmail.com","subject":"Re: Detached HEAD and \"git log --all\"","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-10-23T08:33:52Z","receivedAt":"2009-10-23T08:33:52Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jakub Narebski venit, vidit, dixit 22.10.2009 22:37:\n> When discussing differences between concept and implementation\n> of branches in Git and in Mercurial on StackOverflow[1] (abusing\n> SO comment system a bit), Steve Losh[2] wrote that he was surprised\n> by the fact that \"git log --all\" doesn't include commits made\n> on detached HEAD.\n> \n> While documentation clearly states:\n> \n>   --all  Pretend as if all the refs in `$GIT_DIR/refs/` are listed\n>          on the command line as <commit>.\n> \n> and HEAD is in `$GIT_DIR/HEAD`, which is outside `$GIT_DIR/refs/`,\n> it is nevertheless a bit strange that \"git log --all\" doesn't list\n> all (everything).\n> \n> This is of course only an issue if we are on detached HEAD; I guess\n> that semantics of `--all` option to git-log predates this feature.\n> \n> [1] http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930\n> [2] http://stevelosh.com/blog/entry/2009/8/30/a-guide-to-branching-in-mercurial/\n> \n\nCommit 77abcbd (Let --decorate show HEAD position, 2009-10-12) goes a\nlittle bit in that direction, adding HEAD to the \"labels\" that\n--decorate may use, but not to the list of refs specified by \"--all\". But:\n\nWell, after playing around a bit: git rev-list --all does list my\ndetached HEAD, git log --all shows it (which is the same statement, of\ncourse), whether I use --decorate or not. Are you seeing different\nbehaviour?\n\ngit describe --all HEAD does not describe the detached HEAD (other than\nv1.6.5-87-g4584daf in my case), which may or may not be desirable\n(because describe outputs at most one description, unlike --decorate).\n\nMichael\n"},{"id":"125780","messageId":"4AE16B1C.9050205@drmicha.warpmail.net","threadId":"21331","inReplyTo":"200910222237.04056.jnareb@gmail.com","subject":"Re: Detached HEAD and \"git log --all\"","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-10-23T08:36:44Z","receivedAt":"2009-10-23T08:36:44Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jakub Narebski venit, vidit, dixit 22.10.2009 22:37:\n> When discussing differences between concept and implementation\n> of branches in Git and in Mercurial on StackOverflow[1] (abusing\n> SO comment system a bit), Steve Losh[2] wrote that he was surprised\n> by the fact that \"git log --all\" doesn't include commits made\n> on detached HEAD.\n> \n> While documentation clearly states:\n> \n>   --all  Pretend as if all the refs in `$GIT_DIR/refs/` are listed\n>          on the command line as <commit>.\n> \n> and HEAD is in `$GIT_DIR/HEAD`, which is outside `$GIT_DIR/refs/`,\n> it is nevertheless a bit strange that \"git log --all\" doesn't list\n> all (everything).\n> \n> This is of course only an issue if we are on detached HEAD; I guess\n> that semantics of `--all` option to git-log predates this feature.\n> \n> [1] http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930\n> [2] http://stevelosh.com/blog/entry/2009/8/30/a-guide-to-branching-in-mercurial/\n> \n\n...OK, finally found it: Dscho did just that in f0298cf (revision\nwalker: include a detached HEAD in --all, 2009-01-16) which is in\nv1.6.1.3 and later.\n\nCheers,\nMichael\n"}]}