Commit Graph

824 Commits

Author SHA1 Message Date
Vicent Marti
06d772d8d4 Merge pull request #2262 from libgit2/rb/fix-ignore-pop
Fix bug popping ignore files during wd iteration
2014-04-14 14:49:01 +02:00
Jacques Germishuys
efaa342cbb Correct C90 warnings 2014-04-11 22:48:42 +02:00
Jacques Germishuys
51297cadb3 Added RFC2822 date format test cases 2014-04-11 21:55:36 +02:00
Russell Belfer
8f7bc6461b Fix bug popping ignore files during wd iteration
There were a couple bugs in popping ignore files during iteration
that could result in incorrect decisions be made and thus ignore
files below the root either not being loaded correctly or not
being popped at the right time.

One bug was an off-by-one in comparing the path of the gitignore
file with the path being exited during iteration.

The second bug was not correctly truncating the path being tracked
during traversal if there were no ignores on the list (i.e. when
you have no .gitignore at the root, but do have some in contained
directories).
2014-04-10 16:33:39 -07:00
Vicent Marti
bcc622934a Merge pull request #2259 from libgit2/vmg/state-cleanup
Rewrite `state-cleanup`
2014-04-09 12:45:49 +02:00
Russell Belfer
eb7e17cc90 Update submodules with parent-tracked content
This updates how libgit2 treats submodule-like directories that
actually have tracked content inside of them.  This is a strange
corner case, but it seems that many people have abortive submodule
setups and then just went ahead and added the files into the
parent repository.  In this case, we should just treat the
submodule as if it was a normal directory.

Libgit2 will still try to skip over real submodules and contained
repositories that do not have tracked files inside them, but this
adds some new handling for cases where the apparently submodule
data is in conflict with the actual list of tracked files.
2014-04-08 14:47:20 -07:00
Vicent Marti
2795fb4ddd Merge pull request #2256 from jacquesg/graph-descendant
Correct grouping of parentheses
2014-04-08 16:37:39 +02:00
Jacques Germishuys
8a8e312792 Added a no path test for git_graph_descendant_of 2014-04-08 16:32:06 +02:00
Edward Thomson
855c66de66 Introduce core.safecrlf handling 2014-04-07 21:09:09 -07:00
Russell Belfer
c813b34550 Fix bug with multiple iconv conversions in one dir
The internal buffer in the `git_path_iconv_t` structure was not
being reset before the calls to `iconv` were made to convert data,
so if there were multiple decomposed Unicode paths in a single
directory, paths after the first one were being appended to the
first instead of treated as independent data.
2014-04-07 11:45:32 -07:00
Jacques Germishuys
c031129510 git_repository_state_cleanup() should remove rebase-merge/, rebase-apply/ and BISECT_LOG 2014-04-07 17:35:28 +02:00
Russell Belfer
c8c91433a8 More ** tests for pattern rules 2014-04-06 10:42:26 -07:00
Russell Belfer
2b6b85f116 Add support for ** matches in ignores
This is an experimental addition to add ** support to fnmatch
pattern matching in libgit2.  It needs more testing.
2014-04-04 17:02:12 -07:00
Vicent Marti
923c84008d Merge pull request #2215 from libgit2/rb/submodule-cache-fixes
Improve submodule cache management
2014-04-04 14:24:08 +02:00
Russell Belfer
eedeeb9e8f Test (and fix) the git_submodule_sync changes
I wrote this stuff a while ago and forgot to write tests.  Wanted
to do so now to wrap up the PR and immediately found problems.
2014-04-03 11:58:51 -07:00
Russell Belfer
18cc7d28c4 Minor code cleanup 2014-04-03 11:29:08 -07:00
Jan Melcher
f2fb4bac68 git_submodule_resolve_url supports relative urls
The base for the relative urls is determined as follows, with descending
priority:

- remote url of HEAD's remote tracking branch
- remote "origin"
- workdir

This follows git.git behaviour
2014-04-03 10:44:08 -07:00
Jan Melcher
12d4ed4de3 Test git_submodule_add_setup with relative url 2014-04-03 10:00:36 -07:00
Vicent Marti
fd61f05ea6 Merge pull request #2238 from libgit2/cmn/upstream-for-unborn
Handle an upstream branch for an unborn one
2014-04-03 09:53:28 +02:00
Vicent Marti
9edc5271e6 Merge pull request #2239 from libgit2/vmg/clar-skip-test
Skip tests on Clar
2014-04-03 09:52:42 +02:00
Carlos Martín Nieto
6f6be8fe41 remote: write tests for cloning from an empty repo
Cloning from an empty repo must set master's upstream to origin's
master, even if neither of them exist.

