]> git.lizzy.rs Git - plan9front.git/commitdiff
git/export: use 'date -f' instead of 'date -m'
authorOri Bernstein <ori@eigenstate.org>
Thu, 12 Aug 2021 14:42:47 +0000 (14:42 +0000)
committerOri Bernstein <ori@eigenstate.org>
Thu, 12 Aug 2021 14:42:47 +0000 (14:42 +0000)
The '-m' flag was added to date largely
to support git scripts. It predates the
tmdate code, which is why it exists, but
it's a recent enough addition that nothing
I'm aware of uses it, other than git.

As a result, it would be good to remove
it, so let's do that.

sys/src/cmd/git/export

index 1c062b96fc9172e86d762560494e55656f67f4cc..2d7c068d35db035f397fb183dc3701463cb2bc6e 100755 (executable)
@@ -42,7 +42,7 @@ for(c in $commits){
                        bind $cp/tree b
                
                echo From: `{cat $cp/author}
-               echo Date: `{date -um `{mtime $cp/author | awk '{print $1}'}}
+               echo Date: `{date -uf'WW, DD MMM YYYY hh:mm:ss Z' `{walk -em $cp/author}}
                <$cp/msg awk '
                NR == 1 {
                        n = ENVIRON["n"]