* git-cvsimport bug with dates
@ 2007-11-16 4:59 Elijah Newren
2007-11-16 6:06 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Elijah Newren @ 2007-11-16 4:59 UTC (permalink / raw)
To: git
Hi,
It appears that there's some kind of bug with git-cvsimport and dates.
In a small repository I imported on Oct 24, I'm getting:
$ git log | grep ^Date | wc -l
957
$ git log | grep ^Date | tail
Date: Tue Oct 29 21:10:17 2002 +0000
Date: Tue Oct 29 17:41:05 2002 +0000
Date: Tue Oct 29 00:43:27 2002 +0000
Date: Mon Oct 28 23:36:40 2002 +0000
Date: Mon Oct 21 21:35:57 2002 +0000
Date: Fri Sep 20 22:18:01 2002 +0000
Date: Mon Sep 16 20:05:27 2002 +0000
Date: Wed Sep 11 21:14:03 2002 +0000
Date: Tue Sep 10 16:37:16 2002 +0000
Date: Fri Aug 23 16:03:22 2002 +0000
$ git diff @{2007-10-01}
warning: Log for '' only goes back to Wed, 24 Oct 2007 19:31:38 +0000.
fatal: bad object @{2007-10-01}
It appears that passing a date to git diff on any repository imported
by git-cvsimport will show this error, as long as the date is prior to
when the repository was imported.
Elijah
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-cvsimport bug with dates
2007-11-16 4:59 git-cvsimport bug with dates Elijah Newren
@ 2007-11-16 6:06 ` Junio C Hamano
2007-11-16 14:12 ` Elijah Newren
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2007-11-16 6:06 UTC (permalink / raw)
To: Elijah Newren; +Cc: git
"Elijah Newren" <newren@gmail.com> writes:
> $ git diff @{2007-10-01}
> warning: Log for '' only goes back to Wed, 24 Oct 2007 19:31:38 +0000.
> fatal: bad object @{2007-10-01}
>
>
> It appears that passing a date to git diff on any repository imported
> by git-cvsimport will show this error, as long as the date is prior to
> when the repository was imported.
That is not a cvsimport specific issue.
When you use "branch@{date}" notation, you are not asking a
question on the project history, but a question on the local
view from _your_ repository on that project.
$ git log --since=3.days.ago master
asks "go back from the master tip and show commits until you hit
the commit made earlier than that date and stop traversing".
On the other hand,
$ git show master@{3.days.ago}
asks "show the commit that was the tip of 'master' branch in my
repository three days ago." Maybe you pulled from your upstream
5 minutes ago, and the last time before that, you pulled three
weeks ago and did not do any development on the branch. In such
a case, the latter question will give you the tip of your
'master' as of three weeks ago which is the same as of three
days ago.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-cvsimport bug with dates
2007-11-16 6:06 ` Junio C Hamano
@ 2007-11-16 14:12 ` Elijah Newren
2007-11-17 10:12 ` Robin Rosenberg
0 siblings, 1 reply; 6+ messages in thread
From: Elijah Newren @ 2007-11-16 14:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Nov 15, 2007 11:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
> When you use "branch@{date}" notation, you are not asking a
> question on the project history, but a question on the local
> view from _your_ repository on that project.
Interesting; that makes sense from a merge or pull viewpoint, but
wouldn't it make more sense to have cvsimport ensure the commits are
treated as though they actually existed in master as of the date
specified in CVS?
Elijah
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-cvsimport bug with dates
2007-11-16 14:12 ` Elijah Newren
@ 2007-11-17 10:12 ` Robin Rosenberg
2007-11-17 15:39 ` Elijah Newren
0 siblings, 1 reply; 6+ messages in thread
From: Robin Rosenberg @ 2007-11-17 10:12 UTC (permalink / raw)
To: Elijah Newren; +Cc: Junio C Hamano, git
fredag 16 november 2007 skrev Elijah Newren:
> On Nov 15, 2007 11:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > When you use "branch@{date}" notation, you are not asking a
> > question on the project history, but a question on the local
> > view from _your_ repository on that project.
>
> Interesting; that makes sense from a merge or pull viewpoint, but
> wouldn't it make more sense to have cvsimport ensure the commits are
> treated as though they actually existed in master as of the date
> specified in CVS?
Reflog do not work that way. They don't say when a commit entered a repo,
only when a ref changed. For a CVS import things could work as you suggest
but I think the confusion among newcomers would be massive if people start
using reflogs 'as if' it said anyting about when a commit entered. It can be used
as a hint.
Reflogs get pruned by git-gc and are not cloned (cannot be since they store
local-only information.
Use the --since and --until switches instead.
-- robin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-cvsimport bug with dates
2007-11-17 10:12 ` Robin Rosenberg
@ 2007-11-17 15:39 ` Elijah Newren
2007-11-17 21:36 ` Jan Hudec
0 siblings, 1 reply; 6+ messages in thread
From: Elijah Newren @ 2007-11-17 15:39 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: Junio C Hamano, git
On Nov 17, 2007 3:12 AM, Robin Rosenberg
<robin.rosenberg.lists@dewire.com> wrote:
> fredag 16 november 2007 skrev Elijah Newren:
>
> > On Nov 15, 2007 11:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > > When you use "branch@{date}" notation, you are not asking a
> > > question on the project history, but a question on the local
> > > view from _your_ repository on that project.
> >
> > Interesting; that makes sense from a merge or pull viewpoint, but
> > wouldn't it make more sense to have cvsimport ensure the commits are
> > treated as though they actually existed in master as of the date
> > specified in CVS?
>
> Reflog do not work that way. They don't say when a commit entered a repo,
> only when a ref changed. For a CVS import things could work as you suggest
> but I think the confusion among newcomers would be massive if people start
> using reflogs 'as if' it said anyting about when a commit entered. It can be used
> as a hint.
Okay...so I guess my suggestion could be translated as: don't worry
about when the commit entered; instead make git-cvsimport mark the
refs as changed as of the CVS date mentioned instead of as of the
import time.
I guess there would be reluctance to do this whenever git-cvsimport
would be used for incremental commits on a repository that also had
local commits? Sounds like the issue is deeper than I first realized
and this probably isn't worth the effort it'd take.
Thanks for the explanations.
Elijah
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-cvsimport bug with dates
2007-11-17 15:39 ` Elijah Newren
@ 2007-11-17 21:36 ` Jan Hudec
0 siblings, 0 replies; 6+ messages in thread
From: Jan Hudec @ 2007-11-17 21:36 UTC (permalink / raw)
To: Elijah Newren; +Cc: Robin Rosenberg, Junio C Hamano, git
On Sat, Nov 17, 2007 at 08:39:08 -0700, Elijah Newren wrote:
> Okay...so I guess my suggestion could be translated as: don't worry
> about when the commit entered; instead make git-cvsimport mark the
> refs as changed as of the CVS date mentioned instead of as of the
> import time.
>
> I guess there would be reluctance to do this whenever git-cvsimport
> would be used for incremental commits on a repository that also had
> local commits? Sounds like the issue is deeper than I first realized
> and this probably isn't worth the effort it'd take.
Actually local commits don't need to be involved at all. Incremental import
is enough.
One good reason to use reflog is when you notice something does not work and
recall, that it worked yesterday evening. Than you need to know what you were
looking at at that time, not at what was latest, because you didn't
necessarily have to be up-to-date.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-17 21:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-16 4:59 git-cvsimport bug with dates Elijah Newren
2007-11-16 6:06 ` Junio C Hamano
2007-11-16 14:12 ` Elijah Newren
2007-11-17 10:12 ` Robin Rosenberg
2007-11-17 15:39 ` Elijah Newren
2007-11-17 21:36 ` Jan Hudec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).