Fetching from a non-empty origin must then mark the master branch
for-merge. This currently fails.
2014-04-02 20:22:22 +02:00
Vicent Marti
0f65733b08 Clar: skip tests 2014-04-02 18:50:47 +02:00
Vicent Marti
fe23860aac Merge pull request #2230 from anuraggup/revwalk-merge-base
No need to find merge base.
2014-04-02 17:45:25 +02:00
Russell Belfer
ada157b237 Add warning when skipping blame test 2014-04-02 07:45:16 -07:00
Russell Belfer
d1a0900442 Skip blame libgit2 test if not in libgit2 repo
One blame test replies on being run from within the libgit2
repository to leverage having a longer history to play with, but
some bundled versions of libgit2 don't have the whole libgit2
history.  This just skips that test if the repository can't be
opened.
2014-04-01 21:58:48 -07:00
Russell Belfer
a574d584df New tests of status for repo inside repo 2014-04-01 21:32:06 -07:00
Russell Belfer
8f4e5275e4 More tests and fix submodule index refresh
There was a little bug where the submodule cache thought that the
index date was out of date even when it wasn't that was resulting
in some extra scans of index data even when not needed.

Mostly this commit adds a bunch of new tests including adding and
removing submodules in the index and in the HEAD and seeing if we
can automatically pick them up when refreshing.
2014-04-01 16:46:25 -07:00
Russell Belfer
8061d519b3 Remove most submodule reloads from tests
With the new submodule cache validity checks, we generally don't
need to call git_submodule_reload_all to have up-to-date submodule
data.  Some tests are still calling it where I want to actually
test that it can be called safely and doesn't break anything, but
mostly it is not needed.

This also expands some of the existing submodule tests to cover
some variants on the behavior that was already being tested.
2014-04-01 13:24:06 -07:00
Russell Belfer
4ece3e225b Fix submodule accounting for name and path changes
Wrote tests that try adding, removing, and updating the name of
submodules which showed a number of problems with how we account
for changes when incrementally updating the submodule info.  Most
of these issues didn't exist before because reloading would always
blow away the old submodule data.
2014-04-01 12:19:11 -07:00
Russell Belfer
18234b14ad Add efficient git_buf join3 API
There are a few places where we need to join three strings to
assemble a path.  This adds a simple join3 function to avoid the
comparatively expensive join_n (which calls strlen on each string
twice).
2014-04-01 09:45:20 -07:00
Edward Thomson
d67397dd0c Merge pull request #2226 from libgit2/rb/submodule-sorting-fix
Fix submodule sort order during iteration
2014-04-01 09:32:17 -07:00
Vicent Marti
9325460a93 Merge pull request #2206 from libgit2/cmn/inmemory-swap-order
Rename in-memory remote to anonymous and swap url and fetch order
2014-04-01 13:47:44 +02:00
Carlos Martín Nieto
fd536d29c1 remote: rename inmemory to anonymous and swap url and fetch order
The order in this function is the opposite to what
create_with_fetchspec() has, so change this one, as url-then-refspec is
what git does.

