File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 8181 diffstat=--no-stat ;;
8282 --stat|--summary)
8383 diffstat=--stat ;;
84- --log|--no-log)
85- log_arg=$1 ;;
84+ --log|--log= * |-- no-log)
85+ log_arg=" $1 " ;;
8686 --no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
8787 no_commit=--no-commit ;;
8888 --c|--co|--com|--comm|--commi|--commit)
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ test_expect_success setup '
1717 git commit -m "add bfile"
1818 ) &&
1919 test_tick && test_tick &&
20+ echo "second" >afile &&
21+ git add afile &&
22+ git commit -m "second commit" &&
2023 echo "original $dollar" >afile &&
2124 git add afile &&
2225 git commit -m "do not clobber $dollar signs"
@@ -32,4 +35,18 @@ test_expect_success pull '
3235)
3336'
3437
38+ test_expect_success ' --log=1 limits shortlog length' '
39+ (
40+ cd cloned &&
41+ git reset --hard HEAD^ &&
42+ test "$(cat afile)" = original &&
43+ test "$(cat bfile)" = added &&
44+ git pull --log=1 &&
45+ git log -3 &&
46+ git cat-file commit HEAD >result &&
47+ grep Dollar result &&
48+ ! grep "second commit" result
49+ )
50+ '
51+
3552test_done
You can’t perform that action at this time.
0 commit comments