Skip to content

Commit a3cb677

Browse files
committed
Use full git commit hash length instead of the abbreviated one
1 parent 178e50b commit a3cb677

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/createGitLogCsv.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ echo "hash,parent,author,email,timestamp,timestamp_unix,message,filename" > "${C
3131

3232
# Prints the git log in CSV format including the changed files.
3333
# Includes quoted strings, double quote escaping and supports commas in strings.
34-
git log --no-merges --pretty=format:' %h,,,%p,,,%an,,,%ae,,,%aI,,,%ct,,,%s' --name-only | \
34+
git log --no-merges --pretty=format:' %H,,,%P,,,%an,,,%ae,,,%aI,,,%ct,,,%s' --name-only | \
3535
awk 'BEGIN { COMMA=",";QUOTE="\"" } /^ / { split($0, a, ",,,"); gsub(/^ /, "", a[1]); gsub(/"/, "\"\"", a[3]); gsub(/"/, "\"\"", a[4]); gsub(/"/, "\"\"", a[7]); gsub(/\\/, " ", a[7]); commit=a[1] COMMA a[2] COMMA QUOTE a[3] QUOTE COMMA QUOTE a[4] QUOTE COMMA a[5] COMMA a[6] COMMA QUOTE a[7] QUOTE } NF && !/^\ / { print commit ",\""$0"\"" }' | \
3636
grep -v -F '[bot]' >> "${CSV_OUTPUT_FILE_PATH}"
3737
# Explanation:
3838
#
3939
# - --no-merges: Excludes merge commits from the log.
40-
# - %h: Abbreviated commit hash
41-
# - %p: Abbreviated parent commit hash
40+
# - %H: Commit hash
41+
# - %P: Commit hash parent(s)
4242
# - %an: Author name
4343
# - %ae: Author email
4444
# - %aI: Author date, ISO 8601 format

0 commit comments

Comments
 (0)