Created
July 15, 2015 09:31
-
-
Save mishadoff/3d4ee16b1501b125ece9 to your computer and use it in GitHub Desktop.
Find the time difference between two commits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Find the time difference between two commits | |
# Usage: ./git_time_diff.sh 863a810d 7407b97c | |
commit1=$1 | |
commit2=$2 | |
ts1=$(git show -s --format=%ct $commit1) | |
ts2=$(git show -s --format=%ct $commit2) | |
tdiff=$((ts2 - ts1)) | |
echo $tdiff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment