]> git.ipfire.org Git - thirdparty/git.git/blame - t/t2105-update-index-gitfile.sh
Merge branch 'wb/fsmonitor-bitmap-fix'
[thirdparty/git.git] / t / t2105-update-index-gitfile.sh
CommitLineData
48cc95ed
BK
1#!/bin/sh
2#
3# Copyright (c) 2010 Brad King
4#
5
6test_description='git update-index for gitlink to .git file.
7'
8
9. ./test-lib.sh
10
11test_expect_success 'submodule with absolute .git file' '
12 mkdir sub1 &&
13 (cd sub1 &&
14 git init &&
15 REAL="$(pwd)/.real" &&
76bbcd43 16 mv .git "$REAL" &&
48cc95ed
BK
17 echo "gitdir: $REAL" >.git &&
18 test_commit first)
19'
20
21test_expect_success 'add gitlink to absolute .git file' '
22 git update-index --add -- sub1
23'
24
25test_expect_success 'submodule with relative .git file' '
26 mkdir sub2 &&
27 (cd sub2 &&
28 git init &&
29 mv .git .real &&
30 echo "gitdir: .real" >.git &&
31 test_commit first)
32'
33
40c813e0 34test_expect_success 'add gitlink to relative .git file' '
48cc95ed
BK
35 git update-index --add -- sub2
36'
37
38test_done