Commit dce96c4
receive-pack: simplify run_update_post_hook()
Instead of counting the arguments to see if there are any and then
building the full command use a single loop and add the hook command
just before the first argument. This reduces duplication and overall
code size.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent c3808ca commit dce96c4
1 file changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
1122 | 1121 | | |
1123 | 1122 | | |
1124 | 1123 | | |
1125 | 1124 | | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1125 | + | |
1132 | 1126 | | |
1133 | 1127 | | |
1134 | | - | |
1135 | 1128 | | |
1136 | 1129 | | |
1137 | 1130 | | |
| 1131 | + | |
| 1132 | + | |
1138 | 1133 | | |
1139 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
1140 | 1137 | | |
1141 | 1138 | | |
1142 | 1139 | | |
| |||
0 commit comments