Commit a6a8431
receive-pack.c: shorten the execute_commands loop over all commands
Make the main "execute_commands" loop in receive-pack easier to read
by splitting out some steps into helper functions. The new helper
'should_process_cmd' checks if a ref update is unnecessary, whether
due to an error having occurred or for another reason. The helper
'warn_if_skipped_connectivity_check' warns if we have forgotten to
run a connectivity check on a ref which is shallow for the client
which would be a bug.
This will help us to duplicate less code in a later patch when we make
a second copy of the "execute_commands" loop.
No functional change intended.
Signed-off-by: Stefan Beller <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent c653e03 commit a6a8431
1 file changed
+27
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1045 | 1069 | | |
1046 | 1070 | | |
1047 | 1071 | | |
1048 | 1072 | | |
1049 | | - | |
1050 | 1073 | | |
1051 | 1074 | | |
1052 | 1075 | | |
| |||
1077 | 1100 | | |
1078 | 1101 | | |
1079 | 1102 | | |
1080 | | - | |
1081 | 1103 | | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
| 1104 | + | |
1086 | 1105 | | |
1087 | 1106 | | |
1088 | 1107 | | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | 1108 | | |
1096 | 1109 | | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
| 1110 | + | |
| 1111 | + | |
1101 | 1112 | | |
1102 | 1113 | | |
1103 | 1114 | | |
| |||
0 commit comments