3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='git apply should not get confused with rename/copy.
14 mkdir
-p klibc
/arch
/x86_64
/include
/klibc
16 cat >klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
<<\EOF
18 * arch
/x86_64
/include
/klibc
/archsetjmp.h
21 #ifndef _KLIBC_ARCHSETJMP_H
22 #define _KLIBC_ARCHSETJMP_H
35 typedef struct __jmp_buf jmp_buf
[1];
37 #endif /* _SETJMP_H */
39 cat >klibc
/README
<<\EOF
40 This is a simple readme
file.
44 diff --git a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h b
/include
/arch
/cris
/klibc
/archsetjmp.h
46 copy from klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
47 copy to include
/arch
/cris
/klibc
/archsetjmp.h
48 --- a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
49 +++ b
/include
/arch
/cris
/klibc
/archsetjmp.h
52 - * arch
/x86_64
/include
/klibc
/archsetjmp.h
53 + * arch
/cris
/include
/klibc
/archsetjmp.h
56 #ifndef _KLIBC_ARCHSETJMP_H
57 #define _KLIBC_ARCHSETJMP_H
60 - unsigned long __rbx
;
61 - unsigned long __rsp
;
62 - unsigned long __rbp
;
63 - unsigned long __r12
;
64 - unsigned long __r13
;
65 - unsigned long __r14
;
66 - unsigned long __r15
;
67 - unsigned long __rip
;
78 + unsigned long __srp
;
81 typedef struct __jmp_buf jmp_buf
[1];
83 -#endif /* _SETJMP_H */
84 +#endif /* _KLIBC_ARCHSETJMP_H */
85 diff --git a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h b
/include
/arch
/m32r
/klibc
/archsetjmp.h
87 rename from klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
88 rename to include
/arch
/m32r
/klibc
/archsetjmp.h
89 --- a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
90 +++ b
/include
/arch
/m32r
/klibc
/archsetjmp.h
93 - * arch
/x86_64
/include
/klibc
/archsetjmp.h
94 + * arch
/m32r
/include
/klibc
/archsetjmp.h
97 #ifndef _KLIBC_ARCHSETJMP_H
98 #define _KLIBC_ARCHSETJMP_H
101 - unsigned long __rbx
;
102 - unsigned long __rsp
;
103 - unsigned long __rbp
;
104 + unsigned long __r8
;
105 + unsigned long __r9
;
106 + unsigned long __r10
;
107 + unsigned long __r11
;
112 - unsigned long __rip
;
115 typedef struct __jmp_buf jmp_buf
[1];
117 -#endif /* _SETJMP_H */
118 +#endif /* _KLIBC_ARCHSETJMP_H */
119 diff --git a
/klibc
/README b
/klibc
/README
123 This is a simple readme
file.
127 diff --git a
/klibc
/README b
/klibc
/arch
/README
128 copy from klibc
/README
129 copy to klibc
/arch
/README
131 +++ b
/klibc
/arch
/README
133 This is a simple readme
file.
134 +And we copy it to one level down
, and
135 +add a few lines
at the end of it.
138 find klibc
-type f
-print |
xargs git update-index
--add --
140 test_expect_success
'check rename/copy patch' 'git apply --check patch'
142 test_expect_success
'apply rename/copy patch' 'git apply --index patch'