Commit Diff


commit - 04f57cb3f4f6793b5ade5115fc1227e0099c8859
commit + d23ace9754f9a3cb832708f7cdf5eb08a7f4573a
blob - 10849ff6cdd8efadcc63584ba98f7628c71d6211
blob + 2057dbe7cb12613928efd1ba604f242836538377
--- got/got.c
+++ got/got.c
@@ -3687,7 +3687,9 @@ rebase_check_path_prefix(struct got_object_id *parent_
 		goto done;
 
 	cpp_arg.path_prefix = path_prefix;
-	cpp_arg.len = strlen(path_prefix);
+	while (cpp_arg.path_prefix[0] == '/')
+		cpp_arg.path_prefix++;
+	cpp_arg.len = strlen(cpp_arg.path_prefix);
 	err = got_diff_tree(tree1, tree2, "", "", repo, check_path_prefix,
 	    &cpp_arg);
 done: