diff options
author | Russell Belfer <rb@github.com> | 2014-01-17 10:45:11 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-02-07 16:17:59 -0800 |
commit | 80c29fe93e968fd73e861546e1a4cf33b514e3f6 (patch) | |
tree | daeef4d5dab50314ec4f0a2afeaf96c65557d3ed /src/signature.c | |
parent | 2d9291943c253e9e1520f87b13abb1e81cffdb29 (diff) | |
download | libgit2-80c29fe93e968fd73e861546e1a4cf33b514e3f6.tar.gz |
Add git_commit_amend API
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit. As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
Diffstat (limited to 'src/signature.c')
-rw-r--r-- | src/signature.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/signature.c b/src/signature.c index f658d6035..f501cd8b6 100644 --- a/src/signature.c +++ b/src/signature.c @@ -230,6 +230,8 @@ void git_signature__writebuf(git_buf *buf, const char *header, const git_signatu int offset, hours, mins; char sign; + assert(buf && sig); + offset = sig->when.offset; sign = (sig->when.offset < 0) ? '-' : '+'; |