summaryrefslogtreecommitdiff
path: root/src/futils.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-05-12 21:35:07 +0200
committerPatrick Steinhardt <ps@pks.im>2020-05-12 21:37:18 +0200
commita2eca682825523df8a03119ccd319519b52d341f (patch)
tree7a5a82fae465f091e1ed831c720fbbc03eccc1d5 /src/futils.h
parent51a2bc4337c9ca7ff398add3f6b85ce974b4a8ac (diff)
downloadlibgit2-a2eca682825523df8a03119ccd319519b52d341f.tar.gz
futils: fix order of declared parameters for `git_futils_fake_symlink`pks/futils-symlink-args
While the function `git_futils_fake_symlink` is declared with arguments `new, old`, the implementation uses the reverse order `old, new`. Let's fix the ordering issues to be `new, old` for both, which matches what symlink(3P) has. While at it, we also rename these parameters: `old` and `new` doesn't really make a lot of sense in the context of symlinks, which is why this commit renames them to be called `target` and `path`.
Diffstat (limited to 'src/futils.h')
-rw-r--r--src/futils.h6
1 files changed, 3 insertions, 3 deletions
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