Carlos Martín Nieto
f8621dde40
refs: factor out old value comparison
...
We will reuse this later for deletion.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
878fb66f57
refs: bring conditional symbolic updates to the frontend
...
Bring the race detection goodness to symbolic references as well.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
911236619b
refdb: add conditional symbolic updates
...
Add a parameter to the backend to allow checking for the old symbolic
target.
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
d6236cf662
refs: add tests for conditional updates
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
1202c7eaa6
refs: fix leak on successful update
...
Free the old ref even on success.
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
fc4728e3e2
refs: return GIT_EMODIFIED if the ref target moved
...
In case we loose the race to update the reference, return GIT_EMODIFIED
to let the user distinguish it from other types of errors.
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
5d96fe8828
refs: changes from feedback
...
Change the name to _matching() intead of _if(), and force _set_target()
to be a conditional update. If the user doesn't care about the old
value, they should use git_reference_create().
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
9b148098e6
refs: conditional ref updates
...
Allow updating references if the old value matches the given one.
2014-02-05 12:07:56 +01:00
Vicent Marti
7369ea8075
Merge pull request #2096 from ethomson/merge
...
Corrections for merge working directory validation
2014-02-04 05:57:25 -08:00
Edward Thomson
dbfd83bc65
Remove unused pointer assignment
2014-02-03 19:56:34 -08:00
Edward Thomson
c0b10c25e0
Merge wd validation tests against index not HEAD
...
Validating the workdir should not compare HEAD to working
directory - this is both inefficient (as it ignores the cache)
and incorrect. If we had legitimately allowed changes in the
index (identical to the merge result) then comparing HEAD to
workdir would reject these changes as different. Further, this
will identify files that were filtered strangely as modified,
while testing with the cache would prevent this.
Also, it's stupid slow.
2014-02-03 19:56:34 -08:00
Edward Thomson
bb13d39162
Test that emulates a strange filter implementation
2014-02-03 19:56:34 -08:00
Edward Thomson
16eb8b7c06
Tests merging staged files identical to result
2014-02-03 19:56:34 -08:00
Edward Thomson
b60149eced
Tests merge when changes exist in workdir/index
2014-02-03 19:56:33 -08:00
Vicent Marti
3b6a5bac20
Merge pull request #2095 from libgit2/update-head-reflog
...
Correct "new" id for reattached-HEAD reflog entry
2014-02-03 10:36:04 -08:00
Vicent Marti
0b4d86af90
Merge pull request #2098 from arthurschreiber/arthur/add-git_reference_is_note
...
Add `git_reference_is_note`.
2014-02-02 10:44:13 -08:00
Arthur Schreiber
50ad7cc208
Add git_reference_is_note
.
2014-02-02 18:20:38 +01:00
Ben Straub
7f058b8668
Check for errors when dereferencing symbolic refs
2014-02-01 19:31:26 -08:00
Ben Straub
ee8e6afda9
Reflog: correct "new" id for reattaching HEAD
2014-02-01 11:46:44 -08:00
Ben Straub
7ac1b89942
Add failing test case
2014-02-01 11:46:15 -08:00
Vicent Marti
40e10630cf
Merge pull request #2092 from libgit2/rb/update-clar
...
Update to latest clar
2014-01-31 13:57:41 -08:00
Russell Belfer
7be88b4c4d
Update to latest clar
2014-01-31 13:44:09 -08:00
Vicent Marti
f9500b4524
Merge pull request #2081 from libgit2/bs/reflog
...
Reflog completionism
2014-01-31 09:46:40 -08:00
Ben Straub
db092c1955
Allow tests to run without user config
2014-01-30 16:10:18 -08:00
Ben Straub
a1710a28f6
Enhance testing of signature parameters
2014-01-30 15:53:52 -08:00
Ben Straub
a1b07dca7d
Document branch-creation reflog better
2014-01-30 15:53:52 -08:00
Ben Straub
59bb1126e0
Provide good default reflog messages in branch api
2014-01-30 15:53:52 -08:00
Ben Straub
e871d89b28
Ensure moving a branch updates the reflog
2014-01-30 15:52:14 -08:00
Ben Straub
ccf6ce5c89
Ensure renaming a reference updates the reflog
2014-01-30 15:52:13 -08:00
Ben Straub
540c1809f4
Add reflog parameters to git_branch_move
2014-01-30 15:52:13 -08:00
Ben Straub
48110f67e4
Deleting a branch deletes its reflog
2014-01-30 15:52:13 -08:00
Ben Straub
1cc974ab62
Augment clone API with reflog parameters
2014-01-30 15:52:13 -08:00
Ben Straub
b31ebfbc66
Add reflog params to git_branch_create
2014-01-30 15:52:13 -08:00
Ben Straub
67c4716f74
Add passing reflog tests
2014-01-30 15:51:00 -08:00
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