You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: EasyKey.git/ezk-git-diff.sh
+7-12Lines changed: 7 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -68,19 +68,14 @@ function showCommits () {
68
68
}
69
69
70
70
functiondiffDate () {
71
-
echo"Enter date since in [yyyy-mm-dd]:"
71
+
echo"Enter date since in [yyyy-mm-dd hh:mm:ss]:"
72
72
read sincedate
73
-
lastcommitdate=$(git log --pretty=format:'%h %ad' --graph --date=format:"%Y-%m-%d" --since "$sincedate 00:00:00"| cut -f3 -d''| tail -1)# the last commit date since the date given
74
-
echo"first commit date equal or after since date: $lastcommitdate"
75
-
commitpriortolast=$(git log --pretty=format:'%h %ad' --graph --date=format:"%Y-%m-%d"| grep "$lastcommitdate" -A 1 | tail -1 | cut -f2 -d'')# commit before the last commit in period
76
-
echo"next commit date prior since date: $commitpriortolast"
77
-
commitdatepriortolast=$(git log --pretty=format:'%h %ad' --graph --date=format:"%Y-%m-%d"| grep "$lastcommitdate" -A 1 | tail -1 | cut -f3 -d'')# commit date before the last commit in period
78
-
echo"next commit date prior since date: $commitpriortolast ... on: $commitdatepriortolast"
79
-
newestcommit=$(git log --pretty=format:'%h %ad' --graph --date=format:"%Y-%m-%d"| head -1 | cut -f2 -d'')# the newest commit in the branch (actual head state)
80
-
echo"latest commit in this branch hstory: $newestcommit"
81
-
newestcommitdate=$(git log --pretty=format:'%h %ad' --graph --date=format:"%Y-%m-%d"| head -1 | cut -f3 -d'')# the newest commit date
82
-
coloredLog "changes since $sincedate 12 a.m. / midnight: comparing commit $commitpriortolast made on $commitdatepriortolast against $newestcommit (latest commit) made on $newestcommitdate"
0 commit comments