I am trying this command in my bash shell script:
git log --oneline --no-decorate --pretty=format:"%s" $oldrev..$newrev
git log --oneline --no-decorate --pretty=format:"%s" $oldrev..$newrev | while read -r line; do
echo "$line"
done
the first git log can print output, but the second one followed by while won't print anything. why ?
I invoke my script like this:( second and third argument passed to $oldrev and $newrev)
./check master a735c2f eb23992
if I add --no-pager option, both will print nothing.
I am using bash 4.4.23(1)-release on fedora 28.