summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-05-12 22:39:27 +0100
committerGitHub <noreply@github.com>2020-05-12 22:39:27 +0100
commitb7b872f51074ef8231ae8b94dd93eada127c9365 (patch)
tree446a11daf1eb7ebda757ba2f1c76d4e9fbdafe64
parent3f90fcd6b070d3cf8e6797a1e52c830573ae99c6 (diff)
parenta2eca682825523df8a03119ccd319519b52d341f (diff)
downloadlibgit2-b7b872f51074ef8231ae8b94dd93eada127c9365.tar.gz
Merge pull request #5517 from libgit2/pks/futils-symlink-args
futils: fix order of declared parameters for `git_futils_fake_symlink`
-rw-r--r--src/futils.c6
-rw-r--r--src/futils.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/futils.c b/src/futils.c
index a7c360a1c..8c0f008b3 100644
--- a/src/futils.c
+++ b/src/futils.c
@@ -834,12 +834,12 @@ int git_futils_rmdir_r(
return error;
}
-int git_futils_fake_symlink(const char *old, const char *new)
+int git_futils_fake_symlink(const char *target, const char *path)
{
int retcode = GIT_ERROR;
- int fd = git_futils_creat_withpath(new, 0755, 0644);
+ int fd = git_futils_creat_withpath(path, 0755, 0644);
if (fd >= 0) {
- retcode = p_write(fd, old, strlen(old));
+ retcode = p_write(fd, target, strlen(target));
p_close(fd);
}
return retcode;
diff --git a/src/futils.h b/src/futils.h
index 3d5664679..4668d7b63 100644
--- a/src/futils.h
+++ b/src/futils.h
@@ -316,11 +316,11 @@ extern void git_futils_mmap_free(git_map *map);
/**
* Create a "fake" symlink (text file containing the target path).
*
- * @param new symlink file to be created
- * @param old original symlink target
+ * @param target original symlink target
+ * @param path symlink file to be created
* @return 0 on success, -1 on error
*/
-extern int git_futils_fake_symlink(const char *new, const char *old);
+extern int git_futils_fake_symlink(const char *target, const char *path);
/**
* A file stamp represents a snapshot of information about a file that can