Changeset 9b90ecc for expand_date


Ignore:
Timestamp:
04/14/2021 06:20:45 PM (6 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/git-date
Children:
0c8823c2
Parents:
783a93e
Message:

fix date format for $Date$

File:
1 edited

Legend:

Unmodified
Added
Removed
  • expand_date

    r783a93e r9b90ecc  
    66
    77content = stdin.read()
    8 cmd = [ 'git', 'log', '-1', '--pretty=%ad', 'HEAD', '--', argv[1] ]
     8cmd = [ 'git', 'log', '-1', '--pretty=%ai', 'HEAD', '--', argv[1] ]
    99date = check_output(cmd, cwd = getcwd()).decode().rstrip()
    1010stdout.write(content.replace('$Date$', '$Date: %s$' % date))
Note: See TracChangeset for help on using the changeset viewer.