Commit 765c225
fix git branch -m in presence of cross devices
When you have for example a bare repository stored on NFS, and that you
create new workdirs locally (using contrib's git-new-workdir), logs/refs
is a symlink to a different device. Hence when the reflogs are renamed,
all must happen below logs/refs or one gets cross device rename errors
like:
git branch -m foo
error: unable to move logfile logs/refs/heads/master to tmp-renamed-log: Invalid cross-device link
fatal: Branch rename failed
The fix is hence to use logs/refs/.tmp-renamed-log as a temporary log
name, instead of just tmp-renamed-log.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 420432d commit 765c225
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1086 | 1086 | | |
1087 | 1087 | | |
1088 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1089 | 1098 | | |
1090 | 1099 | | |
1091 | 1100 | | |
| |||
1119 | 1128 | | |
1120 | 1129 | | |
1121 | 1130 | | |
1122 | | - | |
1123 | | - | |
| 1131 | + | |
| 1132 | + | |
1124 | 1133 | | |
1125 | 1134 | | |
1126 | 1135 | | |
| |||
1146 | 1155 | | |
1147 | 1156 | | |
1148 | 1157 | | |
1149 | | - | |
| 1158 | + | |
1150 | 1159 | | |
1151 | 1160 | | |
1152 | 1161 | | |
| |||
1159 | 1168 | | |
1160 | 1169 | | |
1161 | 1170 | | |
1162 | | - | |
| 1171 | + | |
1163 | 1172 | | |
1164 | 1173 | | |
1165 | 1174 | | |
| |||
1199 | 1208 | | |
1200 | 1209 | | |
1201 | 1210 | | |
1202 | | - | |
1203 | | - | |
| 1211 | + | |
| 1212 | + | |
1204 | 1213 | | |
1205 | 1214 | | |
1206 | 1215 | | |
| |||
0 commit comments