Commit 4738a33
refs: factor update_ref steps into helpers
Factor the lock and write steps and error handling into helper functions
update_ref_lock and update_ref_write to allow later use elsewhere.
Expose lock_any_ref_for_update's type_p to update_ref_lock callers.
While at it, drop "static" from the local "lock" variable as it is not
necessary to keep across invocations.
Signed-off-by: Brad King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 9bbb0fa commit 4738a33
1 file changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3170 | 3170 | | |
3171 | 3171 | | |
3172 | 3172 | | |
3173 | | - | |
3174 | | - | |
3175 | | - | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
3176 | 3177 | | |
3177 | | - | |
3178 | | - | |
| 3178 | + | |
| 3179 | + | |
3179 | 3180 | | |
3180 | 3181 | | |
3181 | 3182 | | |
3182 | 3183 | | |
3183 | 3184 | | |
3184 | 3185 | | |
3185 | 3186 | | |
3186 | | - | |
3187 | 3187 | | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
3188 | 3195 | | |
3189 | 3196 | | |
3190 | 3197 | | |
| |||
3197 | 3204 | | |
3198 | 3205 | | |
3199 | 3206 | | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
3200 | 3218 | | |
3201 | 3219 | | |
3202 | 3220 | | |
| |||
0 commit comments