{"thread":{"id":"15298","subject":"Committing with past date?","startedAt":"2008-08-31T10:44:29Z","lastAt":"2009-02-03T04:18:05Z","messageCount":7,"participants":["Magnus Hjorth","Jakub Narebski","Russ Dill","Zabre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89305","messageId":"1220179469.5518.5.camel@magnus-desktop","threadId":"15298","inReplyTo":null,"subject":"Committing with past date?","fromName":"Magnus Hjorth","fromEmail":"magnus.hjorth@home.se","sentAt":"2008-08-31T10:44:29Z","receivedAt":"2008-08-31T10:44:29Z","isPatch":false,"sender":{"key":"magnus.hjorth@home.se","avatar":null},"body":"Hi,\n\nCan someone tell me how to make a git commit with a date other than the\ncurrent. I hope there is some easier way than changing the system\nclock.. :)\n\nI'm trying to port over old version history that I maintained manually\n(tarballs and changelogs) into a git repository. \n\nBest regards,\nMagnus\n"},{"id":"89306","messageId":"m34p51qvzv.fsf@localhost.localdomain","threadId":"15298","inReplyTo":"1220179469.5518.5.camel@magnus-desktop","subject":"Re: Committing with past date?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-08-31T11:12:18Z","receivedAt":"2008-08-31T11:12:18Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Magnus Hjorth <magnus.hjorth@home.se> writes:\n\n> Can someone tell me how to make a git commit with a date other than the\n> current. I hope there is some easier way than changing the system\n> clock.. :)\n\nSee git(1), section \"Environment Variables\":\n   git Commits\n       GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE,\n       GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_COMMITTER_DATE,\n       EMAIL\n              see git-commit-tree(1)\n\nor you can use GIT_COMMITTER_IDENT, GIT_AUTHOR_IDENT.  See output\nof \"git var -l\" to get form of it.\n \n> I'm trying to port over old version history that I maintained manually\n> (tarballs and changelogs) into a git repository. \n\nFor that, I think it would be best to take a look at example\nfast-import script: contrib/fast-import/import-tars.perl;\nthere is equivalent contrib/fast-import/import-zips.py if you\nperfer either Pyhon over Perl, and/or zips over tarballs.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"89426","messageId":"1220286321.5474.6.camel@magnus-desktop","threadId":"15298","inReplyTo":"m34p51qvzv.fsf@localhost.localdomain","subject":"Re: Committing with past date?","fromName":"Magnus Hjorth","fromEmail":"magnus.hjorth@home.se","sentAt":"2008-09-01T16:25:21Z","receivedAt":"2008-09-01T16:25:21Z","isPatch":false,"sender":{"key":"magnus.hjorth@home.se","avatar":null},"body":"Thank you Jakub! \n\nForgot to look in the main git manpage, and that variable wasn't\nmentioned in the git-commit manpage or in any FAQ.. \n\nNow I have a more tricky question.\n\nThe first part of my application history (the stone age) was maintained\nmanually using tarballs, but the second part was maintained using CVS\n(the dark ages).\n\nI have successfully imported the CVS history using git-cvsimport, but\nnow I want to add these older revisions that were made with tarballs to\nthe same tree, before the CVS revisions. The last tarball and the first\nCVS revision have identical content, and I would like to somehow \"glue\"\nthe histories together.\n\nCan this be done? \n\nBest regards,\nMagnus\n\n\n\nOn Sun, 2008-08-31 at 04:12 -0700, Jakub Narebski wrote:\n> Magnus Hjorth <magnus.hjorth@home.se> writes:\n> \n> > Can someone tell me how to make a git commit with a date other than the\n> > current. I hope there is some easier way than changing the system\n> > clock.. :)\n> \n> See git(1), section \"Environment Variables\":\n>    git Commits\n>        GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE,\n>        GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_COMMITTER_DATE,\n>        EMAIL\n>               see git-commit-tree(1)\n> \n> or you can use GIT_COMMITTER_IDENT, GIT_AUTHOR_IDENT.  See output\n> of \"git var -l\" to get form of it.\n>  \n> > I'm trying to port over old version history that I maintained manually\n> > (tarballs and changelogs) into a git repository. \n> \n> For that, I think it would be best to take a look at example\n> fast-import script: contrib/fast-import/import-tars.perl;\n> there is equivalent contrib/fast-import/import-zips.py if you\n> perfer either Pyhon over Perl, and/or zips over tarballs.\n> \n"},{"id":"89430","messageId":"f9d2a5e10809011202v418a71cbw489c58fdf468c940@mail.gmail.com","threadId":"15298","inReplyTo":"1220286321.5474.6.camel@magnus-desktop","subject":"Re: Committing with past date?","fromName":"Russ Dill","fromEmail":"russ.dill@gmail.com","sentAt":"2008-09-01T19:02:35Z","receivedAt":"2008-09-01T19:02:35Z","isPatch":false,"sender":{"key":"russ.dill@gmail.com","avatar":"https://gravatar.com/avatar/989b24f3fa63126a35d7c74069e2626e715a3b1a86616be9962f7ceae04ff9c5?d=mp&s=160"},"body":"On Mon, Sep 1, 2008 at 9:25 AM, Magnus Hjorth <magnus.hjorth@home.se> wrote:\n> Thank you Jakub!\n>\n> Forgot to look in the main git manpage, and that variable wasn't\n> mentioned in the git-commit manpage or in any FAQ..\n>\n> Now I have a more tricky question.\n>\n> The first part of my application history (the stone age) was maintained\n> manually using tarballs, but the second part was maintained using CVS\n> (the dark ages).\n>\n> I have successfully imported the CVS history using git-cvsimport, but\n> now I want to add these older revisions that were made with tarballs to\n> the same tree, before the CVS revisions. The last tarball and the first\n> CVS revision have identical content, and I would like to somehow \"glue\"\n> the histories together.\n>\n> Can this be done?\n>\n\nI think you want git filter-branh --parent-filter ...\n"},{"id":"89465","messageId":"200809020231.32780.jnareb@gmail.com","threadId":"15298","inReplyTo":"1220286321.5474.6.camel@magnus-desktop","subject":"Re: Committing with past date?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-09-02T00:31:32Z","receivedAt":"2008-09-02T00:31:32Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Mon, 1 Sep 2008, Magnus Hjorth wrote:\n> On Sun, 2008-08-31 at 04:12 -0700, Jakub Narebski wrote:\n> > Magnus Hjorth <magnus.hjorth@home.se> writes:\n> > \n> > > Can someone tell me how to make a git commit with a date other than the\n> > > current. I hope there is some easier way than changing the system\n> > > clock.. :)\n> > \n> > See git(1), section \"Environment Variables\":\n> >    git Commits\n> >        GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE,\n> >        GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_COMMITTER_DATE,\n> >        EMAIL\n> >               see git-commit-tree(1)\n> > \n> > or you can use GIT_COMMITTER_IDENT, GIT_AUTHOR_IDENT.  See output\n> > of \"git var -l\" to get form of it.\n> >  \n> > > I'm trying to port over old version history that I maintained manually\n> > > (tarballs and changelogs) into a git repository. \n> > \n> > For that, I think it would be best to take a look at example\n> > fast-import script: contrib/fast-import/import-tars.perl;\n> > there is equivalent contrib/fast-import/import-zips.py if you\n> > perfer either Pyhon over Perl, and/or zips over tarballs.\n\n\n> Thank you Jakub! \n> \n> Forgot to look in the main git manpage, and that variable wasn't\n> mentioned in the git-commit manpage or in any FAQ.. \n\nUsing GIT_AUTHOR_DATE etc. is a bit hacky, so that is why it is not\nmentioned in git-commit homepage, but only in git-commit-index(1)\nplumbing homepage, and of course on git(1) which should include _all_\nenvironment variables affecting git execution.\n\nBy the way, is there any reason _not_ to use import-tars.perl from\nthe contrib/fast-import in your case?\n \n> Now I have a more tricky question.\n> \n> The first part of my application history (the stone age) was maintained\n> manually using tarballs, but the second part was maintained using CVS\n> (the dark ages).\n> \n> I have successfully imported the CVS history using git-cvsimport, but\n> now I want to add these older revisions that were made with tarballs to\n> the same tree, before the CVS revisions. The last tarball and the first\n> CVS revision have identical content, and I would like to somehow \"glue\"\n> the histories together.\n> \n> Can this be done? \n\nIt can be done for example using grafts. Search git mailing list for\ngraftshistory (or something like that) script, which was used to join\nusing grafts git \"current work\" Linux repository (started from \"scratch\").\nThen you can check in gitk if everything is all right. If you truly\nrequire connected histories, and not being able to locally turn on\nand off the historical repository, you can always use git-filter-branch\nwhich (among others) can turn grafts into true commits.\n\nLinux kernel repo has current work repository, and legacy BitKeeper\nrepository, which one can join together if needed using grafts file\n(see Documentation/gitrepository-layout.txt \n\n-- \nJakub Narebski\nShadeHawk on #git\nPoland\n\nA: Because it messes up the order in which people normally read text.\nQ: Why is top-posting such a bad thing?\nA: Top-posting.\nQ: What is the most annoying thing on Wsenet and in e-mail?\n"},{"id":"89474","messageId":"1220323334.5476.29.camel@magnus-desktop","threadId":"15298","inReplyTo":"200809020231.32780.jnareb@gmail.com","subject":"Re: Committing with past date?","fromName":"Magnus Hjorth","fromEmail":"magnus.hjorth@home.se","sentAt":"2008-09-02T02:42:14Z","receivedAt":"2008-09-02T02:42:14Z","isPatch":false,"sender":{"key":"magnus.hjorth@home.se","avatar":null},"body":"On Tue, 2008-09-02 at 02:31 +0200, Jakub Narebski wrote:\n> On Mon, 1 Sep 2008, Magnus Hjorth wrote:\n> > On Sun, 2008-08-31 at 04:12 -0700, Jakub Narebski wrote:\n> > > Magnus Hjorth <magnus.hjorth@home.se> writes:\n> > > \n\n> > >  \n> > > > I'm trying to port over old version history that I maintained manually\n> > > > (tarballs and changelogs) into a git repository. \n> > > \n> > > For that, I think it would be best to take a look at example\n> > > fast-import script: contrib/fast-import/import-tars.perl;\n> > > there is equivalent contrib/fast-import/import-zips.py if you\n> > > perfer either Pyhon over Perl, and/or zips over tarballs.\n\n> By the way, is there any reason _not_ to use import-tars.perl from\n> the contrib/fast-import in your case?\n\nWell, I was planning do a lot of manual cleanup of the files also\n(splitting commits, removing auto-generated files etc), so importing the\ntarballs would just be the first step. But I'll try it, it can still be\nuseful to get a starting point...\n\n> > \n> > I have successfully imported the CVS history using git-cvsimport, but\n> > now I want to add these older revisions that were made with tarballs to\n> > the same tree, before the CVS revisions. The last tarball and the first\n> > CVS revision have identical content, and I would like to somehow \"glue\"\n> > the histories together.\n> > \n> > Can this be done? \n> \n> It can be done for example using grafts. Search git mailing list for\n> graftshistory (or something like that) script, which was used to join\n> using grafts git \"current work\" Linux repository (started from \"scratch\").\n> Then you can check in gitk if everything is all right. If you truly\n> require connected histories, and not being able to locally turn on\n> and off the historical repository, you can always use git-filter-branch\n> which (among others) can turn grafts into true commits.\n\nThe grafts approach looks interesting.\n\nI still need some way to create multiple unconnected trees in one repo.\nMaybe the safest way to do that is to create a separate historic repo\nfirst and then transfer the historic branch using git-bundle to my main\nworking repo.\n\nRegards,\nMagnus\n"},{"id":"102912","messageId":"1233634685684-2261665.post@n2.nabble.com","threadId":"15298","inReplyTo":"1220323334.5476.29.camel@magnus-desktop","subject":"Similar thread","fromName":"Zabre","fromEmail":"427@free.fr","sentAt":"2009-02-03T04:18:05Z","receivedAt":"2009-02-03T04:18:05Z","isPatch":false,"sender":{"key":"427@free.fr","avatar":null},"body":"\nFor information, there is a similar thread there :\nhttp://n2.nabble.com/Force-commit-date-td2240539.html\n-- \nView this message in context: http://n2.nabble.com/Committing-with-past-date--tp795326p2261665.html\nSent from the git mailing list archive at Nabble.com.\n"}]}