Description of problem: All date are from Mon Sep 17 00:00:00 2001 Version-Release number of selected component (if applicable): git-2.25.1-2.fc31.x86_64 How reproducible: Always Steps to Reproduce: 1. clone any repo 2. generate any patch using "git format-patch ..." 3. check first line Actual results: From 635dd9a3065ed88e1741e6b963044b80e913f96a Mon Sep 17 00:00:00 2001 Expected results: From 635dd9a3065ed88e1741e6b963044b80e913f96a Tue Mar 24 01:02:03 2020 Additional info: git log is correct.
It looks like "git format-patch" is not reloading "default_date_mode", which results into outputing date and time of repository creation. "git format-patch" is not depending on "git log", that's why "git log" outputs correct date and time. I will investigate further tomorrow and try to verify my theory.
This is intentional and not a bug. The ^From line is there to make it parse as a valid mbox file. The date is fixed so it can be used as "magic" for tools like file to identify git format-patch output. Reference: https://git-scm.com/docs/git-format-patch#_discussion
(In reply to Todd Zullinger from comment #2) > This is intentional and not a bug. The ^From line is there to make it parse > as a valid mbox file. The date is fixed so it can be used as "magic" for > tools like file to identify git format-patch output. > > Reference: https://git-scm.com/docs/git-format-patch#_discussion Oh, ok. I completely missed this information in documentation. Thank you for your clarification!
Still a bit confusing ;) Thanks for explanation.
(In reply to Remi Collet from comment #4) > Still a bit confusing ;) No arguments there. ;) It's not something you'd suspect was there as file format magic. I only know about it because it made me curious when I first saw it.