{"thread":{"id":"5563","subject":"Re: nightly tarballs of git","startedAt":"2006-09-14T17:51:16Z","lastAt":"2006-09-17T00:03:51Z","messageCount":9,"participants":["Dave Jones","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26906","messageId":"20060914175116.GB22279@redhat.com","threadId":"5563","inReplyTo":"20060914172754.GF8013@us.ibm.com","subject":"Re: nightly tarballs of git","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-09-14T17:51:16Z","receivedAt":"2006-09-14T17:51:16Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Thu, Sep 14, 2006 at 10:27:54AM -0700, Nishanth Aravamudan wrote:\n > Hi Dave,\n > \n > For simplicities sake when I was running Debian Sarge on a server here,\n > I was using your nightly tarballs of git to build a fresh up-to-date\n > version on a regular basis. I noticed though, that the tarballs result\n > in gits with a version of 1.3.GIT, while the git repository is at\n > 1.4.2.1. Is that expected?\n\nNo, it isn't. (at least by me).\nWhat the snapshotting script does when cron runs it is just a 'git pull'\non a repo that was cloned a while back when I first set up the snapshotting\nscript.  I could change it to do a fresh clone each time it runs, but\nthat seems somewhat wasteful when most of the time there's nothing new to pull.\n\ngitsters, any ideas what could be going wrong here ?\nThe original clone of the repo was just a straight clone of git://git.kernel.org/pub/scm/git/git.git\n\n\tDave \n"},{"id":"26912","messageId":"7v1wqe45vs.fsf@assigned-by-dhcp.cox.net","threadId":"5563","inReplyTo":"20060914175116.GB22279@redhat.com","subject":"Re: nightly tarballs of git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-14T19:15:03Z","receivedAt":"2006-09-14T19:15:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dave Jones <davej@redhat.com> writes:\n\n> On Thu, Sep 14, 2006 at 10:27:54AM -0700, Nishanth Aravamudan wrote:\n>  > Hi Dave,\n>  > \n>  > For simplicities sake when I was running Debian Sarge on a server here,\n>  > I was using your nightly tarballs of git to build a fresh up-to-date\n>  > version on a regular basis. I noticed though, that the tarballs result\n>  > in gits with a version of 1.3.GIT, while the git repository is at\n>  > 1.4.2.1. Is that expected?\n>\n> No, it isn't. (at least by me).\n> What the snapshotting script does when cron runs it is just a 'git pull'\n> on a repo that was cloned a while back when I first set up the snapshotting\n> script.  I could change it to do a fresh clone each time it runs, but\n> that seems somewhat wasteful when most of the time there's nothing new to pull.\n>\n> gitsters, any ideas what could be going wrong here ?\n> The original clone of the repo was just a straight clone of git://git.kernel.org/pub/scm/git/git.git\n\nWhen the build procesure assigns the version to the generated\ngit binary, it does these checks and takes the first one:\n\n - Run \"git describe\" at the top of the source tree.  If it\n   returns some version (not an error message), use it.  This\n   case should not apply here since we are talking about a\n   tarball of a working tree, and it does not have a repository.\n\n - See if 'version' file exists at the top of the source tree,\n   and uses what is recorded there.  This file is placed in the\n   resulting tarball by the \"make dist\" target of the toplevel\n   Makefile.\n\n - Otherwise use DEF_VER hardcoded in GIT-VERSION-GEN script.\n   The 1.4.2 series is shipped with DEF_VER set to v1.4.2.GIT,\n   so this does not explain why Nashanth sees \"1.3.GIT\" (or\n   \"v1.3.GIT\", if the original report did not copy it right).\n\nI just snarfed your snapshot tarball from a few days ago, and I\ndo not see any version file there (which indicates that it is\nnot a product of \"make dist\").  Interestingly enough DEF_VER is\nset to v1.3.GIT in GIT-VERSION-GEN.  This line was changed from\nv1.3.GIT to v1.4.GIT with commit 41292dd on June 10th and then\nupdated to v1.4.2.GIT with commit 5a71682 on August 3rd.\n\nSo a short conclusion is that the directory you are tarring up\ndoes not have snapshot of my tree.\n\nI would like to understand why.  If an automated 'pull' is\nfailing, that is somewhat worrysome, because I presume you do\nnot do any development of your own in your snapshot directory\nand in that case everything should fast forward.  Even if 'pull'\nfailed somehow, if it is not reporting its failure, it is even\nmore worrysome.\n"},{"id":"26915","messageId":"20060914193616.GA32735@redhat.com","threadId":"5563","inReplyTo":"7v1wqe45vs.fsf@assigned-by-dhcp.cox.net","subject":"Re: nightly tarballs of git","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-09-14T19:36:16Z","receivedAt":"2006-09-14T19:36:16Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Thu, Sep 14, 2006 at 12:15:03PM -0700, Junio C Hamano wrote:\n > Dave Jones <davej@redhat.com> writes:\n \n > > The original clone of the repo was just a straight clone of git://git.kernel.org/pub/scm/git/git.git\n > \n > When the build procesure assigns the version to the generated\n > git binary, it does these checks and takes the first one:\n > \n >  - Run \"git describe\" at the top of the source tree.  If it\n >    returns some version (not an error message), use it.  This\n >    case should not apply here since we are talking about a\n >    tarball of a working tree, and it does not have a repository.\n\nOn the server this is running on, the returns v1.3.3-g7f7e6ea\n\n >  - See if 'version' file exists at the top of the source tree,\n >    and uses what is recorded there.  This file is placed in the\n >    resulting tarball by the \"make dist\" target of the toplevel\n >    Makefile.\n >  - Otherwise use DEF_VER hardcoded in GIT-VERSION-GEN script.\n >    The 1.4.2 series is shipped with DEF_VER set to v1.4.2.GIT,\n >    so this does not explain why Nashanth sees \"1.3.GIT\" (or\n >    \"v1.3.GIT\", if the original report did not copy it right).\n > \n > I just snarfed your snapshot tarball from a few days ago, and I\n > do not see any version file there (which indicates that it is\n > not a product of \"make dist\").  Interestingly enough DEF_VER is\n > set to v1.3.GIT in GIT-VERSION-GEN.  This line was changed from\n > v1.3.GIT to v1.4.GIT with commit 41292dd on June 10th and then\n > updated to v1.4.2.GIT with commit 5a71682 on August 3rd.\n > \n > So a short conclusion is that the directory you are tarring up\n > does not have snapshot of my tree.\n > \n > I would like to understand why.  If an automated 'pull' is\n > failing, that is somewhat worrysome, because I presume you do\n > not do any development of your own in your snapshot directory\n > and in that case everything should fast forward.  Even if 'pull'\n > failed somehow, if it is not reporting its failure, it is even\n > more worrysome.\n\nI don't recall ever having done anything at all in the dir that\nis being snapshotted. So the only thing that should be happening\nis the side-effects of the script.  Here it is in its entirity..\n\nDATE=`date +%Y-%m-%d`\n\nPROJ=\"git\"\ncd ~/git-trees\nif [ -d $PROJ ]; then\n  cd $PROJ\n  git pull -n\nelse\n  git clone -q git://git.kernel.org/pub/scm/git/git.git\n  cd $PROJ\nfi\nsnap=git-snapshot-$(date +\"%Y%m%d\")\ngit-tar-tree HEAD $snap | gzip -9 > $PROJ-$DATE.tar.gz\nmv $PROJ-$DATE.tar.gz ~/sites/www.codemonkey.org.uk/htdocs/projects/git-snapshots/$PROJ/\nrm -f ~/sites/www.codemonkey.org.uk/htdocs/projects/git-snapshots/$PROJ/$PROJ-`date +%Y-%m-%d --date=\"7 days ago\"`.tar.gz\nln -sf ~/sites/www.codemonkey.org.uk/htdocs/projects/git-snapshots/$PROJ/$PROJ-$DATE.tar.gz ~/sites/www.codemonkey.org.uk/htdocs/projects/git-snapshots/$PROJ/$PROJ-latest.tar.gz\n#git-fsck-objects --full\n\n\nI'll save that broken dir away somewhere, and rerun the script\n(which as you can see above will make it reclone from scratch).\nIf you want a copy of the .git of the broken tree I can put that up somewhere too.\n\nHmm, I just checked the mail cron sent out recently (sadly I don't\nhave an archive of older mails).  It does look a bit strange..\n\ngot 49be764e948668341034e121fad5cf07ab079bff\ngot 415c09ba10a391cec60c939da1722c83df7cd906\n* refs/heads/origin: fast forward to branch 'master' of http://www.kernel.org/pub/scm/git/git\n  from 8a5dbef8ac24bc5a28409d646cf3ff6db0cccb3f to 38529e28a4f465ad5d5f2fa249ca17da680bac5f\nFailed to fetch refs/heads/gb/diffdelta from http://www.kernel.org/pub/scm/git/git.git\n\nInteresting. It looks like my original clone was over http.\nAnother reason to reclone over git: I guess.\n\n\tDave\n"},{"id":"26916","messageId":"eecblv$gh5$1@sea.gmane.org","threadId":"5563","inReplyTo":"20060914193616.GA32735@redhat.com","subject":"Re: nightly tarballs of git","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-14T19:48:40Z","receivedAt":"2006-09-14T19:48:40Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dave Jones wrote:\n\n> I don't recall ever having done anything at all in the dir that\n> is being snapshotted. So the only thing that should be happening\n> is the side-effects of the script.  Here it is in its entirity..\n> \n> DATE=`date +%Y-%m-%d`\n> \n> PROJ=\"git\"\n> cd ~/git-trees\n> if [ -d $PROJ ]; then\n>   cd $PROJ\n\nJust in case I would add \"git checkout master\" here.\n\n>   git pull -n\n> else\n>   git clone -q git://git.kernel.org/pub/scm/git/git.git\n>   cd $PROJ\n> fi\n> snap=git-snapshot-$(date +\"%Y%m%d\")\n> git-tar-tree HEAD $snap | gzip -9 > $PROJ-$DATE.tar.gz\n\nAnd what is the HEAD? Perhaps you should say 'origin' here instead?\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"26919","messageId":"7virjq2oyc.fsf@assigned-by-dhcp.cox.net","threadId":"5563","inReplyTo":"20060914193616.GA32735@redhat.com","subject":"Re: nightly tarballs of git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-14T20:06:03Z","receivedAt":"2006-09-14T20:06:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dave Jones <davej@redhat.com> writes:\n\n> DATE=`date +%Y-%m-%d`\n>\n> PROJ=\"git\"\n> cd ~/git-trees\n> if [ -d $PROJ ]; then\n>   cd $PROJ\n>   git pull -n\n> else\n>   git clone -q git://git.kernel.org/pub/scm/git/git.git\n>   cd $PROJ\n> fi\n> snap=git-snapshot-$(date +\"%Y%m%d\")\n> git-tar-tree HEAD $snap | gzip -9 > $PROJ-$DATE.tar.gz\n\nIf you are using git-tar-tree (which by the way _is_ the right\nthing to do) and if you are just taking an upstream snapshot\nwithout doing your own development (which also is the case\nhere), then you do not even need a working tree in the directory\nthis script runs.  It would save your disk space and time to\ncheck out the updated working tree files.\n\nPerhaps...\n\n#!/bin/sh\nURL=git://git.kernel.org/pub/scm/git/git.git\nPROJ=git\n\ncd ~/git-trees\nif test -d \"$PROJ\"\nthen\n\tcd \"$PROJ\" && git fetch\nelse\n\tgit clone -q -n \"$URL\" \"$PROJ\" && cd \"$PROJ\"\nfi || {\n\techo >&2 Something wicked happend.\n        exit $?\n}\nsnap=git-snapshot-$(date +\"%Y%m%d\")\ngit-tar-tree origin $snap | gzip -9 > $PROJ-$DATE.tar.gz\n"},{"id":"27006","messageId":"20060916175853.GA24124@redhat.com","threadId":"5563","inReplyTo":"7virjq2oyc.fsf@assigned-by-dhcp.cox.net","subject":"Re: nightly tarballs of git","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-09-16T17:58:53Z","receivedAt":"2006-09-16T17:58:53Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Thu, Sep 14, 2006 at 01:06:03PM -0700, Junio C Hamano wrote:\n\n > If you are using git-tar-tree (which by the way _is_ the right\n > thing to do) and if you are just taking an upstream snapshot\n > without doing your own development (which also is the case\n > here), then you do not even need a working tree in the directory\n > this script runs.  It would save your disk space and time to\n > check out the updated working tree files.\n > \n > Perhaps...\n > \n > #!/bin/sh\n > URL=git://git.kernel.org/pub/scm/git/git.git\n > PROJ=git\n > \n > cd ~/git-trees\n > if test -d \"$PROJ\"\n > then\n > \tcd \"$PROJ\" && git fetch\n > else\n > \tgit clone -q -n \"$URL\" \"$PROJ\" && cd \"$PROJ\"\n > fi || {\n > \techo >&2 Something wicked happend.\n >         exit $?\n > }\n > snap=git-snapshot-$(date +\"%Y%m%d\")\n > git-tar-tree origin $snap | gzip -9 > $PROJ-$DATE.tar.gz\n\nThis went well, right up until you checked something in :-)\n\nGenerating pack...\nDone counting 155 objects.\nResult has 126 objects.\nDeltifying 126 objects.\n   0% (1/126) done\n   1% (2/126) done\n   2% (3/126) done\n   3% (4/126) done\n   4% (6/126) done\n   5% (7/126) done\n   6% (8/126) done\n   7% (9/126) done\n   8% (11/126) done\n   9% (12/126) done\n  10% (13/126) done\n  11% (14/126) done\n  12% (16/126) done\n  13% (17/126) done\n  14% (18/126) done\n  15% (19/126) done\n  16% (21/126) done\n  17% (22/126) done\n  18% (23/126) done\n  19% (24/126) done\n  20% (26/126) done\n  21% (27/126) done\n  22% (28/126) done\n  23% (29/126) done\n  24% (31/126) done\n  25% (32/126) done\n  26% (33/126) done\n  27% (35/126) done\n  28% (36/126) done\n  29% (37/126) done\n  30% (38/126) done\n  31% (40/126) done\n  32% (41/126) done\n  33% (42/126) done\n  34% (43/126) done\n  35% (45/126) done\n  36% (46/126) done\n  37% (47/126) done\n  38% (48/126) done\n  39% (50/126) done\n  40% (51/126) done\n  41% (52/126) done\n  42% (53/126) done\n  43% (55/126) done\n  44% (56/126) done\n  45% (57/126) done\n  46% (58/126) done\n  47% (60/126) done\n  48% (61/126) done\n  49% (62/126) done\n  50% (63/126) done\n  51% (65/126) done\n  52% (66/126) done\n  53% (67/126) done\n  54% (69/126) done\n  55% (70/126) done\n  56% (71/126) done\n  57% (72/126) done\n  58% (74/126) done\n  59% (75/126) done\n  60% (76/126) done\n  61% (77/126) done\n  62% (79/126) done\n  63% (80/126) done\n  64% (81/126) done\n  65% (82/126) done\n  66% (84/126) done\n  67% (85/126) done\n  68% (86/126) done\n  69% (87/126) done\n  70% (89/126) done\n  71% (90/126) done\n  72% (91/126) done\n  73% (92/126) done\n  74% (94/126) done\n  75% (95/126) done\n  76% (96/126) done\n  77% (98/126) done\n  78% (99/126) done\n  79% (100/126) done\n  80% (101/126) done\n  81% (103/126) done\n  82% (104/126) done\n  83% (105/126) done\n  84% (106/126) done\n  85% (108/126) done\n  86% (109/126) done\n  87% (110/126) done\n  88% (111/126) done\n  89% (113/126) done\n  90% (114/126) done\n  91% (115/126) done\n  92% (116/126) done\n  93% (118/126) done\n  94% (119/126) done\n  95% (120/126) done\n  96% (121/126) done\n  97% (123/126) done\n  98% (124/126) done\n  99% (125/126) done\n 100% (126/126) done\nUnpacking 126 objects\nTotal 126, written 126 (delta 93), reused 0 (delta 0)\n* refs/heads/origin: fast forward to branch 'master' of git://git.kernel.org/pub/scm/git/git\n  from 38529e28a4f465ad5d5f2fa249ca17da680bac5f to fc2b2be031f44aef0106cf7f872b750cd90b2253\n* refs/heads/pu: does not fast forward to branch 'pu' of git://git.kernel.org/pub/scm/git/git;\n  not updating.\nSomething wicked happend.\n\n\n\n\t\tDave\n\n-- \nhttp://www.codemonkey.org.uk\n"},{"id":"27008","messageId":"eehe9n$v1b$1@sea.gmane.org","threadId":"5563","inReplyTo":"20060916175853.GA24124@redhat.com","subject":"Re: nightly tarballs of git","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-16T18:04:13Z","receivedAt":"2006-09-16T18:04:13Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dave Jones wrote:\n\n> * refs/heads/pu: does not fast forward to branch 'pu' of\n>   git://git.kernel.org/pub/scm/git/git; \n>   not updating.\n> Something wicked happend.\n \nDid you put '+' before 'pu' line in 'origin' file in remotes?\nIt should read\n\n        Pull:+refs/heads/pu:refs/heads/pu\n\nAlternatively you can give --force option to git-fetch.\n\nSee\nhttp://git.or.cz/gitwiki/GitFaq#head-a1f9a3e511e0b866d788d7cb600637a9b976a994\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27009","messageId":"7v3baradkb.fsf@assigned-by-dhcp.cox.net","threadId":"5563","inReplyTo":"20060916175853.GA24124@redhat.com","subject":"Re: nightly tarballs of git","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-16T18:09:24Z","receivedAt":"2006-09-16T18:09:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dave Jones <davej@redhat.com> writes:\n\n> This went well, right up until you checked something in :-)\n>\n> Generating pack...\n> Done counting 155 objects.\n> Result has 126 objects.\n> Deltifying 126 objects.\n>    0% (1/126) done\n> ...\n> Unpacking 126 objects\n> Total 126, written 126 (delta 93), reused 0 (delta 0)\n> * refs/heads/origin: fast forward to branch 'master' of git://git.kernel.org/pub/scm/git/git\n>   from 38529e28a4f465ad5d5f2fa249ca17da680bac5f to fc2b2be031f44aef0106cf7f872b750cd90b2253\n> * refs/heads/pu: does not fast forward to branch 'pu' of git://git.kernel.org/pub/scm/git/git;\n>   not updating.\n> Something wicked happend.\n\nYou care only about 'master' in that repository anyway, so I\nwould suggest removing other lines from remotes/origin and have\nonly these two lines:\n\n\tURL:  git://git.kernel.org/pub/scm/git/git\n        Pull: refs/heads/master:refs/heads/origin\n"},{"id":"27026","messageId":"20060917000351.GA29108@redhat.com","threadId":"5563","inReplyTo":"7v3baradkb.fsf@assigned-by-dhcp.cox.net","subject":"Re: nightly tarballs of git","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-09-17T00:03:51Z","receivedAt":"2006-09-17T00:03:51Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Sat, Sep 16, 2006 at 11:09:24AM -0700, Junio C Hamano wrote:\n > Dave Jones <davej@redhat.com> writes:\n > \n > > This went well, right up until you checked something in :-)\n > >\n > > Generating pack...\n > > Done counting 155 objects.\n > > Result has 126 objects.\n > > Deltifying 126 objects.\n > >    0% (1/126) done\n > > ...\n > > Unpacking 126 objects\n > > Total 126, written 126 (delta 93), reused 0 (delta 0)\n > > * refs/heads/origin: fast forward to branch 'master' of git://git.kernel.org/pub/scm/git/git\n > >   from 38529e28a4f465ad5d5f2fa249ca17da680bac5f to fc2b2be031f44aef0106cf7f872b750cd90b2253\n > > * refs/heads/pu: does not fast forward to branch 'pu' of git://git.kernel.org/pub/scm/git/git;\n > >   not updating.\n > > Something wicked happend.\n > \n > You care only about 'master' in that repository anyway, so I\n > would suggest removing other lines from remotes/origin and have\n > only these two lines:\n > \n > \tURL:  git://git.kernel.org/pub/scm/git/git\n >         Pull: refs/heads/master:refs/heads/origin\n\nThanks, I updated the repo, and kicked the snapshot script, and\nit seems to be doing the right thing again.\n\n\tDave\n"}]}