Commit c3794d4
name-rev: use strbuf_strip_suffix() in get_rev_name()
get_name_rev() basically open-codes strip_suffix() before adding a
string to a strbuf.
Let's use the strbuf right from the beginning, i.e. add the whole
string to the strbuf and then use strbuf_strip_suffix(), making the
code more idiomatic.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent c593a26 commit c3794d4
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | 324 | | |
328 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
| |||
0 commit comments