Commit Graph

6086 Commits

Author SHA1 Message Date
Carlos Martín Nieto
b25d87c9cd branch: move to git_buf when outputting newly-allocated strings
Internally we already did everything with git_bufs, so this is just
exposing those functions with public names.
2014-01-27 04:44:05 +01:00
Carlos Martín Nieto
7a3bd1e732 repository: move to use a git_buf for outputting strings
Since we now export that type, we can avoid making the user guess a
size.
2014-01-27 04:44:05 +01:00
Ben Straub
1087d4fd01 Merge pull request #2052 from arthurschreiber/arthur/add-git_remote_dup
Fix git_remote_dup & add missing const
2014-01-26 11:27:44 -08:00
Arthur Schreiber
991b2840eb Make sure git_remote_dup copies a remote's refspecs correctly. 2014-01-26 19:35:02 +01:00
Arthur Schreiber
11f6ad5fcf Add some missing const declarations. 2014-01-26 18:08:05 +01:00
Edward Thomson
93b96ea705 Merge pull request #2076 from xtao/fix-zstream
Fix write_object.
2014-01-26 06:38:02 -08:00
Edward Thomson
58582cd0b0 Merge pull request #2057 from GrahamDennis/local-file-url-push-fix
Fix local push to file:// URL.
2014-01-26 06:31:38 -08:00
XTao
1cb5a81194 Fix write_object. 2014-01-26 22:26:53 +08:00
Vicent Marti
ca55fc6356 Merge pull request #2074 from linquize/pack-filename-sha1
Drop parsing pack filename SHA1 part
2014-01-23 08:03:29 -08:00
Linquize
8610487cd3 Drop parsing pack filename SHA1 part, no one cares the filename 2014-01-23 23:28:28 +08:00
Vicent Marti
ac8949edb2 Merge pull request #2073 from ethomson/zerobytes
Sometimes a zero byte file is just a zero byte file
2014-01-22 15:41:25 -08:00
Edward Thomson
410a8e6fed Sometimes a zero byte file is just a zero byte file
Don't go to the ODB to resolve zero byte files in the workdir
2014-01-22 18:31:25 -05:00
Ben Straub
ab4bcc038a Plug a small memory leak 2014-01-22 14:14:37 -08:00
Vicent Marti
e82b6d13d2 Merge pull request #2072 from ethomson/commit_summary
Summarize empty messages
2014-01-22 11:50:43 -08:00
Edward Thomson
238e814972 Summarize empty messages 2014-01-22 14:41:04 -05:00
Vicent Marti
2b678ce5b4 Merge pull request #2070 from ethomson/checkout_filemode
Preserve tree filemode in index during checkout
2014-01-22 10:34:25 -08:00
Edward Thomson
e8b81c698c Preserve tree filemode in index during checkout
Don't try to determine whether the system supports file modes
when putting the tree data in the index during checkout.  The tree's
mode is canonical and did not come from stat(2) in the first place.
2014-01-22 13:26:30 -05:00
Vicent Marti
ec088fec9d Merge pull request #2069 from isilkor/patch_to_buf
Expose patch serialization to git_buf
2014-01-22 09:35:25 -08:00
Nicolas Hake
c05cd7924d Drop git_patch_to_str
It's hard or even impossible to correctly free the string buffer
allocated by git_patch_to_str in some circumstances. Drop the function
so people have to use git_patch_to_buf instead - git_buf has a dedicated
destructor.
2014-01-22 17:51:32 +01:00
Nicolas Hake
450e8e9e62 Expose patch serialization to git_buf
Returning library-allocated strings from libgit2 works fine on Linux,
but may cause problems on Windows because there is no one C Runtime that
everything links against. With libgit2 not exposing its own allocator,
freeing the string is a gamble.

