{"thread":{"id":"10895","subject":"git-cvsimport bug with dates","startedAt":"2007-11-16T04:59:44Z","lastAt":"2007-11-17T21:36:17Z","messageCount":6,"participants":["Elijah Newren","Junio C Hamano","Robin Rosenberg","Jan Hudec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"60052","messageId":"51419b2c0711152059q55ced86gd224310c8c4a1851@mail.gmail.com","threadId":"10895","inReplyTo":null,"subject":"git-cvsimport bug with dates","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2007-11-16T04:59:44Z","receivedAt":"2007-11-16T04:59:44Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Hi,\n\nIt appears that there's some kind of bug with git-cvsimport and dates.\n In a small repository I imported on Oct 24, I'm getting:\n\n$ git log | grep ^Date | wc -l\n957\n$ git log | grep ^Date | tail\nDate:   Tue Oct 29 21:10:17 2002 +0000\nDate:   Tue Oct 29 17:41:05 2002 +0000\nDate:   Tue Oct 29 00:43:27 2002 +0000\nDate:   Mon Oct 28 23:36:40 2002 +0000\nDate:   Mon Oct 21 21:35:57 2002 +0000\nDate:   Fri Sep 20 22:18:01 2002 +0000\nDate:   Mon Sep 16 20:05:27 2002 +0000\nDate:   Wed Sep 11 21:14:03 2002 +0000\nDate:   Tue Sep 10 16:37:16 2002 +0000\nDate:   Fri Aug 23 16:03:22 2002 +0000\n$ git diff @{2007-10-01}\nwarning: Log for '' only goes back to Wed, 24 Oct 2007 19:31:38 +0000.\nfatal: bad object @{2007-10-01}\n\n\nIt appears that passing a date to git diff on any repository imported\nby git-cvsimport will show this error, as long as the date is prior to\nwhen the repository was imported.\n\n\nElijah\n"},{"id":"60057","messageId":"7vr6iq207f.fsf@gitster.siamese.dyndns.org","threadId":"10895","inReplyTo":"51419b2c0711152059q55ced86gd224310c8c4a1851@mail.gmail.com","subject":"Re: git-cvsimport bug with dates","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-16T06:06:44Z","receivedAt":"2007-11-16T06:06:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren\" <newren@gmail.com> writes:\n\n> $ git diff @{2007-10-01}\n> warning: Log for '' only goes back to Wed, 24 Oct 2007 19:31:38 +0000.\n> fatal: bad object @{2007-10-01}\n>\n>\n> It appears that passing a date to git diff on any repository imported\n> by git-cvsimport will show this error, as long as the date is prior to\n> when the repository was imported.\n\nThat is not a cvsimport specific issue.\n\nWhen you use \"branch@{date}\" notation, you are not asking a\nquestion on the project history, but a question on the local\nview from _your_ repository on that project.\n\n\t$ git log --since=3.days.ago master\n\nasks \"go back from the master tip and show commits until you hit\nthe commit made earlier than that date and stop traversing\".\n\nOn the other hand,\n\n\t$ git show master@{3.days.ago}\n\nasks \"show the commit that was the tip of 'master' branch in my\nrepository three days ago.\"  Maybe you pulled from your upstream\n5 minutes ago, and the last time before that, you pulled three\nweeks ago and did not do any development on the branch.  In such\na case, the latter question will give you the tip of your\n'master' as of three weeks ago which is the same as of three\ndays ago.\n"},{"id":"60091","messageId":"51419b2c0711160612r1a80bd5o686040f945e8d9c3@mail.gmail.com","threadId":"10895","inReplyTo":"7vr6iq207f.fsf@gitster.siamese.dyndns.org","subject":"Re: git-cvsimport bug with dates","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2007-11-16T14:12:29Z","receivedAt":"2007-11-16T14:12:29Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Nov 15, 2007 11:06 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> When you use \"branch@{date}\" notation, you are not asking a\n> question on the project history, but a question on the local\n> view from _your_ repository on that project.\n\nInteresting; that makes sense from a merge or pull viewpoint, but\nwouldn't it make more sense to have cvsimport ensure the commits are\ntreated as though they actually existed in master as of the date\nspecified in CVS?\n\nElijah\n"},{"id":"60129","messageId":"200711171112.23150.robin.rosenberg.lists@dewire.com","threadId":"10895","inReplyTo":"51419b2c0711160612r1a80bd5o686040f945e8d9c3@mail.gmail.com","subject":"Re: git-cvsimport bug with dates","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-11-17T10:12:22Z","receivedAt":"2007-11-17T10:12:22Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"fredag 16 november 2007 skrev Elijah Newren:\n> On Nov 15, 2007 11:06 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > When you use \"branch@{date}\" notation, you are not asking a\n> > question on the project history, but a question on the local\n> > view from _your_ repository on that project.\n> \n> Interesting; that makes sense from a merge or pull viewpoint, but\n> wouldn't it make more sense to have cvsimport ensure the commits are\n> treated as though they actually existed in master as of the date\n> specified in CVS?\n\nReflog do not work that way. They don't say when a commit entered a repo,\nonly when a ref changed. For a CVS import things could work as you suggest\nbut I think the confusion among newcomers would be massive if people start\nusing reflogs  'as if' it said anyting about when a commit entered. It can be used\nas a hint.\n\nReflogs get pruned by git-gc and are not cloned (cannot be since they store\nlocal-only information.\n\nUse the --since and --until switches instead.\n\n-- robin\n"},{"id":"60147","messageId":"51419b2c0711170739p1a2bf6c7g87f615676f72aedf@mail.gmail.com","threadId":"10895","inReplyTo":"200711171112.23150.robin.rosenberg.lists@dewire.com","subject":"Re: git-cvsimport bug with dates","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2007-11-17T15:39:08Z","receivedAt":"2007-11-17T15:39:08Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Nov 17, 2007 3:12 AM, Robin Rosenberg\n<robin.rosenberg.lists@dewire.com> wrote:\n> fredag 16 november 2007 skrev Elijah Newren:\n>\n> > On Nov 15, 2007 11:06 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > > When you use \"branch@{date}\" notation, you are not asking a\n> > > question on the project history, but a question on the local\n> > > view from _your_ repository on that project.\n> >\n> > Interesting; that makes sense from a merge or pull viewpoint, but\n> > wouldn't it make more sense to have cvsimport ensure the commits are\n> > treated as though they actually existed in master as of the date\n> > specified in CVS?\n>\n> Reflog do not work that way. They don't say when a commit entered a repo,\n> only when a ref changed. For a CVS import things could work as you suggest\n> but I think the confusion among newcomers would be massive if people start\n> using reflogs  'as if' it said anyting about when a commit entered. It can be used\n> as a hint.\n\nOkay...so I guess my suggestion could be translated as: don't worry\nabout when the commit entered; instead make git-cvsimport mark the\nrefs as changed as of the CVS date mentioned instead of as of the\nimport time.\n\nI guess there would be reluctance to do this whenever git-cvsimport\nwould be used for incremental commits on a repository that also had\nlocal commits?  Sounds like the issue is deeper than I first realized\nand this probably isn't worth the effort it'd take.\n\nThanks for the explanations.\n\nElijah\n"},{"id":"60176","messageId":"20071117213617.GG5198@efreet.light.src","threadId":"10895","inReplyTo":"51419b2c0711170739p1a2bf6c7g87f615676f72aedf@mail.gmail.com","subject":"Re: git-cvsimport bug with dates","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-11-17T21:36:17Z","receivedAt":"2007-11-17T21:36:17Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Sat, Nov 17, 2007 at 08:39:08 -0700, Elijah Newren wrote:\n> Okay...so I guess my suggestion could be translated as: don't worry\n> about when the commit entered; instead make git-cvsimport mark the\n> refs as changed as of the CVS date mentioned instead of as of the\n> import time.\n> \n> I guess there would be reluctance to do this whenever git-cvsimport\n> would be used for incremental commits on a repository that also had\n> local commits?  Sounds like the issue is deeper than I first realized\n> and this probably isn't worth the effort it'd take.\n\nActually local commits don't need to be involved at all. Incremental import\nis enough.\n\nOne good reason to use reflog is when you notice something does not work and\nrecall, that it worked yesterday evening. Than you need to know what you were\nlooking at at that time, not at what was latest, because you didn't\nnecessarily have to be up-to-date.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"}]}