Commit Graph

6779 Commits

Author SHA1 Message Date
Edward Thomson
97f3462ae6 git_merge_status -> git_merge_analysis 2014-03-20 09:25:10 -07:00
Edward Thomson
d9fdee6e4c Remove git_merge_result as it's now unnecessary 2014-03-20 09:25:09 -07:00
Edward Thomson
5aa2ac6de1 Update git_merge_tree_opts to git_merge_options 2014-03-20 09:25:08 -07:00
Edward Thomson
02105a27f0 Change signature of git_merge to take merge and checkout opts 2014-03-20 09:25:07 -07:00
Edward Thomson
1c0b6a38ba Remove fastforward / uptodate from git_merge 2014-03-20 09:25:06 -07:00
Edward Thomson
ccb308273a Add git_merge_status to provide info about an upcoming merge 2014-03-20 09:25:06 -07:00
Edward Thomson
05d47768ca Introduce git_merge_file for consumers 2014-03-20 09:25:05 -07:00
Vicent Marti
f29e48995e Merge pull request #2193 from libgit2/cmn/reflog-HEAD
Reflog all the way
2014-03-19 19:51:57 +01:00
Carlos Martín Nieto
99797c96cd reflog: handle symref chains
Given HEAD -> master -> foo, when updating foo's reflog we should also
update HEAD's, as it's considered the current branch.
2014-03-19 18:14:35 +01:00
Carlos Martín Nieto
6aaae94a70 reflog: handle the birth of a branch
The reflog append function was overzealous in its checking. When passed
an old and new ids, it should not do any checking, but just serialize
the data to a reflog entry.
2014-03-19 16:52:20 +01:00
Carlos Martín Nieto
afc57eb48f reflog: simplify the append logic
Remove some duplicated logic.
2014-03-19 15:54:33 +01:00
Carlos Martín Nieto
1afe140043 refdb: don't update when there's no need
If the caller wants to update a ref to point to the same target as it
currently has, we should return early and avoid writing to the reflog.
2014-03-19 15:54:33 +01:00
Carlos Martín Nieto
bac95e6e1e reflog: more comprehensive HEAD tests
The existing ones lack checking zeroed ids when switching back from an
unborn branch as well as what happens when detaching.

The reflog appending function mistakenly wrote zeros when dealing with a
detached HEAD. This explicitly checks for those situations and fixes
them.
2014-03-18 19:58:52 +01:00
Vicent Marti
5dd7d2432e Merge pull request #2189 from Aimeast/octopus
Implement git_merge_base_octopus
2014-03-18 16:23:51 +01:00
Aimeast
0aee025bef Implement git_merge_base_octopus 2014-03-18 22:31:14 +08:00
Vicent Marti
dd4c6962d7 Merge pull request #2192 from phkelley/development
Seamless support for NTLM/Kerberos auth on Windows
2014-03-18 15:25:43 +01:00
Philip Kelley
1392418ea8 Seamless support for NTLM/Kerberos auth on Windows 2014-03-18 10:24:23 -04:00
Vicent Marti
a7af1f7dd6 Merge pull request #2190 from libgit2/cmn/current-branch-reflog
refs: append to the HEAD reflog when updating the current branch
2014-03-18 14:46:42 +01:00
Russell Belfer
dd5e74e59a Merge pull request #2191 from libgit2/cmn/projects
Add a few projects to the list
2014-03-17 15:57:25 -07:00
Carlos Martín Nieto
5c8096c53c Add a few projects to the list 2014-03-17 19:44:07 +01:00
Carlos Martín Nieto
4b7e1b9e92 refs: append to the HEAD reflog when updating the current branch
When we update the current branch, we must also append to HEAD's reflog
to keep them in sync.

This is a bit of a hack, but as git.git says, it covers 100% of
default cases.
2014-03-17 17:47:47 +01:00
Carlos Martín Nieto
cb562c3fb3 repo: remove test which deletes HEAD
This is not something anybody would ever do; removing HEAD makes the
.git/ directory no longer be a repository, so we wouldn't be expected to
handle such a situation.
2014-03-17 17:47:47 +01:00
Carlos Martín Nieto
853b1407c0 branch: constness fixes 2014-03-17 17:47:46 +01:00
Carlos Martín Nieto
2b40390f22 refs: fix copy-paste doc error 2014-03-13 15:54:53 +01:00
Edward Thomson
e59e712f64 Merge pull request #2184 from libgit2/rb/fix-revwalk-order-regression
Fix pqueue sort boundary condition bug
2014-03-12 12:05:35 -07:00
Russell Belfer
5302a88538 Fix pqueue sort boundary condition bug
If the pqueue comparison fn returned just 0 or 1 (think "a<b")
then the sort order of returned items could be wrong because there
was a "< 0" that really needed to be "<= 0".  Yikes!!!
2014-03-12 11:21:55 -07:00
Jiri Pospisil
eb46fb2ba9 Add failing test for git_object_short_id 2014-03-10 11:35:14 -07:00
Russell Belfer
8949907887 Fix a number of git_odb_exists_prefix bugs
The git_odb_exists_prefix API was not dealing correctly when a
later backend returned GIT_ENOTFOUND even if an earlier backend
had found the object.

