libgit2/src
Patrick Steinhardt 821042b673 commit: always initialize commit message
When parsing a commit, we will treat all bytes left after parsing
the headers as the commit message. When no bytes are left, we
leave the commit's message uninitialized. While uncommon to have
a commit without message, this is the right behavior as Git
unfortunately allows for empty commit messages.

Given that this scenario is so uncommon, most programs acting on
the commit message will never check if the message is actually
set, which may lead to errors. To work around the error and not
lay the burden of checking for empty commit messages to the
developer, initialize the commit message with an empty string
when no commit message is given.
2016-11-03 09:20:55 +01:00
..
hash hash_generic: __extension__ keyword for pedantry 2015-02-04 15:26:09 -05:00
transports transports: http: reset connected flag when re-connecting transport 2016-10-01 17:41:28 +02:00
unix threads: add platform-independent thread initialization function 2016-10-01 17:40:40 +02:00
win32 threads: add platform-independent thread initialization function 2016-10-01 17:40:40 +02:00
xdiff leaks: call xdl_free_classifier 2016-04-11 16:17:04 -04:00
annotated_commit.c merge: use annotated commits for recursion 2015-11-25 15:38:16 -05:00
annotated_commit.h merge: use annotated commits for recursion 2015-11-25 15:38:16 -05:00
array.h array: fix search for empty arrays 2016-10-01 17:41:29 +02:00
attr_file.c attr_file: fix resource leak 2016-02-09 11:11:38 +01:00
attr_file.h Improvements to ignore performance on Windows. 2015-04-28 14:24:58 -04:00
attr.c attr: always return errors 2015-05-12 14:39:49 -04:00
attr.h Attribute file cache refactor 2014-04-17 14:56:41 -07:00
attrcache.c pool: Simplify implementation 2015-10-28 10:13:13 +01:00
attrcache.h attrcache: don't re-read attrs during checkout 2015-02-03 00:31:08 -05:00
bitvec.h Address PR comments 2014-02-20 14:27:10 -08:00
blame_git.c blame: do not decrement commit refcount in make_origin 2016-10-01 17:40:41 +02:00
blame_git.h blame: guard xdiff calls for large files 2015-10-05 22:59:53 +02:00
blame.c blame: handle error when resoling HEAD in normalize_options 2016-04-11 15:58:56 -04:00
blame.h blame: use size_t for line counts in git_blame__entry 2015-12-01 09:02:47 +01:00
blob.c blob: fail to create a blob from a dir with EDIRECTORY 2015-07-12 12:11:22 +02:00
blob.h Fix rename detection to use actual blob size 2013-07-25 12:27:39 -07:00
branch.c refdb: delete a ref's reflog upon deletion 2015-07-12 19:08:06 +02:00
branch.h
buf_text.c git_buf_text_lf_to_crlf: allow mixed line endings 2015-06-22 12:00:23 -04:00
buf_text.h git_buf_text_lf_to_crlf: allow mixed line endings 2015-06-22 12:00:23 -04:00
buffer.c buffer: make use of EINVALID for growing a borrowed buffer 2015-06-24 23:49:10 +02:00
buffer.h buffer: don't allow growing borrowed buffers 2015-06-24 23:49:10 +02:00
cache.c Fix #3094 - improve use of portable size_t/ssize_t format specifiers. 2015-07-12 19:55:19 +02:00
cache.h Refactor git_cache to use an rwlock 2014-08-26 15:12:43 -07:00
cc-compat.h There is no "z" size specifier on MSVC 2014-10-13 16:32:26 +02:00
checkout.c git_checkout_tree options fix 2016-10-01 17:41:28 +02:00
checkout.h iterator: submodules are determined by an index or tree 2014-11-07 08:33:27 +01:00
cherrypick.c cherrypick, revert: drop unnecessary SAFE_CREATE 2015-02-27 13:47:30 -05:00
clone.c errors: tighten up git_error_state OOMs a bit more 2015-08-03 19:44:51 -04:00
clone.h clone: add flags to override whether to perform a local clone 2014-05-28 15:40:22 +02:00
commit_list.c pool: Dot not assume mallocs are zeroed out 2015-10-28 10:50:25 +01:00
commit_list.h merge-base: Remove redundant merge bases 2015-11-02 13:47:04 +01:00
commit.c commit: always initialize commit message 2016-11-03 09:20:55 +01:00
commit.h commit: introduce git_commit_body 2015-12-01 10:07:00 +01:00
common.h win32: rename pthread.{c,h} to thread.{c,h} 2016-10-01 17:40:39 +02:00
config_cache.c config_cache: check return value of git_config__lookup_entry 2016-04-11 15:58:56 -04:00
config_file.c config: don't write section header if we're in it 2016-04-11 15:58:58 -04:00
config_file.h config: implement basic transactional support 2015-08-12 04:09:09 +02:00
config.c config: add a ProgramData level 2015-10-21 15:11:18 +02:00
config.h config: add a ProgramData level 2015-10-21 15:11:18 +02:00
crlf.c crlf: do not ignore GIT_PASSTHROUGH error 2016-02-23 11:50:23 +01:00
curl_stream.c curl_stream: fix unused cert infos 2016-02-08 17:05:57 +01:00
curl_stream.h curl: remove the encrypted param to the constructor 2015-06-24 17:26:36 +02:00
date.c Introduce git__date_rfc2822_fmt. Allows for RFC2822 date headers 2014-04-11 21:55:35 +02:00
delta-apply.c delta-apply: fix sign extension 2016-10-01 17:40:34 +02:00
delta-apply.h odb: avoid inflating the full delta to read the header 2016-10-01 17:40:34 +02:00
delta.c Make our overflow check look more like gcc/clang's 2015-02-13 09:27:33 -05:00
delta.h
describe.c describe: handle error code returned by git_pqueue_insert 2016-04-11 14:14:15 -04:00
diff_driver.c diff: don't error out on an invalid regex 2015-08-15 18:46:38 +02:00
diff_driver.h Initial take on builtin drivers with multiline 2014-01-24 10:43:05 -08:00
diff_file.c diff: on win32, treat fake "symlinks" specially 2015-11-03 12:06:49 -05:00
diff_file.h diff: introduce binary diff callbacks 2015-06-12 09:39:20 -04:00
diff_patch.c diff: don't feed large files to xdiff 2015-10-05 22:59:50 +02:00
diff_patch.h diff: determine DIFFABLE-ness for binaries 2015-06-24 12:06:41 -04:00
diff_print.c diff_print: assert patch is non-NULL 2016-02-23 11:50:23 +01:00
diff_stats.c Don't scale diff stat when not needed 2014-05-12 10:28:45 -07:00
diff_tform.c diff_tform: fix potential NULL pointer access 2016-04-11 15:58:55 -04:00
diff_xdiff.c diff: don't feed large files to xdiff 2015-10-05 22:59:50 +02:00
diff_xdiff.h diff: don't feed large files to xdiff 2015-10-05 22:59:50 +02:00
diff.c Horrible fix for #3173. 2016-02-11 23:41:34 +01:00
diff.h checkout: only consider nsecs when built that way 2015-11-23 15:49:54 -05:00
errors.c errors: tighten up git_error_state OOMs a bit more 2015-08-03 19:44:51 -04:00
fetch.c Rename FALLBACK to UNSPECIFIED 2015-06-25 12:48:44 +02:00
fetch.h Fix #3093 - remove declaration of unused function git_fetch__download_pack 2015-06-30 16:48:47 -04:00
fetchhead.c fetchhead: deal with quotes in branch names 2014-04-24 14:08:29 +02:00
fetchhead.h Join typedef and struct definitions in single file. 2014-09-24 11:00:51 +02:00
filebuf.c filebuf: fix uninitialized warning 2016-10-01 17:40:36 +02:00
filebuf.h filebuf: remove lockfile upon rename errors 2015-07-24 23:02:11 +02:00
fileops.c nsec: support NDK's crazy nanoseconds 2016-02-25 11:40:48 -05:00
fileops.h Merge pull request #3170 from CmdrMoozy/nsec_fix 2015-11-12 19:53:09 +01:00
filter.c filter: avoid races during filter registration 2016-02-08 16:31:42 -08:00
filter.h filter: avoid races during filter registration 2016-02-08 16:31:42 -08:00
fnmatch.c git__tolower: a tolower() that isn't dumb 2015-05-29 18:16:46 -04:00
fnmatch.h Restore attributions for fnmatch 2014-05-19 14:39:45 +01:00
global.c mwindow: init mwindow files in git_libgit2_init 2016-10-01 17:41:28 +02:00
global.h Setup better defaults for OpenSSL ciphers 2016-04-11 15:58:56 -04:00
graph.c graph: fix ahead-behind logic 2014-08-28 13:36:58 +02:00
hash.c
hash.h hash: use CommonCrypto on OSX for SHA-1 2014-10-24 13:31:18 +02:00
hashsig.c diff_tform: account for whitespace options 2015-03-04 00:01:34 -05:00
ident.c Fix ident replacement to match Git behavior 2015-05-26 19:56:06 +02:00
idxmap.h index: Also size-hint the hash table 2015-12-16 19:36:50 +01:00
ignore.c ignore: allow unignoring basenames in subdirectories 2016-10-01 17:41:28 +02:00
ignore.h Improvements to ignore performance on Windows. 2015-04-28 14:24:58 -04:00
index.c index: fix NULL pointer access in index_remove_entry 2016-10-01 17:40:37 +02:00
index.h Fix the build when defining USE_NSEC 2016-01-25 14:06:15 +02:00
indexer.c Split the page size from the mmap alignment 2016-04-11 15:58:56 -04:00
integer.h Fix MAX 32 bit build problem described in libgit2/libgit2#2917 2015-02-20 18:59:43 +01:00
iterator.c tree: re-use the id and filename in the odb object 2016-04-11 15:58:58 -04:00
iterator.h Horrible fix for #3173. 2016-02-11 23:41:34 +01:00
khash.h khash: add eol so picky compilers stop warning 2015-07-10 09:53:31 -05:00
map.h Fix compiler warning (git_off_t cast to size_t). 2014-05-19 17:37:29 -07:00
merge_file.c diff: don't feed large files to xdiff 2015-10-05 22:59:50 +02:00
merge.c Ignore submodules when checking for merge conflicts in the workdir. 2016-10-01 17:40:35 +02:00
merge.h merge: rename git_merge_tree_flags_t -> git_merge_flags_t 2015-11-25 15:37:05 -05:00
message.c message: don't assume the comment char 2014-05-18 10:06:49 +02:00
message.h
mwindow.c mwindow: init mwindow files in git_libgit2_init 2016-10-01 17:41:28 +02:00
mwindow.h mwindow: init mwindow files in git_libgit2_init 2016-10-01 17:41:28 +02:00
netops.c netops: fix memory leak when an error occurs 2016-02-18 20:50:33 +01:00
netops.h Drop extra_http_headers from git_remote 2015-09-08 14:01:57 -04:00
notes.c iterator: use an options struct instead of args 2015-08-28 18:39:47 -04:00
notes.h Introduce git_note_author, git_note_committer 2014-10-26 22:59:29 -04:00
object_api.c
object.c object: avoid call of memset with ouf of bounds pointer 2016-04-11 15:58:55 -04:00
object.h git_object__is_valid: use odb_read_header 2016-02-28 18:54:39 -05:00
odb_loose.c odb_loose: fix undefined behavior when computing size 2016-10-01 17:40:34 +02:00
odb_mempack.c mempack: expose clear function 2015-09-11 20:06:14 -04:00
odb_pack.c mwindow: init mwindow files in git_libgit2_init 2016-10-01 17:41:28 +02:00
odb.c odb: only provide the empty tree 2016-10-01 17:41:29 +02:00
odb.h odb: improved not found error messages 2016-04-11 14:12:40 -04:00
offmap.h Remove extra semicolon outside of a function 2015-02-15 21:07:05 +01:00
oid.c git__*allocarray: safer realloc and malloc 2015-02-12 22:54:47 -05:00
oid.h backport git_oid__cpy_prefix 2016-04-11 15:58:54 -04:00
oidarray.c merge: expose multiple merge bases 2014-07-27 17:17:22 +02:00
oidarray.h merge: expose multiple merge bases 2014-07-27 17:17:22 +02:00
oidmap.h mempack: expose clear function 2015-09-11 20:06:14 -04:00
openssl_stream.c Fix return value of openssl_read (infinite loop) 2016-10-01 17:40:33 +02:00
openssl_stream.h global: make openssl registration like the rest 2016-02-08 16:30:39 -08:00
pack-objects.c threads: split up OS-dependent thread code 2016-10-01 17:40:38 +02:00
pack-objects.h packbuilder: report progress during deltification 2015-05-13 15:52:13 +02:00
pack.c odb: avoid inflating the full delta to read the header 2016-10-01 17:40:34 +02:00
pack.h Make packfile_unpack_compressed a private API 2016-01-13 11:02:38 +08:00
path.c path: use GITERR_CHECK_ALLOC_BUF to verify passed in buffer 2016-02-23 11:50:23 +01:00
path.h index: allow read of index w/ illegal entries 2016-02-17 13:10:33 +00:00
pathspec.c Horrible fix for #3173. 2016-02-11 23:41:34 +01:00
pathspec.h
pool.c Add a new build flag to disable the pool allocator and pass all git_pool_malloc calls straight to git__malloc 2016-01-12 16:08:38 -05:00
pool.h Fixed typo in one of the ifndef's in pool.h used to enable/disable debug mode 2016-02-26 12:51:13 -05:00
posix.c Split the page size from the mmap alignment 2016-04-11 15:58:56 -04:00
posix.h Split the page size from the mmap alignment 2016-04-11 15:58:56 -04:00
pqueue.c Fix pqueue sort boundary condition bug 2014-03-12 11:21:55 -07:00
pqueue.h Convert pqueue to just be a git_vector 2014-02-04 10:01:37 -08:00
push.c tree: re-use the id and filename in the odb object 2016-04-11 15:58:58 -04:00
push.h Tell the git_transport about the custom_headers 2015-09-08 14:02:33 -04:00
rebase.c rebase: plug memory leak in rebase_alloc 2016-02-23 12:07:36 +01:00
refdb_fs.c refdb_fs: fail if refcache returns NULL pointer 2016-04-11 15:58:55 -04:00
refdb_fs.h
refdb.c refdb and odb backends must provide free function 2015-10-01 00:50:37 +02:00
refdb.h Introduce reference transactions 2014-09-30 15:44:32 +02:00
reflog.c Fix wrong format string in git_reflog_drop() error message 2015-04-24 23:56:59 +08:00
reflog.h reflog: move the reflog implementation into refdb_fs 2013-10-02 06:53:24 +02:00
refs.c refs: provide a more general error message for dwim 2016-04-11 15:58:57 -04:00
refs.h repository: distinguish sequencer cherry-pick and revert 2015-11-20 13:19:23 -05:00
refspec.c refspec: do not set empty rhs for fetch refspecs 2016-10-01 17:40:41 +02:00
refspec.h refspec: git_refspec_parse() does not exist 2014-04-01 20:18:36 +02:00
remote.c remote: Handle missing config values when deleting a remote 2016-10-01 17:40:41 +02:00
remote.h Drop extra_http_headers from git_remote 2015-09-08 14:01:57 -04:00
repo_template.h
repository.c repository: don't cast to int for no reason 2016-10-01 17:40:41 +02:00
repository.h submodule: remove the per-repo cache 2015-06-22 17:02:54 +02:00
reset.c reset: perform the checkout before moving HEAD or the index 2015-12-09 19:16:11 +01:00
revert.c cherrypick, revert: drop unnecessary SAFE_CREATE 2015-02-27 13:47:30 -05:00
revparse.c reflog: Error handling on empty reflog 2014-09-05 03:25:53 +02:00
revwalk.c revwalk: use GITERR_CHECK_ALLOC_BUF 2016-02-23 11:50:23 +01:00
revwalk.h Reorder some khash declarations 2015-03-11 02:36:11 +01:00
settings.c Start error string with lower case character 2016-04-11 15:58:56 -04:00
sha1_lookup.c Backport @peff's fix for duplicates in sha1_lookup 2013-09-04 13:16:57 +02:00
sha1_lookup.h sha1_lookup: do not use the "experimental" lookup mode 2013-08-14 10:28:01 +02:00
signature.c signature: use GITERR_CHECK_ALLOC to check for OOM situation 2016-02-18 20:50:33 +01:00
signature.h Introduce git_rebase_commit 2014-10-26 22:59:19 -04:00
socket_stream.c stream: constify the write buffer 2014-12-10 16:20:52 +01:00
socket_stream.h Add an OpenSSL IO stream 2014-12-10 01:17:41 +01:00
sortedcache.c pool: Simplify implementation 2015-10-28 10:13:13 +01:00
sortedcache.h Add stddef include for sortedcache 2013-08-28 11:20:47 -07:00
stash.c Horrible fix for #3173. 2016-02-11 23:41:34 +01:00
status.c diff/status: introduce conflicts 2015-05-28 09:44:02 -04:00
status.h Rename diff objects and split patch.h 2013-10-11 14:51:54 -07:00
stransport_stream.c stransport: do not use git_stream_free on uninitialized stransport 2016-10-01 17:41:27 +02:00
stransport_stream.h Add a SecureTransport TLS channel 2015-04-23 17:39:51 +02:00
stream.h stream: accept NULL in the free function 2015-11-03 08:10:14 -08:00
strmap.c config: get rid of a useless asignment 2013-08-12 11:40:57 +02:00
strmap.h Remove extra semicolon outside of a function 2015-02-15 21:07:05 +01:00
strnlen.h strnlen() is only available from Visual Studio 2005+ 2014-07-06 09:22:24 +02:00
submodule.c tree: re-use the id and filename in the odb object 2016-04-11 15:58:58 -04:00
submodule.h submodule: handle writing out all enum values for settings 2015-06-22 17:02:56 +02:00
sysdir.c sysdir: use the standard init pattern 2016-10-01 17:40:41 +02:00
sysdir.h sysdir: use the standard init pattern 2016-10-01 17:40:41 +02:00
tag.c tag: ignore extra header fields 2016-10-01 17:40:33 +02:00
tag.h
thread-utils.c Fix macro redefinition warning 2015-07-15 11:40:06 +01:00
thread-utils.h win32: rename pthread.{c,h} to thread.{c,h} 2016-10-01 17:40:39 +02:00
tls_stream.c stream: allow registering a user-provided TLS constructor 2015-11-03 08:10:29 -08:00
tls_stream.h Abstract away the TLS stream implementation 2015-04-23 17:39:51 +02:00
trace.c Remove trace / add git_diff_perfdata struct + api 2014-05-02 09:21:33 -07:00
trace.h Variadic macros is only available from Visual Studio 2005+ 2014-07-06 09:22:24 +02:00
transaction.c pool: Simplify implementation 2015-10-28 10:13:13 +01:00
transaction.h config: perform unlocking via git_transaction 2015-08-12 04:09:38 +02:00
transport.c Tabs 2016-04-11 14:11:33 -04:00
tree-cache.c tree-cache: correct the entry_count calculation 2014-10-22 21:25:08 +02:00
tree-cache.h index: write out the tree cache extension 2014-10-10 19:43:42 +02:00
tree.c tree: validate filename and OID length when parsing object 2016-11-03 09:20:55 +01:00
tree.h tree: drop the now-unnecessary entries vector 2016-04-11 15:58:59 -04:00
tsort.c git__*allocarray: safer realloc and malloc 2015-02-12 22:54:47 -05:00
userdiff.h Update the javascript diff driver's function pattern. 2014-10-09 22:21:34 +02:00
util.c Fixed bug while parsing INT64_MIN 2016-10-01 17:40:40 +02:00
util.h Merge pull request #3288 from ethomson/getenv 2015-07-07 00:48:17 +02:00
vector.c index: Preallocate the entries vector with size hint 2015-12-16 17:04:08 +01:00
vector.h index: Preallocate the entries vector with size hint 2015-12-16 17:04:08 +01:00
zstream.c git_buf_grow_by: increase buf asize incrementally 2015-02-12 22:54:47 -05:00
zstream.h Reorganize zstream API and fix wrap problems 2014-01-30 09:59:59 -08:00