Commit 470e28d
refs.c: remove_empty_directories can take a strbuf
The first thing we do in this function is copy the input
into a strbuf. Of the 4 callers, 3 of them already have a
strbuf we could use. Let's just take the strbuf, and convert
the remaining caller to use a strbuf, rather than a raw
git_path. This is safer, anyway, as remove_dir_recursively
is a non-trivial function that might use the pathname
buffers itself (this is _probably_ OK, as the likely culprit
would be calling resolve_gitlink_ref, but we do not pass the
proper flags to ask it to avoid blowing away gitlinks).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 5f8ef5b commit 470e28d
1 file changed
+15
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2290 | 2290 | | |
2291 | 2291 | | |
2292 | 2292 | | |
2293 | | - | |
| 2293 | + | |
2294 | 2294 | | |
2295 | | - | |
| 2295 | + | |
| 2296 | + | |
2296 | 2297 | | |
2297 | 2298 | | |
2298 | 2299 | | |
2299 | | - | |
2300 | | - | |
2301 | | - | |
2302 | | - | |
2303 | | - | |
2304 | | - | |
2305 | | - | |
2306 | | - | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
2311 | | - | |
| 2300 | + | |
2312 | 2301 | | |
2313 | 2302 | | |
2314 | 2303 | | |
| |||
2440 | 2429 | | |
2441 | 2430 | | |
2442 | 2431 | | |
2443 | | - | |
| 2432 | + | |
2444 | 2433 | | |
2445 | 2434 | | |
2446 | 2435 | | |
| |||
2961 | 2950 | | |
2962 | 2951 | | |
2963 | 2952 | | |
2964 | | - | |
| 2953 | + | |
2965 | 2954 | | |
2966 | 2955 | | |
2967 | 2956 | | |
| |||
3046 | 3035 | | |
3047 | 3036 | | |
3048 | 3037 | | |
3049 | | - | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
3050 | 3046 | | |
3051 | 3047 | | |
3052 | 3048 | | |
| |||
3183 | 3179 | | |
3184 | 3180 | | |
3185 | 3181 | | |
3186 | | - | |
| 3182 | + | |
3187 | 3183 | | |
3188 | 3184 | | |
3189 | 3185 | | |
| |||
0 commit comments