File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Copyright (c) 2012-2016 Apple Inc.
4
+ #
5
+ # Tests for regressions found by Apple Inc. for issues that upstream does not
6
+ # want to fix or accept tests for.
7
+
8
+
9
+ test_description=' Apple Inc. specific tests'
10
+
11
+ . ./test-lib.sh
12
+
13
+ TESTROOT=$( pwd)
14
+
15
+ # <rdar://problem/10238070>
16
+ #
17
+ # This test case addresses a regression introduced between v1.7.3 and v1.7.5
18
+ # git bisect good v1.7.3
19
+ # git bisect bad v1.7.5
20
+ # ...
21
+ # found 18e051a3981f38db08521bb61ccf7e4571335353
22
+
23
+ test_expect_success ' <rdar://problem/10238070> -- git add of a path that contains a .git directory' '
24
+ rm -rf .git &&
25
+ mkdir -p orig/sub/dir/otherdir &&
26
+ cd orig/sub &&
27
+ echo "1" > dir/file &&
28
+ echo "2" > dir/otherdir/file &&
29
+ git init --quiet &&
30
+ git add -A &&
31
+ git commit -m "Initial Commit" --quiet &&
32
+ cd - > /dev/null &&
33
+ git init --bare --quiet "${TESTROOT}/git_dir.git" &&
34
+ git --git-dir="${TESTROOT}/git_dir.git" --work-tree=/ add -f -- "${TESTROOT}/orig/sub/" &&
35
+ git --git-dir="${TESTROOT}/git_dir.git" --work-tree=/ add -f -- "${TESTROOT}/orig/" &&
36
+ git --git-dir="${TESTROOT}/git_dir.git" --work-tree=/ commit -m "Commit." |
37
+ grep -q "2 files changed, 2 insertions"
38
+ '
39
+
40
+ test_done
You can’t perform that action at this time.
0 commit comments