From: John Keeping Date: Tue, 16 Apr 2013 17:39:58 +0000 (+0100) Subject: scan-tree: fix regression in section-from-path=-1 X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/9a725f4f0991710336584bb284a83dcf5fa5bf1e?ds=inline;hp=9a725f4f0991710336584bb284a83dcf5fa5bf1e scan-tree: fix regression in section-from-path=-1 Commit fb3655d (use struct strbuf instead of static buffers - 2013-04-06) introduced a regression in the "section-from-path" handling when the configured value is negative. By changing the "rel" variable so that it includes a trailing slash, counting slashes from the end of the string no longer gives the same answer as it did before. Fix this by ensuring that "rel" does not have a trailing slash. Reported-by: Julius Plenz Signed-off-by: John Keeping ---