I would like to use git log to show a set of differences between commits that I filtered myself. Git log has an internal history filtering ability, which (when used with the --patch flag) shows the difference between commits that can be far apart from each other in the story. But when I try to combine this with the fact that -stdin, in order to pass a list of commits, I get a full history of these commits (actually a complete history of the branch they are in). Adding -1 does not bring me closer to the desired behavior, it limits me to only one sum of commit.
I am looking for a cleaner version of this (daily difference of all commits that have occurred over the past few weeks):
git log --date=short --format='%H %ad' --since 2012-05-15 \
|uniq -f1 |while read hash date
do
if [[ -n $hash0 ]]; then
echo ${date}..${date0}
git diff $hash $hash0
fi
hash0=$hash
date0=$date
done |less
Tobu source
share