When running git log
, you can specify eg --stat=180
to override the width of the stats graph. git pull
has a --stat
option but it doesn't take a width.
Context: I'm calling git pull
over ssh in a cron job. It falls back to a default width of 80, which isn't what I want. There's no tty, so I can't set the width with stty
.
Option --stat
takes no value in git pull
but you can use a different command like git diff
. You need to write down the current head commit, run git pull
and then git diff --stat
:
prev_commit=`git rev-parse HEAD`
git pull
git diff --stat=180 $prev_commit
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.