Commit Graph

6351 Commits

Author SHA1 Message Date
Ben Straub
2952a9d0f4 Ensure creating HEAD creates its reflog 2014-01-30 15:51:00 -08:00
Ben Straub
6357388e98 Enhance clarity 2014-01-30 15:51:00 -08:00
Ben Straub
a2311f92c2 Ensure updating HEAD updates reflog 2014-01-30 15:51:00 -08:00
Ben Straub
94f263f59b Add reflog params to set-head calls 2014-01-30 15:51:00 -08:00
Vicent Marti
8646b0a068 Merge pull request #2085 from libgit2/rb/index-tree-blob-collision
Index tree-bob collision
2014-01-30 15:10:39 -08:00
Russell Belfer
25babd02a4 Fix checkout NONE to not remove file
If you are checking out NONE, then don't remove.
2014-01-30 11:38:59 -08:00
Russell Belfer
b794cbcdb6 Rename conflict to collision to prevent confusion 2014-01-30 11:38:25 -08:00
Russell Belfer
71ae760116 Force explicit remove of files instead of defer
The checkout code used to defer removal of "blocking" files in
checkouts until the blocked item was actually being written (since
we have already checked that the removing the block is acceptable
according to the update rules).  Unfortunately, this resulted in
an intermediate index state where both the blocking and new items
were in the index which is no longer allowed.  Now we just remove
the blocking item in the first pass so it never needs to coexist.

