Re: reflogs generated by git-cvsimport

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: reflogs generated by git-cvsimport

From: Kalle Olavi Niemitalo <hidden>
Date: 2016-06-15 22:47:08

Jeff King [off-list ref] writes:
Yeah, it probably should not munge the reflog with the CVS committer
information. I suspect it would be as easy as the following (totally
untested, not even syntax checked) patch:
That patch does not work because the $commit_read and
$commit_write file handles fall out of scope too early.
Those and $pid could be returned from the do {...} as
a list, but I think it's easier to remove the "do", declare
the variables above the block, and assign them in the block.

Also, there's $ENV{'TZ'}="UTC" at the beginning of the script
and it affects the reflogs too.  This is the annoying part.
The script runs numerous subprocesses and it is not clear to
me which of those need TZ=UTC and which ones should use the
original TZ:

- git config: doesn't matter?
- cvs: UTC?
- rsh: UTC?
- git rev-parse --verify: depends on whether $name looks in reflog
- git-init: doesn't matter?
- git-read-tree: doesn't matter
- git-symbolic-ref: original if this can write to reflog
- git-rev-parse --verify HEAD: doesn't matter
- git-for-each-ref: doesn't matter
- cvsps: UTC?
- git-update-index: doesn't matter
- git-write-tree: doesn't matter
- git-commit-tree: doesn't matter because GIT_COMMITTER_DATE and
  GIT_COMMITTER_DATE already specify "+0000".  (Might be nice to
  have author-specific time zones there though.)
- git-update-ref: original.  (Also, -m cvsimport could be added.)
- git-tag: doesn't matter because cvsimport never uses git tag -a.
- git update-ref: original
- git-hash-object: doesn't matter
- git repack: doesn't matter?
- git-count-objects: doesn't matter
- git-merge: original
- git checkout: doesn't matter?

Re: reflogs generated by git-cvsimport

From: Jeff King <hidden>
Date: 2016-06-15 22:47:08

On Fri, Jul 31, 2009 at 11:15:14PM +0300, Kalle Olavi Niemitalo wrote:
That patch does not work because the $commit_read and
$commit_write file handles fall out of scope too early.
Those and $pid could be returned from the do {...} as
a list, but I think it's easier to remove the "do", declare
the variables above the block, and assign them in the block.
Oops, indeed, I clearly did not look closely. But I see you understood
what I was trying to say, and I think you are right that it is probably
cleaner to just "my" them right before the block.
Also, there's $ENV{'TZ'}="UTC" at the beginning of the script
and it affects the reflogs too.  This is the annoying part.
Since that is covering the whole script, it is obviously a harder issue
and should probably be a separate patch from the GIT_COMMITTER_*
information.
The script runs numerous subprocesses and it is not clear to
me which of those need TZ=UTC and which ones should use the
original TZ:
Sadly, there is nothing useful in the commit history as the TZ setting
goes all the way back to the script being added. I would guess it is
there to convince cvs to give us a consistent time, since its log output
usually comes out in the local timezone (though since cvsimport is based
on cvsps, I would assume cvsps handles this sanely).

I suspect if you set it for cvs and cvsps, that would be sufficient. The
rest of git should use the original.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help