Unverified Commit b7b872f5 by Edward Thomson Committed by GitHub

Merge pull request #5517 from libgit2/pks/futils-symlink-args

futils: fix order of declared parameters for `git_futils_fake_symlink`
parents 3f90fcd6 a2eca682
...@@ -834,12 +834,12 @@ int git_futils_rmdir_r( ...@@ -834,12 +834,12 @@ int git_futils_rmdir_r(
return error; 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 retcode = GIT_ERROR;
int fd = git_futils_creat_withpath(new, 0755, 0644); int fd = git_futils_creat_withpath(path, 0755, 0644);
if (fd >= 0) { if (fd >= 0) {
retcode = p_write(fd, old, strlen(old)); retcode = p_write(fd, target, strlen(target));
p_close(fd); p_close(fd);
} }
return retcode; return retcode;
......
...@@ -316,11 +316,11 @@ extern void git_futils_mmap_free(git_map *map); ...@@ -316,11 +316,11 @@ extern void git_futils_mmap_free(git_map *map);
/** /**
* Create a "fake" symlink (text file containing the target path). * Create a "fake" symlink (text file containing the target path).
* *
* @param new symlink file to be created * @param target original symlink target
* @param old original symlink target * @param path symlink file to be created
* @return 0 on success, -1 on error * @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 * A file stamp represents a snapshot of information about a file that can
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment