t / t5524-pull-msg.shon commit Merge branch 'rs/use-modern-git-merge-syntax' of git-gui into rs/git-gui-use-modern-git-merge-syntax (ff65e79)
   1#!/bin/sh
   2
   3test_description='git pull message generation'
   4
   5. ./test-lib.sh
   6
   7dollar='$Dollar'
   8
   9test_expect_success setup '
  10        test_commit initial afile original &&
  11        git clone . cloned &&
  12        (
  13                cd cloned &&
  14                echo added >bfile &&
  15                git add bfile &&
  16                test_tick &&
  17                git commit -m "add bfile"
  18        ) &&
  19        test_tick && test_tick &&
  20        echo "second" >afile &&
  21        git add afile &&
  22        git commit -m "second commit" &&
  23        echo "original $dollar" >afile &&
  24        git add afile &&
  25        git commit -m "do not clobber $dollar signs"
  26'
  27
  28test_expect_success pull '
  29(
  30        cd cloned &&
  31        git pull --log &&
  32        git log -2 &&
  33        git cat-file commit HEAD >result &&
  34        grep Dollar result
  35)
  36'
  37
  38test_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
  52test_done