Commit 40b30f2
path: factor out skip_slashes() in normalize_path_copy_len()
Extract skip_slashes() to avoid repeating the same is_dir_sep()
loop in multiple places inside normalize_path_copy_len().
Keep the dot-component handling inline to preserve the original
control flow and readability, as suggested in review.
No functional changes. Behavior verified with t0060-path-utils.sh.
Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 7c02d39 commit 40b30f2
1 file changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1115 | 1123 | | |
1116 | 1124 | | |
1117 | 1125 | | |
| |||
1129 | 1137 | | |
1130 | 1138 | | |
1131 | 1139 | | |
1132 | | - | |
1133 | | - | |
| 1140 | + | |
1134 | 1141 | | |
1135 | 1142 | | |
1136 | 1143 | | |
| |||
1150 | 1157 | | |
1151 | 1158 | | |
1152 | 1159 | | |
1153 | | - | |
1154 | | - | |
| 1160 | + | |
1155 | 1161 | | |
1156 | 1162 | | |
1157 | 1163 | | |
| |||
1161 | 1167 | | |
1162 | 1168 | | |
1163 | 1169 | | |
1164 | | - | |
1165 | | - | |
| 1170 | + | |
1166 | 1171 | | |
1167 | 1172 | | |
1168 | 1173 | | |
| |||
1182 | 1187 | | |
1183 | 1188 | | |
1184 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
1185 | 1192 | | |
1186 | 1193 | | |
1187 | 1194 | | |
| |||
0 commit comments