Question

I track all my projects in git. Unfortunately, in my main repository the author date seems to be stuck. It reports as July 15, 12:25:08 -0500 for almost every commit since then. The commit date seems to be working correctly. There is evidence this might be happening in another repository, but it doesn't change enough for me to know for sure.

I've checked the .git/config file, as well as my global .gitconfig file. I can't think of anything special that happened on that day.

I'd like to figure out what's causing this so I can fix it. For bonus points, I'd like to fix all the bad author dates. Since I'm the sole developer (at this point in time) I think it's pretty safe to update all the clones (local repo, local server, GitHub).

Edit: So far, it looks like magit in Emacs might be doing it. However, I still don't know how or why.

Était-ce utile?

La solution 2

It appears there was something corrupt in the emacs process somewhere. It is quite possible that emacs had actually been running since before the date in question and had somehow become slightly corrupted.

Restarting emacs fixed the problem. I will, however, keep an eye on things, at least for awhile.

Thank you to those who helped me track down the problem. I hadn't realized how much I rely on magit.

Autres conseils

There is an environment variable called GIT_COMMITTER_DATE which can be used to override the current date for new commits. Try:

env | grep GIT

and see if that is set.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top