pretty: allow %(trailers) options with explicit value
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index e82b6341ee539882a7f0a21322ab304070a47a23..8647db3d307c297448c91b328b1dabf19635fb94 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4302,12 +4302,12 @@ static void diff_fill_oid_info(struct diff_filespec *one, struct index_state *is
 static void strip_prefix(int prefix_length, const char **namep, const char **otherp)
 {
        /* Strip the prefix but do not molest /dev/null and absolute paths */
-       if (*namep && **namep != '/') {
+       if (*namep && !is_absolute_path(*namep)) {
                *namep += prefix_length;
                if (**namep == '/')
                        ++*namep;
        }
-       if (*otherp && **otherp != '/') {
+       if (*otherp && !is_absolute_path(*otherp)) {
                *otherp += prefix_length;
                if (**otherp == '/')
                        ++*otherp;