mirror of
https://github.com/git-quick-stats/git-quick-stats.git
synced 2025-12-16 12:00:12 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e18cf35d4 | ||
|
|
24ae67ae57 | ||
|
|
ed0e3cbb6b | ||
|
|
46a771138e | ||
|
|
9f54b87ed5 | ||
|
|
246076f5f6 |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -2,3 +2,4 @@
|
||||
|
||||
github: [arzzen]
|
||||
open_collective: git-quick-stats
|
||||
custom: ['https://lukasmestan.com/thanks/']
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Lukáš Mešťan
|
||||
Copyright (c) 2020 Lukáš Mešťan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -23,9 +23,10 @@ _pathspec=${_GIT_PATHSPEC:-}
|
||||
# Exclusive shows only merge commits
|
||||
# Enable shows regular commits together with normal commits
|
||||
_merges=${_GIT_MERGE_VIEW:-}
|
||||
if [[ "${_merges,,}" == "exclusive" ]]; then
|
||||
_merges=$(echo "$_merges" | awk '{print tolower($0)}')
|
||||
if [[ "${_merges}" == "exclusive" ]]; then
|
||||
_merges="--merges"
|
||||
elif [[ "${_merges,,}" == "enable" ]]; then
|
||||
elif [[ "${_merges}" == "enable" ]]; then
|
||||
_merges=""
|
||||
else
|
||||
_merges="--no-merges"
|
||||
@@ -376,21 +377,21 @@ function commitsByMonth() {
|
||||
function commitsByWeekday() {
|
||||
optionPicked "Git commits by weekday:"
|
||||
echo -e "\tday\tsum"
|
||||
local counter=1
|
||||
for i in Mon Tue Wed Thu Fri Sat Sun
|
||||
do
|
||||
echo -en "\t$i\t"
|
||||
echo -en "\t$counter\t$i\t"
|
||||
git -c log.showSignature=false shortlog -n $_merges --format='%ad %s' \
|
||||
$_since $_until | grep "$i " | wc -l
|
||||
counter=$((counter+1))
|
||||
done | awk '{
|
||||
|
||||
}
|
||||
NR == FNR {
|
||||
count[$1] = $2;
|
||||
total += $2;
|
||||
count[$1" "$2] = $3;
|
||||
total += $3;
|
||||
next
|
||||
}
|
||||
END{
|
||||
|
||||
for (day in count) {
|
||||
s="|";
|
||||
if (total > 0) {
|
||||
@@ -398,10 +399,10 @@ function commitsByWeekday() {
|
||||
for (i = 1; i <= percent; ++i) {
|
||||
s=s"█"
|
||||
}
|
||||
printf( "\t%s\t%-0s\t%s\n", day, count[day], s );
|
||||
printf("\t%s\t%s\t%-0s\t%s\n", substr(day,0,1), substr(day,3,5), count[day], s);
|
||||
}
|
||||
}
|
||||
}' | sort -k 2 -n -r
|
||||
}' | sort -k 1 -n | awk '{$1=""}1' | awk '{$1=$1}1' | awk '{printf("\t%s\t%s\t%s\n", $1, $2, $3)}'
|
||||
}
|
||||
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user