Merge branch 'js/diff-notice-has-drive-prefix' into maint
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 145cfbae5929c69224f9f9e5bc473f2a221603de..db5e5e9640743e275ac44abcf3ffb2f3c59eb556 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4256,12 +4256,12 @@ static void diff_fill_oid_info(struct diff_filespec *one)
 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;