diff options
author | Ben Straub <bstraub@github.com> | 2012-07-17 19:57:37 -0700 |
---|---|---|
committer | Ben Straub <bstraub@github.com> | 2012-07-17 19:57:37 -0700 |
commit | 8651c10f1ed5d42ef0ad6e9e9f654799b4ffb39c (patch) | |
tree | 4da027729959be251b3cb72d950aca0aaa9c4f37 /src/fileops.c | |
parent | 3e026f1b4597c24848487422eb566a9434b5821d (diff) | |
download | libgit2-8651c10f1ed5d42ef0ad6e9e9f654799b4ffb39c.tar.gz |
Checkout: obey core.symlinks.
Diffstat (limited to 'src/fileops.c')
-rw-r--r-- | src/fileops.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fileops.c b/src/fileops.c index 5849b79b2..bc58a0572 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -480,3 +480,14 @@ int git_futils_find_global_file(git_buf *path, const char *filename) return 0; #endif } + +int git_futils_fake_symlink(const char *old, const char *new) +{ + int retcode = GIT_ERROR; + int fd = git_futils_creat_withpath(new, 0755, 0644); + if (fd >= 0) { + retcode = p_write(fd, old, strlen(old)); + p_close(fd); + } + return retcode; +} |