[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60654] mdate.pl should use git modification times if possible
From: |
G. Branden Robinson |
Subject: |
[bug #60654] mdate.pl should use git modification times if possible |
Date: |
Sat, 22 May 2021 05:40:45 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #1, bug #60654 (project groff):
Here's what I'm using for the time being, pretty much cribbed from
StackOverflow.
`fail()` is a function from my private shell library, but you can guess what
it does.
$ type gitmtime
gitmtime is a function
gitmtime ()
{
if [ $# -lt 1 ]; then
fail "${FUNCNAME[0]}: need 1 or more arguments, got $#";
else
for F in "$@";
do
touch -d @0$(git log --pretty=%at -n1 -- "$F") "$F";
done;
fi
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60654>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/