As we need to break compilation and the swap doesn't do that, let's take
this opportunity to rename in-memory remotes to anonymous as that's
really what sets them apart.
2014-04-01 13:38:04 +02:00
Edward Thomson
3ab5781601 Merge pull request #2178 from libgit2/rb/fix-short-id
Fix git_odb_short_id and git_odb_exists_prefix bugs
2014-03-31 23:23:32 -07:00
Anurag Gupta
3bc3d79761 No need to find merge base. 2014-03-31 15:15:32 -07:00
Russell Belfer
b76b5d3427 Improve test of submodule name sorting 2014-03-31 13:33:11 -07:00
Edward Thomson
976634c467 Introduce git_merge_head_id 2014-03-31 11:43:38 -05:00
Edward Thomson
ed38bff16c Update clar to 4b75388 2014-03-28 19:15:55 -07:00
Edward Thomson
e0d61c7b1c Sandbox configuration during test runs 2014-03-28 10:39:15 -07:00
Edward Thomson
10be94e9dc Update clar to 587f88a 2014-03-28 10:39:07 -07:00
Russell Belfer
dae8ba6e09 Fix memory leak of test repository object 2014-03-27 15:29:32 -07:00
Russell Belfer
380f864a10 Fix error when submodule path and name differ
When a submodule was inserted with a different path and name, the
return value from khash greater than zero was allowed to propagate
back out to the caller when it should really be zeroed.  This led
to a possible crash when reloading submodules if that was the
first time that submodule data was loaded.
2014-03-26 16:06:21 -07:00
Russell Belfer
22df47cbc5 Fix segfault if gitmodules is invalid
The reload_all call could end up dereferencing a NULL pointer if
there was an error while attempting to load the submodules config
data (i.e. invalid content in the gitmodules file).  This fixes it.
2014-03-26 14:38:26 -07:00
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
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
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
Russell Belfer
6789b7a75d Add buffer to buffer diff and patch APIs
This adds `git_diff_buffers` and `git_patch_from_buffers`.  This
also includes a bunch of internal refactoring to increase the
shared code between these functions and the blob-to-blob and
blob-to-buffer APIs, as well as some higher level assert helpers
in the tests to also remove redundancy.
2014-02-27 14:13:22 -08:00
Ben Straub
1574d3884f Merge pull request #2137 from jru/blame-first-parent
Blame first-parent history
2014-02-26 16:58:20 -05:00
Juan Rubén
0276f0f55b Reset num_parents to 1 only for merge commits
Also, correct test case to account for the boundary flag
2014-02-26 19:25:07 +01:00
Edward Thomson
83634d38be Move system directory cache out of utils 2014-02-24 17:52:38 -08:00
Ben Straub
0d8265c8af Staticize file-local variables 2014-02-24 05:32:05 -08:00
Juan Rubén
9e3b901aeb Add unit test 2014-02-24 00:09:29 +01:00
Russell Belfer
72556cc63b Address PR comments
* Make GIT_INLINE an internal definition so it cannot be used in
  public headers
