Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/compat/strdup.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / compat / strdup.c` 11 lines ยท 169 bytes Raw Blame History 1 #include "../git-compat-util.h" 2 3 char *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 }