Commit 2caf589
refs: allow multiple reflog entries for the same refname
The reference transaction only allows a update for a given reference to
avoid conflicts. This, however, isn't an issue for reflogs. There are no
conflicts to be resolved in reflogs and when migrating reflogs between
backends we'd have multiple reflog entries for the same refname.
So allow multiple reflog updates within a single transaction. Also the
reflog creation logic isn't exposed to the end user. While this might
change in the future, currently, this reduces the scope of issues to
think about.
This is required to add reflog migration support to `git refs migrate`
which currently doesn't support it.
Signed-off-by: Karthik Nayak <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent b17521f commit 2caf589
2 files changed
+24
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2612 | 2612 | | |
2613 | 2613 | | |
2614 | 2614 | | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2615 | 2618 | | |
2616 | 2619 | | |
2617 | 2620 | | |
| |||
2830 | 2833 | | |
2831 | 2834 | | |
2832 | 2835 | | |
2833 | | - | |
2834 | | - | |
| 2836 | + | |
2835 | 2837 | | |
2836 | 2838 | | |
2837 | 2839 | | |
2838 | 2840 | | |
2839 | 2841 | | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
2840 | 2846 | | |
2841 | 2847 | | |
2842 | 2848 | | |
| |||
3036 | 3042 | | |
3037 | 3043 | | |
3038 | 3044 | | |
3039 | | - | |
3040 | | - | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
3041 | 3048 | | |
3042 | 3049 | | |
3043 | 3050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
994 | | - | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
995 | 996 | | |
996 | 997 | | |
997 | 998 | | |
| |||
1302 | 1303 | | |
1303 | 1304 | | |
1304 | 1305 | | |
| 1306 | + | |
1305 | 1307 | | |
1306 | 1308 | | |
1307 | 1309 | | |
| |||
1310 | 1312 | | |
1311 | 1313 | | |
1312 | 1314 | | |
| 1315 | + | |
| 1316 | + | |
1313 | 1317 | | |
1314 | 1318 | | |
1315 | 1319 | | |
| |||
1391 | 1395 | | |
1392 | 1396 | | |
1393 | 1397 | | |
| 1398 | + | |
1394 | 1399 | | |
1395 | 1400 | | |
1396 | 1401 | | |
| |||
1405 | 1410 | | |
1406 | 1411 | | |
1407 | 1412 | | |
1408 | | - | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1409 | 1418 | | |
1410 | 1419 | | |
1411 | 1420 | | |
| |||
1476 | 1485 | | |
1477 | 1486 | | |
1478 | 1487 | | |
| 1488 | + | |
1479 | 1489 | | |
1480 | 1490 | | |
1481 | 1491 | | |
| |||
0 commit comments