{"thread":{"id":"6592","subject":"What did I just fetch?","startedAt":"2007-01-31T12:55:23Z","lastAt":"2007-02-05T12:21:15Z","messageCount":5,"participants":["Bill Lear","Jakub Narebski","Santi Béjar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"33124","messageId":"17856.37307.324767.617892@lisa.zopyra.com","threadId":"6592","inReplyTo":null,"subject":"What did I just fetch?","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-01-31T12:55:23Z","receivedAt":"2007-01-31T12:55:23Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"When updating in cvs, I get a list of files changed by the update.\n\nHow can I do this in git when fetching into a bare repo?\n\n% GIT_DIR=. git fetch git://source/project\nremote: Generating pack...\nremote: Done counting 18 objects.\nremote: Result has 10 objects.\nremote: Deltifying 10 objects.\nremote:  100% (10/10) done\nUnpacking 10 objects\nremote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n 100% (10/10) done\n\nSo, I'd like to see the files, perhaps the differences, etc.\n\n\nBill\n"},{"id":"33129","messageId":"epq4nl$ui7$1@sea.gmane.org","threadId":"6592","inReplyTo":"17856.37307.324767.617892@lisa.zopyra.com","subject":"Re: What did I just fetch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-01-31T13:15:49Z","receivedAt":"2007-01-31T13:15:49Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Bill Lear wrote:\n\n> When updating in cvs, I get a list of files changed by the update.\n> \n> How can I do this in git when fetching into a bare repo?\n> \n> % GIT_DIR=. git fetch git://source/project\n> remote: Generating pack...\n> remote: Done counting 18 objects.\n> remote: Result has 10 objects.\n> remote: Deltifying 10 objects.\n> remote:  100% (10/10) done\n> Unpacking 10 objects\n> remote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n>  100% (10/10) done\nYou should have also something like below:\n* refs/remotes/origin/master: fast forward to branch 'master' of git://source/project\n  old..new: 1732a1f..73a2acc\n\n> So, I'd like to see the files, perhaps the differences, etc.\n\n $ git diff --summary 1732a1f..73a2acc\n $ git diff --summary ORIG_HEAD..HEAD\n\nOr, if you want to see the log instead:\n\n $ git log 1732a1f..73a2acc\n $ git log origin/master\n\nBy the way, you get summary automatically when doing pull, on merge\n(but not on fast-forward, I think).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"33130","messageId":"8aa486160701310530t6325ea2ah2e58bc250a37ce97@mail.gmail.com","threadId":"6592","inReplyTo":"17856.37307.324767.617892@lisa.zopyra.com","subject":"Re: What did I just fetch?","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2007-01-31T13:30:56Z","receivedAt":"2007-01-31T13:30:56Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On 1/31/07, Bill Lear <rael@zopyra.com> wrote:\n> When updating in cvs, I get a list of files changed by the update.\n>\n> How can I do this in git when fetching into a bare repo?\n>\n> % GIT_DIR=. git fetch git://source/project\n> remote: Generating pack...\n> remote: Done counting 18 objects.\n> remote: Result has 10 objects.\n> remote: Deltifying 10 objects.\n> remote:  100% (10/10) done\n> Unpacking 10 objects\n> remote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n>  100% (10/10) done\n\nYou are just fetching the objects, but you are not storing the tip of\nthe branch (in this case HEAD) anywhere.\n\nUse the verbose flag (-v) to get the commit hash\n\n$ git fetch -v ${remote}\n....\n* fetched ${remote}\n  commit: ${hash}\n\nSanti\n"},{"id":"33234","messageId":"17857.61923.464433.454148@lisa.zopyra.com","threadId":"6592","inReplyTo":"epq4nl$ui7$1@sea.gmane.org","subject":"Re: What did I just fetch?","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-02-01T13:57:55Z","receivedAt":"2007-02-01T13:57:55Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"On Wednesday, January 31, 2007 at 14:15:49 (+0100) Jakub Narebski writes:\n>Bill Lear wrote:\n>\n>> When updating in cvs, I get a list of files changed by the update.\n>> \n>> How can I do this in git when fetching into a bare repo?\n>> \n>> % GIT_DIR=. git fetch git://source/project\n>> remote: Generating pack...\n>> remote: Done counting 18 objects.\n>> remote: Result has 10 objects.\n>> remote: Deltifying 10 objects.\n>> remote:  100% (10/10) done\n>> Unpacking 10 objects\n>> remote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n>>  100% (10/10) done\n>You should have also something like below:\n>* refs/remotes/origin/master: fast forward to branch 'master' of git://source/project\n>  old..new: 1732a1f..73a2acc\n>\n>> So, I'd like to see the files, perhaps the differences, etc.\n>\n> $ git diff --summary 1732a1f..73a2acc\n> $ git diff --summary ORIG_HEAD..HEAD\n\nBTW, this is with git 1.4.4.1...\n\nI don't see the refs/remotes/origin/master line you refer to:\n\n%  git --bare fetch git://source/project\nremote: Generating pack...\nremote: Done counting 18 objects.\nremote: Result has 10 objects.\nremote: Deltifying 10 objects.\nremote:  100% (10/10) done\nUnpacking 10 objects\nremote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n\nAnd no refs/remotes file:\n\n% ls refs\nheads  tags\n\nI can get a commit id by using -v:\n\n% git --bare fetch -v git://source/project\nremote: Generating pack...\nremote: Done counting 18 objects.\nremote: Result has 10 objects.\nremote: Deltifying 10 objects.\nremote:  100% (10/10) done\nUnpacking 10 objects\nremote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n\n* fetched git://source/project\n  commit: 89f0bd4\n\nAnd, why do repeated fetches seem to fetch something instead of\nsaying \"I've got nothing to do, you stupid git!\"?\n\nWell, I'd just like to see what is in this commit, I guess, then.\n\nSo, I try git cat-file, and notice what looks like an error in\nthe usage message:\n\n% git --bare cat-file 89f0bd4\nusage: git-cat-file [-t|-s|-e|-p|<type>] <sha1>\n\nIt seems to indicate the switches and the type are optional (square\nbrackets), but it's not doing anything, so it must want one of the\nswitches.\n\n% git --bare cat-file commit 89f0bd4\ntree d9421c9d3079dc48a3b3c5938a6a29e1404bd322\nparent 0624063622c793d5812bdf84c909eaf17abf4f2d\nparent 069596712287564e2e6d45207cb5f5b4069ed7ac\nauthor John Smith <jsmith@myco.com> 1170168752 -0600\ncommitter John Smith <jsmith@myco.com> 1170168752 -0600\n\nMerge branch 'master' of ssh+git://source/repos/git/project\n\nSo, then I find git show:\n\n% git --bare show --pretty=fuller 89f0bd4\n[98 blank lines suppressed!!]\ncommit 89f0bd43b21431c70fe22e099b8c0fc11b190b0e\nMerge: 0624063... 0695967...\nAuthor:     John Smith <jsmith@myco.com>\nAuthorDate: Tue Jan 30 08:52:32 2007 -0600\nCommit:     John Smith <jsmith@myco.com>\nCommitDate: Tue Jan 30 08:52:32 2007 -0600\n\n    Merge branch 'master' of ssh+git://source/repos/git/project\n\nSo, still no \"content\" here.  Should I be expecting some?\n\nAnd, what does \"Merge: 0624063... 0695967...\" mean?\n\n\nBill\n"},{"id":"33629","messageId":"200702051321.17297.jnareb@gmail.com","threadId":"6592","inReplyTo":"17857.61923.464433.454148@lisa.zopyra.com","subject":"Re: What did I just fetch?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-02-05T12:21:15Z","receivedAt":"2007-02-05T12:21:15Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On 01.02.2007, Bill Lear wrote:\n> On Wednesday, January 31, 2007 at 14:15:49 (+0100) Jakub Narebski writes:\n>>Bill Lear wrote:\n>>\n>>> When updating in cvs, I get a list of files changed by the update.\n>>> \n>>> How can I do this in git when fetching into a bare repo?\n>>> \n>>> % GIT_DIR=. git fetch git://source/project\n>>> remote: Generating pack...\n>>> remote: Done counting 18 objects.\n>>> remote: Result has 10 objects.\n>>> remote: Deltifying 10 objects.\n>>> remote:  100% (10/10) done\n>>> Unpacking 10 objects\n>>> remote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n>>>  100% (10/10) done\n>> You should have also something like below:\n>> * refs/remotes/origin/master: fast forward to branch 'master' of git://source/project\n>>   old..new: 1732a1f..73a2acc\n>>\n>>> So, I'd like to see the files, perhaps the differences, etc.\n>>\n>> $ git diff --summary 1732a1f..73a2acc\n>> $ git diff --summary ORIG_HEAD..HEAD\n> \n> BTW, this is with git 1.4.4.1...\n> \n> I don't see the refs/remotes/origin/master line you refer to:\n\ngit 1.4.4.1 if I remember correctly didn't use \"separate remotes\"\nconfiguration by default. Besides, your repo might have been cloned\nwithout separate remotes, and if it is bare repo it probably have\nbeen (and should been) cloned 1:1.\n\nSo instead of refs/remotes/origin/master you should see refs/heads/origin\nif you are in \"live\" repo, and refs/heads/master if you are in bare repo.\n\n> %  git --bare fetch git://source/project\n> remote: Generating pack...\n> remote: Done counting 18 objects.\n> remote: Result has 10 objects.\n> remote: Deltifying 10 objects.\n> remote:  100% (10/10) done\n> Unpacking 10 objects\n> remote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n\nBut the problem here (namely no refs update info) is that you use URL\nbut provide no refspecs. Git downloads something, but doesn't update\nrefs because you didn't requested that. This case is usually used _only_\nto *pull* (not only fetch) some spurious repo without need for tracking\nbranch.\n\nIf you want to download changes since clone (or last fetch), you should\nuse \"git --bare fetch origin\" (or even \"git --bare fetch\"). Note: with\ngit 1.4.4.1 this would not pick up _new_ refs.\n\n> And no refs/remotes file:\n> \n> % ls refs\n> heads  tags\n\nI forgot that bare repos got cloned 1:1, and not using separate remotes\nlayout. Besides git 1.4.4.1 didn't use separate remotes layout by default,\nif I remember correctly.\n\n> I can get a commit id by using -v:\n> \n> % git --bare fetch -v git://source/project\n> remote: Generating pack...\n> remote: Done counting 18 objects.\n> remote: Result has 10 objects.\n> remote: Deltifying 10 objects.\n> remote:  100% (10/10) done\n> Unpacking 10 objects\n> remote: Total 10, written 10 (delta 6), reused 7 (delta 3)\n> \n> * fetched git://source/project\n>   commit: 89f0bd4\n\nHmmm... I wonder what you have fetched. Probably remote HEAD.\n\n> And, why do repeated fetches seem to fetch something instead of\n> saying \"I've got nothing to do, you stupid git!\"?\n\nBecause even that you download objects, you don't store _references_\nto those objects (no refs gets updated because of no refspecs in git-fetch\ninvocation), besides FETCH_HEAD. And FETCH_HEAD is used by git-pull\nonly; it looks like it is not considered in checking what you have when\nnegotiation on fetch.\n\n> Well, I'd just like to see what is in this commit, I guess, then.\n> \n> So, I try git cat-file, and notice what looks like an error in\n> the usage message:\n\nYou should use git-show instead. In 1.5.0-rc3 it can be used\nfor pretty much anythong git-cat-file was used/\n\n> % git --bare cat-file 89f0bd4\n> usage: git-cat-file [-t|-s|-e|-p|<type>] <sha1>\n> \n> It seems to indicate the switches and the type are optional (square\n> brackets), but it's not doing anything, so it must want one of the\n> switches.\n\nFact. I'm not sure how this usage string should be written...\n\n> % git --bare cat-file commit 89f0bd4\n> tree d9421c9d3079dc48a3b3c5938a6a29e1404bd322\n> parent 0624063622c793d5812bdf84c909eaf17abf4f2d\n> parent 069596712287564e2e6d45207cb5f5b4069ed7ac\n> author John Smith <jsmith@myco.com> 1170168752 -0600\n> committer John Smith <jsmith@myco.com> 1170168752 -0600\n> \n> Merge branch 'master' of ssh+git://source/repos/git/project\n> \n> So, then I find git show:\n> \n> % git --bare show --pretty=fuller 89f0bd4\n> [98 blank lines suppressed!!]\n> commit 89f0bd43b21431c70fe22e099b8c0fc11b190b0e\n> Merge: 0624063... 0695967...\n> Author:     John Smith <jsmith@myco.com>\n> AuthorDate: Tue Jan 30 08:52:32 2007 -0600\n> Commit:     John Smith <jsmith@myco.com>\n> CommitDate: Tue Jan 30 08:52:32 2007 -0600\n> \n>     Merge branch 'master' of ssh+git://source/repos/git/project\n> \n> So, still no \"content\" here.  Should I be expecting some?\n> \n> And, what does \"Merge: 0624063... 0695967...\" mean?\n\nIt means that it is a merge commit. And merge commits (unless you enable\nmerge.summary) by default consist only of \"Merge branch '<name>' of <repo>\"\nnessage. Merge commit diff is not shown by default: you have to use --cc\nfor that (as ordinary diff doesn't work with more than one parent).\n\n-- \nJakub Narebski\nShadeHawk on #git\nPoland\n"}]}