eb11dd7821cfab0162751d2684aa7098f851e322
   1#!/bin/sh
   2
   3test_description='update-index refuses to add beyond symlinks'
   4
   5. ./test-lib.sh
   6
   7test_expect_success setup '
   8        >a &&
   9        mkdir b &&
  10        ln -s b c &&
  11        >c/d &&
  12        git update-index --add a b/d
  13'
  14
  15test_expect_success 'update-index --add beyond symlinks' '
  16        test_must_fail git update-index --add c/d &&
  17        ! ( git ls-files | grep c/d )
  18'
  19
  20test_done