Edward Thomson
2b848e47c1
Decorate unused params as unused in revwalk::hidecb tests
2014-03-26 12:33:37 -05:00
Vicent Marti
dc7efa1aef
Merge pull request #2204 from libgit2/rb/submodule-reference-counting
...
Make submodules externally refcounted
2014-03-26 18:29:34 +01:00
Vicent Marti
77b699e0da
Merge pull request #2205 from libgit2/rb/submodule-untracked-vs-ignored
...
Update behavior for untracked contained repositories
2014-03-26 10:29:11 +01:00
Edward Thomson
f2f2d97f1e
Test for giterr_capture
2014-03-25 21:54:41 -07:00
Russell Belfer
d3bc95fd66
Update behavior for untracked sub-repos
...
When a directory containing a .git directory (or even just a plain
gitlink) was found, libgit2 was going out of its way to treat it
specially. This seemed like it was necessary because the diff
code was not originally emulating Git's behavior for untracked
directories correctly (i.e. scanning for ignored vs untracked items
inside). Now that libgit2 diff mimics Git's untracked directory
behavior, the special handling for contained Git repos is actually
incorrect and this commit rips it out.
2014-03-25 12:37:05 -07:00
Edward Thomson
451aaf866a
Merge pull request #2181 from anuraggup/hide_cb
...
Callback function to hide commit and its parents in revision walker
2014-03-25 10:33:18 -07:00
Russell Belfer
a15c7802c8
Make submodules externally refcounted
...
`git_submodule` objects were already refcounted internally in case
the submodule name was different from the path at which it was
stored. This makes that refcounting externally used as well, so
`git_submodule_lookup` and `git_submodule_add_setup` return an
object that requires a `git_submodule_free` when done.
2014-03-25 09:14:48 -07:00
Anurag Gupta
34ffe22344
Modified test for revwalk_hidecb
2014-03-24 11:21:01 -07:00
Anurag Gupta
7ca1584b47
Conforming to libgit2 coding style.
2014-03-24 11:20:31 -07:00
Anurag Gupta
3a666071d9
Unit Tests for hide_cb in revwalk
2014-03-24 11:20:13 -07:00
Edward Thomson
fdc54eb2fb
env test needs to deref git_buf's ptr
2014-03-24 10:56:11 -07:00
Vicent Marti
85a41fc4bf
Merge pull request #2183 from ethomson/merge_refactor
...
Refactor the `git_merge` API
2014-03-24 18:09:13 +01:00
Carlos Martín Nieto
42dee8ecd7
settings: use git_buf for returning strings
...
This survived the last round of culling, as the signature is only in the
comments.
2014-03-24 13:21:51 +01:00
Carlos Martín Nieto
8350437112
reflog: follow core.logallrefupdates
...
On bare by default, or when core.logallrefupdates is false, we must not
write the reflog.
2014-03-20 19:18:49 +01:00
Edward Thomson
58c2b1c421
UNBORN implies FAST_FORWARD
2014-03-20 09:35:22 -07:00
Edward Thomson
ac584fcfd3
Introduce GIT_MERGE_ANALYSIS_UNBORN
2014-03-20 09:25:11 -07:00
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
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
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
Aimeast
0aee025bef
Implement git_merge_base_octopus
2014-03-18 22:31:14 +08: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
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
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
Carlos Martín Nieto
ae32c54e58
Plug a few leaks in the tests
2014-03-07 16:03:15 +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
Matthew Bowen
b9f819978c
Added function-based initializers for every options struct.
...
The basic structure of each function is courtesy of arrbee.
2014-03-05 21:49:23 -05:00
Vicent Marti
a064dc2d0b
Merge pull request #2159 from libgit2/rb/odb-exists-prefix
...
Add ODB API to check for existence by prefix and object id shortener
2014-03-06 00:47:05 +01:00
Vicent Marti
967d3f2e3e
Merge pull request #2163 from ethomson/nobackend_odb_write
...
ODB writing fails gracefully when unsupported
2014-03-05 21:06:59 +01:00
Edward Thomson
7bd2f40154
ODB writing fails gracefully when unsupported
...
If no ODB backends support writing, we should fail gracefully.
2014-03-05 11:35:47 -08:00
Russell Belfer
13f7ecd7b9
Add git_object_short_id API to get short id string
...
This finds a short id string that will unambiguously select the
given object, starting with the core.abbrev length (usually 7)
and growing until it is no longer ambiguous.
2014-03-04 16:23:28 -08:00
Russell Belfer
f5753999e4
Add exists_prefix to ODB backend and ODB API
2014-03-04 15:34:23 -08:00
Jacques Germishuys
4636ca9391
Remove ignored files from the working directory if they were stashed
2014-03-04 12:22:27 +02:00
Matthias Bartelmeß
d113791d8f
Added a test, that fails for #2133
2014-03-03 16:10:29 +01:00
Vicent Marti
ebb3c506fd
features: Rename _HAS_
to _FEATURE_
2014-03-03 12:40:25 +01:00
Vicent Marti
c9f5298b0e
caps: Rename to features to avoid confusion
2014-03-03 12:10:36 +01:00
Ben Straub
494be429ad
Merge pull request #2144 from linquize/branch-f-current
...
Do not allow git_branch_create() to force update branch
2014-03-02 09:00:00 -06:00
Linquize
1d08b72e4f
Add unit test to show git_branch_create() fails if attempt to force create current branch
2014-03-02 19:14:20 +08:00