diff options
author | yorah <yoram.harmelin@gmail.com> | 2012-07-12 16:31:59 +0200 |
---|---|---|
committer | yorah <yoram.harmelin@gmail.com> | 2012-07-24 14:03:07 +0200 |
commit | 02a0d651d79b2108dd6b894b9a43f7682270ac51 (patch) | |
tree | e90cbe5dccf69913f226799860a541ab31df29c3 /src/buffer.c | |
parent | 944d250f964698b33d9fa09e2e6af74b1dd84de2 (diff) | |
download | libgit2-02a0d651d79b2108dd6b894b9a43f7682270ac51.tar.gz |
Add git_buf_unescape and git__unescape to unescape all characters in a string (in-place)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 5d54ee1a5..b57998e1b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -496,3 +496,7 @@ bool git_buf_is_binary(const git_buf *buf) return ((printable >> 7) < nonprintable); } +void git_buf_unescape(git_buf *buf) +{ + buf->size = git__unescape(buf->ptr); +} |