Additionally, the unit tests were not properly exercising the API
and had a couple mistakes in checking the results.

Lastly, since the backends are not expected to behavior correctly
unless all bytes of the short id are zero except for the prefix,
this makes the ODB prefix APIs explicitly clear out the extra
bytes so the user doesn't have to be as careful.
2014-03-10 11:34:50 -07:00
Carlos Martín Nieto
9af14886a9 MSVC is silly 2014-03-10 18:20:47 +01:00
Vicent Marti
fc78488b3d Merge pull request #2175 from Yogu/submodule-resolve-url
Add git_submodule_resolve_url()
2014-03-10 18:16:56 +01:00
Jan Melcher
52fba18f4e Add git_submodule_resolve_url() 2014-03-10 18:16:10 +01:00
Paul Betts
4a8692f633 Merge pull request #2177 from shiftkey/typo-fix
corrected typo in error message
2014-03-09 21:07:18 -07:00
Brendan Forster
0782c89ed5 corrected typo in error message 2014-03-10 14:40:07 +11:00
Vicent Marti
6de018bbf1 Merge pull request #2170 from ethomson/clar
Update clar to e1990d6
2014-03-07 20:00:20 +01:00
Edward Thomson
dd954a3735 Update clar to e1990d6 2014-03-07 10:53:00 -08:00
Vicent Marti
041cd4a23f Merge pull request #2028 from libgit2/options-names
Rename options structures
2014-03-07 19:02:58 +01:00
Russell Belfer
5a6de908f6 Merge pull request #2153 from mekishizufu/tag_example
Add a tag example
2014-03-07 09:13:43 -08:00
Vicent Marti
628edd6b1b Merge pull request #2167 from mekishizufu/memory_access_fixes
Fun with memory access
2014-03-07 16:26:58 +01:00
Vicent Marti
0d95f6ec76 Merge pull request #2169 from libgit2/valgrind
Plug leaks
2014-03-07 16:26:51 +01:00
Carlos Martín Nieto
ae32c54e58 Plug a few leaks in the tests 2014-03-07 16:03:15 +01:00
Carlos Martín Nieto
a07b169834 branch: fix leak when checking against HEAD
We look up a reference in order to figure out if it's the current
branch, which we need to free once we're done with the check.

As a bonus, only perform the check when we're passed the force flag, as
it's a useless check otherwise.
2014-03-07 16:03:10 +01:00
Carlos Martín Nieto
7c1ee212b7 commit: simplify and correct refcounting in nth_gen_ancestor
We can make use of git_object_dup to use refcounting instead of pointer
comparison to make sure we don't free the caller's object.

This also lets us simplify the case for '~0' which is now just an
assignment instead of looking up the object we have at hand.
2014-03-07 16:03:10 +01:00
Carlos Martín Nieto
5187b609ba local transport: catch double-opens
Combinations of connect + fetch can call local_open multiple
times. Detect this and skip the initialization stage.
2014-03-07 16:03:10 +01:00
Jiri Pospisil
79aa03020d blame: Fix compare function's data types
Previously the hunk_byfinalline_search_cmp function was called with different
data types (size_t and uint32_t) for the key argument but expected only the
former resulting in an invalid memory access when passed the latter on a 64 bit
machine.

The following patch makes sure that the function is called and works with the
same type (size_t).
2014-03-07 15:52:34 +01:00
Jiri Pospisil
00258cc0b6 git_oid_fromstrn: Simplify the implementation and fix memory access issues 2014-03-07 15:52:27 +01:00
Vicent Marti
c81e4adfd7 Merge pull request #2168 from ethomson/clar
Update clar to a0b00f0
2014-03-07 14:00:59 +01:00
Edward Thomson
806571f352 Update clar to a0b00f0 2014-03-07 00:28:18 -08:00
Ben Straub
aa17c3c63c git_revert_opts -> git_revert_options 2014-03-06 09:44:52 -08:00
Ben Straub
6affd71f33 git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
Carlos Martín Nieto
8e52472037 tests: MSVC compat
MSVC doesn't like declaring variables in the middle of a block, so make
sure we only declare variables at the beginning of a block.
2014-03-06 16:56:46 +01:00