File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 22#
33# Prints filename changes.
44#
5- # <weekday> <month> <day> <time> <year> <first_name> <last_name>
6- # R<%> <original_filename> <new_filename>
5+ # <weekday> <month> <day> <time> <year> <first_name> <last_name> <original_filename> <new_filename> <%>
76
87# * `git log --reverse`
98# - Show commit logs in reverse order.
1716# - Format the log.
1817# * `--date=format:""`
1918# - Format the date.
19+ # * `awk '{}'
20+ # - Process each commit.
2021git log \
2122 --reverse \
2223 --find-renames \
2324 --name-status \
2425 --diff-filter R \
2526 --format=format:" %ad %aN" \
26- --date=format:" %a %b %d %T %Y"
27+ --date=format:" %a %b %d %T %Y" \
28+ | awk '
29+ # Skip empty lines:
30+ NF == 0 {
31+ next
32+ }
33+
34+ # Date lines:
35+ ! /^R/ {
36+ date = $0
37+ next
38+ }
39+
40+ # Filename changes:
41+ {
42+ print date OFS $2 OFS $3 OFS substr($1, 2)
43+ }
44+ '
You can’t perform that action at this time.
0 commit comments