* Fix language in CONTRIBUTING
* Make index caps API use signed instead of unsigned values
2014-02-20 14:27:10 -08:00
Ben Straub
9bda5fb8c1 Improve error propagation in shallow call 2014-02-18 14:05:30 -08:00
Edward Thomson
2a528bc088 Fix filter test for CRLF->LF issues 2014-02-11 19:05:52 -06:00
Russell Belfer
5d195cf76b Merge pull request #2110 from libgit2/ed/crlf_input
Handle `core.autocrlf=input` when checking out
2014-02-11 15:56:04 -08:00
Carlos Martín Nieto
15284a2c5a refs: move current_id before the reflog parameters
Keep the reflog parameters as the last two, as they're the optional
parameters.
2014-02-10 14:52:28 +01:00
Edward Thomson
9780020b18 Tests for crlf filtering into the repository 2014-02-09 13:45:39 -08:00
Edward Thomson
f77127da12 Tests for core.autocrlf and .gitattributes 2014-02-09 13:45:38 -08:00
Edward Thomson
fb6f4539d1 Close files on file diff failure
Not closing the files on a diff failure ensures that clar
cleanup will fail on win32 because we still have the file open.
2014-02-09 13:45:36 -08:00
Russell Belfer
80c29fe93e Add git_commit_amend API
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit.  As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
2014-02-07 16:17:59 -08:00
Russell Belfer
2d9291943c Merge pull request #2099 from libgit2/bs/more-reflog-stuff
More reflogness
2014-02-07 16:14:17 -08:00
Russell Belfer
57c47af107 Merge pull request #2042 from libgit2/cmn/conditional-ref
refs: conditional ref updates
2014-02-07 16:05:19 -08:00
Russell Belfer
3158e2febe Fix some Windows warnings
This fixes a number of warnings with the Windows 64-bit build
including a test failure in test_repo_message__message where an
invalid pointer to a git_buf was being used.
2014-02-07 15:43:37 -08:00
Vicent Marti
c4ee3b54f8 Merge pull request #2100 from libgit2/rb/update-pqueue
Replace priority queue code with implementation from hashsig
2014-02-07 18:32:06 +01:00
Ben Straub
db55bb73ff Correct default reflog message for git_remote_fetch 2014-02-06 11:18:10 -08:00
Ben Straub
5dae3ffe25 Only run clone-failure test on private repo 2014-02-05 19:27:27 -08:00
Ben Straub
78ee7e81f5 More merge.conflictstyle fixes 2014-02-05 14:10:19 -08:00
Ben Straub
3094102f69 Avoid crash when skipping remote test 2014-02-05 14:05:18 -08:00
Ben Straub
fe45922d77 Fix broken clone test 2014-02-05 13:41:12 -08:00
Ben Straub
a2ce19ca68 Prevent user's merge.conflictstyle from breaking tests 2014-02-05 13:35:26 -08:00
Ben Straub
5c8be32559 Fix a few references to changed function signatures 2014-02-05 13:32:45 -08:00
Ben Straub
0de2c4e3a3 Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuff 2014-02-05 13:15:57 -08:00
Ben Straub
629ba7f105 Merge pull request #2027 from libgit2/rb/only-windows-is-windows
Some tests of paths that can't actually be written to disk
2014-02-05 13:07:46 -08:00
Carlos Martín Nieto
d18209eef9 revwalk: add a test for pushing all references
This used to be broken, let's make sure we don't break this use-case.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
d465e4e980 revwalk: ignore wrong object type in glob pushes
Pushing a whole namespace can cause us to attempt to push non-committish
objects. Catch this situation and special-case it for ignoring this.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
b4ef67d5eb revwalk: add a failing test for pushing "tags"
This shows that pusing a whole namespace can be problematic.
2014-02-05 12:16:37 +01:00
Carlos Martín Nieto
5367ec4b84 refs: add an unconditional delete
Add it under the git_reference_remove() name, letting the user pass the
repo and name, analogous to unconditional setting/creation.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
b7ae71ecf2 refs: catch cases where the ref type has changed
If the type of the on-disk reference has changed, the old value
comparison should fail.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
f44fd59ed7 refs: check the ref's old value when deleting
Recognize when the reference has changed since we loaded it.
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
d6236cf662 refs: add tests for conditional updates 2014-02-05 12:07:56 +01:00
Ben Straub
010cec3ac2 Add reflog params to git_repository_detach_head 2014-02-04 20:50:40 -08:00
Ben Straub
c3ab1e5af4 Add reflog parameters to remote apis
Also added a test for git_remote_fetch.
2014-02-04 20:38:13 -08:00
Ben Straub
491cecfe8c Add reflog parameters to git_push_update_tips 2014-02-04 20:27:44 -08:00
Ben Straub
0adb06065b Fix reflog message when creating commits 2014-02-04 15:32:57 -08:00
Russell Belfer
43709ca878 Fix typo setting sorted flag when reloading index
This fixes a typo I made for setting the sorted flag on the index
after a reload.  That typo didn't actually cause any test failures
so I'm also adding a test that explicitly checks that the index is
correctly sorted after a reload when ignoring case and when not.
2014-02-04 10:33:30 -08:00
Russell Belfer
882c774271 Convert pqueue to just be a git_vector
This updates the git_pqueue to simply be a set of specialized
init/insert/pop functions on a git_vector.

To preserve the pqueue feature of having a fixed size heap, I
converted the "sorted" field in git_vectors to a more general
"flags" field so that pqueue could mix in it's own flag.  This
had a bunch of ramifications because a number of places were
directly looking at the vector "sorted" field - I added a couple
new git_vector helpers (is_sorted, set_sorted) so the specific
representation of this information could be abstracted.
2014-02-04 10:01:37 -08:00
Russell Belfer
af4bc6615d Add some priority queue tests
I forgot that I wrote some tests for the new priority queue code.
2014-02-03 21:04:40 -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
Ben Straub
86746b4b3a Add reset tests for reflog 2014-02-03 15:06:47 -08:00
Ben Straub
eec2761f06 Fix warning 2014-02-03 15:06:32 -08:00
Ben Straub
586be3b889 Add reflog parameters to git_reset 2014-02-03 15:05:55 -08:00
Ben Straub
0d847a3159 Reset helpers: use revparse instead 2014-02-03 14:08:40 -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
Arthur Schreiber
50ad7cc208 Add git_reference_is_note. 2014-02-02 18:20:38 +01:00
Ben Straub
7ac1b89942 Add failing test case 2014-02-01 11:46:15 -08:00
Russell Belfer
7be88b4c4d Update to latest clar 2014-01-31 13:44:09 -08:00
Ben Straub
db092c1955 Allow tests to run without user config 2014-01-30 16:10:18 -08:00