git_patch_to_str already serializes to a buffer, then returns the
underlying memory. Expose the functionality directly, so callers can use
the git_buf_free function to free the memory later.
2014-01-22 13:40:19 +01:00
Vicent Marti
af2b969b6f Merge pull request #2061 from ethomson/merge_improvements
Merge improvements
2014-01-20 16:26:04 -08:00
Edward Thomson
0ef19fe14c Merge submodules 2014-01-20 18:07:17 -05:00
Edward Thomson
db3462ce77 Support union merges 2014-01-20 17:15:15 -05:00
Edward Thomson
0e1ba46cfb Remove the "merge none" flag
The "merge none" (don't automerge) flag was only to aide in
merge trivial tests.  We can easily determine whether merge
trivial resulted in a trivial merge or an automerge by examining
the REUC after automerge has completed.
2014-01-20 17:15:14 -05:00
Edward Thomson
6891a862bb Load merge.conflictstyle setting from config 2014-01-20 17:15:13 -05:00
Edward Thomson
e651e8e2b5 Introduce diff3 mode for checking out conflicts 2014-01-20 17:15:13 -05:00
Edward Thomson
6b92c99bcb Don't try to merge binary files 2014-01-20 17:15:12 -05:00
Edward Thomson
c1d648c5c6 merge_file should use more aggressive levels
The default merge_file level was XDL_MERGE_MINIMAL, which will
produce conflicts where there should not be in the case where
both sides were changed identically.  Change the defaults to be
more aggressive (XDL_MERGE_ZEALOUS) which will more aggressively
compress non-conflicts.  This matches git.git's defaults.

Increase testing around reverting a previously reverted commit to
illustrate this problem.
2014-01-20 17:15:11 -05:00
Vicent Marti
e49c98e6ef Merge pull request #2065 from ethomson/submodule_unmodified
"Uninitialized" submodules are "unmodified"
2014-01-20 14:12:41 -08:00
Edward Thomson
b554ca5dc1 "Uninitialized" submodules are "unmodified"
Extend the "unmodified" submodule workdir test to include
uninitialized submodules, to prevent reporting submodules as
modified when they're not in the workdir at all.
2014-01-20 17:09:31 -05:00
Russell Belfer
d62bf0bf83 Merge pull request #2063 from linquize/reflog-msg-null
git_reflog_entry_message can be null
2014-01-20 10:15:05 -08:00
Russell Belfer
fb62dc9068 Merge pull request #2064 from piki/piki/buffer-corner-cases
Fix a couple of corner cases and an undefined behavior
2014-01-20 10:04:20 -08:00
Patrick Reynolds
abdaf93662 add unit tests for git_buf_join corner cases 2014-01-20 11:42:12 -06:00
Patrick Reynolds
7cbc6241cf fix corner cases and an undefined behavior 2014-01-20 11:41:21 -06:00
Linquize
e7c66fc89b git_reflog_entry_message can be null 2014-01-20 23:32:18 +08:00
Graham Dennis
8bf476ac31 Factor out code to convert local "url" into a path.
Previously this code was shared between `local_push` and `local_connect`.
2014-01-19 16:24:58 +11:00
Edward Thomson
b97e55f2f1 Merge pull request #2059 from linquize/git_config_get_crash
Fix segfault when calling git_config_get_* functions when a config fails to load
2014-01-18 14:48:59 -08:00
Linquize
c24130e068 Fix segfault when calling git_config_get_* functions when a config fails to load
Reinitialize the result code of get_entry() to GIT_ENOTFOUND
2014-01-18 22:58:31 +08:00
Edward Thomson
fed98153ca Merge pull request #2058 from libgit2/rb/gitdir-windows-paths
Convert gitdir paths to posix on Windows
2014-01-17 14:00:48 -08:00
Graham Dennis
c7015424cc Fix a compile warning. 2014-01-18 08:54:19 +11:00
Russell Belfer
6b415f622e Convert gitdir paths to posix on Windows
Apparently, a .git file with "gitdir: path" link on Windows is
allowed to use backslashes in the path.  Who knew?
2014-01-17 13:46:44 -08:00
Graham Dennis
194d077c4f Add test for pushing to a local file:// URL. 2014-01-18 08:43:29 +11:00
Graham Dennis
4e974c971f Fix local push to file:// URL. 2014-01-18 08:02:58 +11:00
Vicent Marti
b6815fe0d5 Merge pull request #2055 from arthurschreiber/patch-3
Fix some documentation issues.
2014-01-16 13:21:20 -08:00
Arthur Schreiber
3f033c5595 Revert a wrong doc change. 2014-01-16 21:53:25 +01:00
Arthur Schreiber
3f0e3e1662 Fix some documentation issues. 2014-01-16 21:42:28 +01:00
Ben Straub
c85d606eee Merge pull request #2044 from libgit2/coverity
Run Coverity scan on Travis
2014-01-16 11:36:06 -08:00
Ben Straub
ba6464b3a8 Merge pull request #2053 from ethomson/bindings
Update README to include Java, PowerShell bindings
2014-01-15 14:05:04 -08:00
Edward Thomson
4ef9a50817 Update README to include Java, PowerShell bindings 2014-01-15 13:58:11 -08:00
Ben Straub
998f0016ff Refine build limitation 2014-01-15 12:32:12 -08:00