]> git.ipfire.org Git - thirdparty/git.git/blame - compat/strdup.c
Merge branch 'js/update-index-ignore-removal-for-skip-worktree'
[thirdparty/git.git] / compat / strdup.c
CommitLineData
ca2baa3f
RS
1#include "../git-compat-util.h"
2
3char *gitstrdup(const char *s1)
4{
5 size_t len = strlen(s1) + 1;
6 char *s2 = malloc(len);
7
8 if (s2)
9 memcpy(s2, s1, len);
10 return s2;
11}