In cases where there are typechanges, this could result in a bit
more churn of removing and recreating intermediate directories,
but I'm going to assume that is an unusual case and the churn will
not be too costly.
2014-01-30 11:30:16 -08:00
Vicent Marti
32d7abfc20 Merge pull request #2091 from libgit2/rb/cleanups-123
Fix errors with zstream (and a variety of other cleanups)
2014-01-30 10:34:36 -08:00
Russell Belfer
19459b1e29 Defer zstream NUL termination to end
And don't terminate if there isn't space for it (since it's binary
data, it's not worth a reallocation).
2014-01-30 10:23:35 -08:00
Russell Belfer
8606f33bea Expand zstream tests and fix off-by-one error 2014-01-30 10:00:00 -08:00
Russell Belfer
d9b04d78a3 Reorganize zstream API and fix wrap problems
There were some confusing issues mixing up the number of bytes
written to the zstream output buffer with the number of bytes
consumed from the zstream input.  This reorganizes the zstream
API and makes it easier to deflate an arbitrarily large input
while still using a fixed size output.
2014-01-30 09:59:59 -08:00
Russell Belfer
e9d5e5f3d4 Some fixes for Windows x64 warnings 2014-01-30 09:59:59 -08:00
Russell Belfer
3cf11eef17 Misc cleanups 2014-01-30 09:59:59 -08:00
Russell Belfer
c0644c3fbb Make submodule fetchRecurse match other options
This removes the fetchRecurse compiler warnings and makes the
behavior match the other submodule options (i.e. the in-memory
setting can be reset to the on-disk value).
2014-01-30 09:59:59 -08:00
Russell Belfer
5572d2b8a1 Some missing oid to id renames 2014-01-30 09:59:59 -08:00
Vicent Marti
0316d80ac0 Merge pull request #2089 from scunz/cmake_path
We never search for libiconv via pkg-config
2014-01-29 19:10:00 -08:00
Sascha Cunz
4bc94eb5f0 We never search for libiconv via pkg-config
So we actually also never know that we can set a dependency on it in
pkg-config. Instead always give it the -L and -l options.
2014-01-30 03:01:46 +00:00
Vicent Marti
2d3cc3ed01 Merge pull request #2088 from scunz/cmake_path
Fixing #2017 and #2087
2014-01-29 18:49:56 -08:00
Sascha Cunz
6e0ff093fb Find and use a MacPorts version of libiconv. Fixes #2017.
- Add correct -I, -L and -l flags
- Search for libiconv in /opt/local/[include|lib] before in the
  system path. See #2017 for details.
- Give splitted -L and -l arguments to pkg-config
2014-01-30 02:35:09 +00:00
Sascha Cunz
39949f0604 Cleanup FindIconv.cmake
Doesn't change anything. Just removes stuff that was probably missed
to remove when this was imported.
2014-01-30 02:35:09 +00:00
Sascha Cunz
60306450b7 Use relative path to set cmake module path
This has actually no effect on a "normal" build, but allows to use
libgit2 as a part of a larger project via CMake's ADD_SUBDIRECTORY()

Closes #2087
2014-01-30 02:33:51 +00:00
Edward Thomson
0972c59205 Two-phase index merging
When three-way merging indexes, we previously changed each path
as we read them, which would lead to us adding an index entry for
'foo', then removing an index entry for 'foo/file'.  With the new
index requirements, this is not allowed.  Removing entries in the
merged index, then adding them, resolves this.  In the previous
example, we now remove 'foo/file' before adding 'foo'.
2014-01-29 13:15:55 -08:00
Edward Thomson
b747eb1445 Give index_isrch the same semantics as index_srch
In case insensitive index mode, we would stop at a prefixed entry,
treating the provided search key length as a substring, not the
length of the string to match.
2014-01-29 13:15:54 -08:00
Edward Thomson
bae8bea051 More index collision tests 2014-01-29 13:15:53 -08:00
Vicent Marti
1eefd35612 index: Implement folder-file checks 2014-01-29 13:15:52 -08:00
Vicent Marti
53bec813a8 index: Compare with given len 2014-01-29 13:15:51 -08:00
Russell Belfer
95fbedcd8e Add test for blob/tree name collisions in index 2014-01-29 13:15:50 -08:00
Vicent Marti
66af84494c Merge pull request #2086 from ethomson/fixup
Don't strcmp a git_buf, strcmp its char *
2014-01-29 12:57:42 -08:00
Edward Thomson
96f12e709b Don't strcmp a git_buf, strcmp its char * 2014-01-29 12:50:42 -08:00
Vicent Marti
cd4aa602c9 Merge pull request #2083 from arthurschreiber/arthur/add-git_commit_descendant_of
Add `git_commit_descendant_of`.
2014-01-28 10:50:04 -08:00
Arthur Schreiber
e7c16943f4 Add git_graph_descendant_of. 2014-01-28 19:39:14 +01:00
Vicent Marti
a1a9d0bd48 Merge pull request #2066 from libgit2/rb/builtin-diff-drivers
Add built in diff drivers
2014-01-27 15:35:39 -08:00
Russell Belfer
daebb59869 Add PHP tests and fix bug in PHP builtin driver 2014-01-27 14:57:03 -08:00
Russell Belfer
082e82dba5 Update Javascript userdiff driver and tests
Writing a sample Javascript driver pointed out some extra
whitespace handling that needed to be done in the diff driver.
This adds some tests with some sample javascript code that I
pulled off of GitHub just to see what would happen.  Also, to
clean up the userdiff test data, I did a "git gc" and packed
up the test objects.
2014-01-27 11:45:06 -08:00
Russell Belfer
4115987739 Got permission from Gustaf for userdiff patterns 2014-01-27 10:23:55 -08:00
Vicent Marti
93954245e0 Merge pull request #2075 from libgit2/cmn/leftover-oid
Leftover OID -> ID changes
2014-01-27 09:39:36 -08:00
Vicent Marti
46e7fc1853 Merge pull request #2077 from libgit2/cmn/buf-out
Buff up returning strings
2014-01-27 09:36:24 -08:00
Vicent Marti
c90ea3de78 Merge pull request #2078 from linquize/msvc
MSVC doesn't like modern code neither
2014-01-27 09:34:52 -08:00
Vicent Marti
9ff34a533d Merge pull request #2079 from linquize/msvc-blame-example
Make blame example compile on MSVC
2014-01-27 09:34:32 -08:00
Linquize
1664aaaa26 Make blame example compile on MSVC 2014-01-27 22:41:05 +08:00
Linquize
fbc5661ebf MSVC doesn't like modern code neither 2014-01-27 20:52:57 +08:00
Carlos Martín Nieto
66d585c6b3 MSVC doesn't like modern code 2014-01-27 04:58:23 +01:00
Carlos Martín Nieto
bf522e0811 refspec: move to git_buf for outputting strings 2014-01-27 04:44:06 +01:00
Carlos Martín Nieto
e1d7f0035e messsage: use git_buf in prettify()
A lot of the tests were checking for overflow, which we don't have
anymore, so we can remove them.
2014-01-27 04:44:06 +01:00
Carlos Martín Nieto
ee550477d1 config: use git_buf for returning paths
Again, we already did this internally, so simply remove the conversions.
2014-01-27 04:44:05 +01:00
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