3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='git-apply should not get confused with rename/copy.
14 mkdir
-p include
/arch
/x86_64
/klibc klibc
/arch
/x86_64
/include
/klibc
16 cat >include
/arch
/x86_64
/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 */
40 cat >klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
<<\EOF
42 * arch
/x86_64
/include
/klibc
/archsetjmp.h
45 #ifndef _KLIBC_ARCHSETJMP_H
46 #define _KLIBC_ARCHSETJMP_H
59 typedef struct __jmp_buf jmp_buf
[1];
61 #endif /* _SETJMP_H */
65 diff --git a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h b
/include
/arch
/cris
/klibc
/archsetjmp.h
67 copy from klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
68 copy to include
/arch
/cris
/klibc
/archsetjmp.h
69 --- a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
70 +++ b
/include
/arch
/cris
/klibc
/archsetjmp.h
73 - * arch
/x86_64
/include
/klibc
/archsetjmp.h
74 + * arch
/cris
/include
/klibc
/archsetjmp.h
77 #ifndef _KLIBC_ARCHSETJMP_H
78 #define _KLIBC_ARCHSETJMP_H
81 - unsigned long __rbx
;
82 - unsigned long __rsp
;
83 - unsigned long __rbp
;
84 - unsigned long __r12
;
85 - unsigned long __r13
;
86 - unsigned long __r14
;
87 - unsigned long __r15
;
88 - unsigned long __rip
;
99 + unsigned long __srp
;
102 typedef struct __jmp_buf jmp_buf
[1];
104 -#endif /* _SETJMP_H */
105 +#endif /* _KLIBC_ARCHSETJMP_H */
106 diff --git a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h b
/include
/arch
/m32r
/klibc
/archsetjmp.h
108 rename from klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
109 rename to include
/arch
/m32r
/klibc
/archsetjmp.h
110 --- a
/klibc
/arch
/x86_64
/include
/klibc
/archsetjmp.h
111 +++ b
/include
/arch
/m32r
/klibc
/archsetjmp.h
114 - * arch
/x86_64
/include
/klibc
/archsetjmp.h
115 + * arch
/m32r
/include
/klibc
/archsetjmp.h
118 #ifndef _KLIBC_ARCHSETJMP_H
119 #define _KLIBC_ARCHSETJMP_H
122 - unsigned long __rbx
;
123 - unsigned long __rsp
;
124 - unsigned long __rbp
;
125 + unsigned long __r8
;
126 + unsigned long __r9
;
127 + unsigned long __r10
;
128 + unsigned long __r11
;
133 - unsigned long __rip
;
136 typedef struct __jmp_buf jmp_buf
[1];
138 -#endif /* _SETJMP_H */
139 +#endif /* _KLIBC_ARCHSETJMP_H */
142 find include klibc
-type f
-print |
xargs git-update-index
--add --
144 test_expect_success
'check rename/copy patch' 'git-apply --check patch'
146 test_expect_success
'apply rename/copy patch' 'git-apply --index patch'