Code

push: fix local refs update if already up-to-date
[git.git] / path.c
diff --git a/path.c b/path.c
index 9df447bd6dcfaddf7f05fe5f0b624700ff1f40d7..c1cb54b7b8b478c717861a0205e537ded3fbbfc9 100644 (file)
--- a/path.c
+++ b/path.c
@@ -348,7 +348,7 @@ int normalize_absolute_path(char *buf, const char *path)
                        goto next;
                }
 
-               memcpy(dst, comp_start, comp_len);
+               memmove(dst, comp_start, comp_len);
                dst += comp_len;
        next:
                comp_start = comp_end;
@@ -365,7 +365,7 @@ int normalize_absolute_path(char *buf, const char *path)
  * path = Canonical absolute path
  * prefix_list = Colon-separated list of absolute paths
  *
- * Determines, for each path in parent_list, whether the "prefix" really
+ * Determines, for each path in prefix_list, whether the "prefix" really
  * is an ancestor directory of path.  Returns the length of the longest
  * ancestor directory, excluding any trailing slashes, or -1 if no prefix
  * is an ancestor.  (Note that this means 0 is returned if prefix_list is