Commit Graph

108 Commits

Author SHA1 Message Date
nulltoken
c9ffa84bde remote: Relax the parsing logic even more
In order to be loaded, a remote needs to be configured with at least a `url` or a `pushurl`.

ENOTFOUND will be returned when trying to git_remote_load() a remote with neither of these entries defined.
2013-08-27 19:31:19 +02:00
nulltoken
ece24ef7c4 remote: Don't parse missing urls as empty strings 2013-08-27 16:57:17 +02:00
Vicent Martí
51a5e13347 Merge pull request #1778 from libgit2/push_tag_to_tag_test
push: handle tag chains correctly
2013-08-16 16:22:37 -07:00
Vicent Martí
40948998ba Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer
Bigger buffer for utf-8 parsing in win32
2013-08-13 11:36:24 -07:00
Brodie Rao
d19bcb3352 odb_pack: handle duplicate objects from different packs
This is based on 24634c6fd0.

This also corrects an issue with error codes being mixed up with the
number of found objects.
2013-08-08 00:41:16 -07:00
Ben Straub
c0c5169352 Add long-file-name branch to test repo 2013-08-07 11:55:39 -07:00
Russell Belfer
c5780abb02 Merge pull request #1765 from arrbee/ambiguous-oids
More tests for ambiguous OIDs across packs
2013-08-05 21:58:48 -07:00
Russell Belfer
437224b4b9 More tests for ambiguous OIDs across packs
The test coverage for ambiguous OIDs was pretty thin.  This adds
a bunch of new objects both in packs, across packs, and loose that
match to 8 characters so that we can test various cases of
ambiguous lookups.
2013-08-05 21:46:32 -07:00
Nikolai Vladimirov
f1af935b89 submodule: check alloc and name presense 2013-08-05 22:00:55 +03:00
Edward Thomson
1c13b0bfdc test that suggests tags arent fully peeled during push 2013-07-12 15:31:55 -05:00
Russell Belfer
7b5c0d1846 Add more tests for git_config_get_multivar
The old tests didn't try failing lookups or lookups across
multiple config files with some having the pattern and some
not having it.
2013-07-09 16:45:23 -07:00
Edward Thomson
f0f2ff9cac test failure when renames produce similar similarities 2013-06-18 09:39:10 -07:00
Edward Thomson
bda3fbb1ac failing unit test for similar renames 2013-06-10 15:16:58 -05:00
Ben Straub
93d8f77fed Improve test failure output 2013-05-23 15:35:50 -07:00
Russell Belfer
99d32707b9 Fix refdb iteration early termination bug
There was a problem found in the Rugged test suite where the
refdb_fs_backend__next function could exit too early in some
very specific hashing patterns for packed refs.  This ports
the Rugged test to libgit2 and then fixes the bug.
2013-05-11 06:42:25 -07:00
Jeff King
7edb9071da refdb_fs: do not require peeled packed refs to be tags
Older versions of git would only write peeled entries for
items under refs/tags/. Newer versions will write them for
all refs, and we should be prepared to handle that.
2013-05-02 11:07:20 -04:00
Edward Thomson
bec65a5e99 merge! 2013-04-30 15:31:31 -05:00
nulltoken
24cb87e2a6 tag: Fix parsing when no tagger nor message 2013-03-31 14:36:51 +02:00
Sven Strickroth
b8acb775e2 Added some tests for issue #1397
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-03-25 14:03:16 -07:00
Russell Belfer
65025cb893 Three submodule status bug fixes
1. Fix sort order problem with submodules where "mod" was sorting
   after "mod-plus" because they were being sorted as "mod/" and
   "mod-plus/".  This involved pushing the "contains a .git entry"
   test significantly lower in the stack.
2. Reinstate behavior that a directory which contains a .git entry
   will be treated as a submodule during iteration even if it is
   not yet added to the .gitmodules.
3. Now that any directory containing .git is reported as submodule,
   we have to be more careful checking for GIT_EEXISTS when we
   do a submodule lookup, because that is the error code that is
   returned by git_submodule_lookup when you try to look up a
   directory containing .git that has no record in gitmodules or
   the index.
2013-03-18 17:24:13 -07:00
Russell Belfer
169dc61607 Make iterator APIs consistent with standards
The iterator APIs are not currently consistent with the parameter
ordering of the rest of the codebase.  This rearranges the order
of parameters, simplifies the naming of a number of functions, and
makes somewhat better use of macros internally to clean up the
iterator code.

This also expands the test coverage of iterator functionality,
making sure that case sensitive range-limited iteration works
correctly.
2013-03-06 16:52:01 -08:00
Vicent Martí
b72f5d4038 Merge pull request #1369 from arrbee/repo-init-template-hooks
More tests (and fixes) for initializing repo from template
2013-03-05 15:35:28 -08:00
Vicent Martí
e68e33f33d Merge pull request #1233 from arrbee/file-similarity-metric
Add file similarity scoring to diff rename/copy detection
2013-02-27 14:50:32 -08:00
Russell Belfer
3c42e4ef74 Fix initialization of repo directories
When PR #1359 removed the hooks from the test resources/template
directory, it made me realize that the tests for
git_repository_init_ext using templates must be pretty shabby
because we could not have been testing if the hooks were getting
created correctly.

So, this started with me recreating a couple of hooks, including
a sample and symlink, and adding tests that they got created
correctly in the various circumstances, including with the SHARED
modes, etc.  Unfortunately this uncovered some issues with how
directories and symlinks were copied and chmod'ed.  Also, there
was a FIXME in the code related to the chmod behavior as well.

Going back over the directory creation logic for setting up a
repository, I found it was a little difficult to read and could
result in creating and/or chmod'ing directories that the user
almost certainly didn't intend.

So that let to this work which makes repo initialization much
more careful (and hopefully easier to follow).  It required a
couple of extensions / changes to core fileops utilities, but I
also think those are for the better, at least for git_futils_cp_r
in terms of being careful about what actions it takes.
2013-02-26 11:43:14 -08:00
Martin Woodward
fc6c5b5001 Remove sample hook files
Getting rid of sample hook files from test repos as they just take up
space with no value.
2013-02-25 17:03:05 +00:00
Russell Belfer
d4b747c1cb Add diff rename tests with partial similarity
This adds some new tests that actually exercise the similarity
metric between files to detect renames, copies, and split modified
files that are too heavily modified.

There is still more testing to do - these tests are just partially
covering the cases.

There is also one bug fix in this where a change set with only
MODIFY being broken into ADD/DELETE (due to low self-similarity)
without any additional RENAMED entries would end up not processing
the split requests (because the num_rewrites counter got reset).
2013-02-21 16:44:44 -08:00
Vicent Martí
fcd7733ded Merge pull request #1318 from nulltoken/topic/diff-tree-coverage
Topic/diff tree coverage
2013-02-14 12:49:46 -08:00
Russell Belfer
c2c0874de2 More diff tests with binary data 2013-02-11 14:45:46 -08:00
nulltoken
f093cd62c4 Add unsymlinked.git test repository 2013-02-06 16:03:06 +01:00
Scott J. Goldman
cb35094be3 Allow peeled references without trailing newline at end of file
Also ammends one of the tag tests to make sure it's working.
2013-01-22 15:49:51 -08:00
Edward Thomson
271680d7f4 add a git config, don't run crlf tests on non-win32 2013-01-17 18:18:44 -06:00
Edward Thomson
6e959708e5 cache should contain on-disk (filtered) file size 2013-01-17 15:17:32 -06:00
Sebastian Bauer
72719e7333 Altered the description of the template.
Before, it was identical to the default template making it difficult
to check, if the proper template was copied an external template
test.
2013-01-13 12:26:52 +01:00
Philip Kelley
359316b5d3 Merge pull request #1215 from phkelley/binaryunicode
Add a failing test for CRLF filters
2013-01-11 17:16:55 -08:00
Philip Kelley
dd6367e37e Fix up binaryunicode test repo 2013-01-11 20:07:52 -05:00
Philip Kelley
fcc48d1fce Add a failing test for autocrlf filters 2013-01-09 12:37:22 -05:00
Michael Schubert
abeefbbe18 push: properly handle tags
Currently, push doesn't really handle tags when queueing objects. Fix
it.
2013-01-09 17:05:21 +01:00
Carlos Martín Nieto
f1c75b94a1 tree: relax the filemode parser
There are many different broken filemodes in the wild so we need to
protect against them and give something useful up the chain. Don't
fail when reading a tree from the ODB but normalize the mode as best
we can.

As 664 is no longer a mode that we consider to be valid and gets
normalized to 644, we can stop accepting it in the treebuilder. The
library won't expose it to the user, so any invalid modes are a bug.
2012-12-07 16:59:18 +01:00
Russell Belfer
f684970a10 Merge pull request #1108 from libgit2/ahead-behind-count
Add API to calculate ahead/behind count
2012-11-29 22:53:34 -08:00
Vicent Martí
f1e5c506b2 Merge pull request #1110 from libgit2/features/push_rebased
Push! By schu, phkelley, and congyiwu
2012-11-29 12:18:05 -08:00
Philip Kelley
36c730daa0 Remove more sample hooks from test repo for push 2012-11-29 10:34:16 -05:00
Philip Kelley
3238ee3e07 Remove sample hooks from test repo for push 2012-11-29 08:37:32 -05:00
Scott J. Goldman
0d9e0323a5 Add the ahead/behind test that Carlos suggested
Adds a repo with a more complex topology to test the ahead-behind
count.
2012-11-28 18:54:57 -08:00
nulltoken
37849a8ec3 tracking: fix retrieval of the tracking ref of branch with empty merge and/or remote entry 2012-11-28 20:00:07 +01:00
Philip Kelley
613d5eb939 Push! By schu, phkelley, and congyiwu, et al 2012-11-28 11:42:37 -05:00
Carlos Martín Nieto
47db054df0 config: distinguish between a lone variable name and one without rhs
'[section] variable' and '[section] variable =' behave differently
when parsed as booleans, so we need to store that distinction
internally.
2012-11-13 13:53:41 -08:00
Vicent Marti
19c044a17d Merge remote-tracking branch 'ben/local-transport' into development 2012-11-12 14:23:17 -08:00
Ben Straub
11fabe73a0 Local fetch: add tests 2012-11-09 10:33:10 -08:00
delanne
bcad677ba8 - Update 'tests-clar/resources/config/config11' in order to reproduce the invalidread with the unittest (just added some \n at the end of the file)
- Fix config_file.c
2012-11-08 12:28:21 +01:00
Vicent Martí
8ff2b0c759 Merge pull request #1039 from erikvanzijst/erik/tag_without_message
Correctly parse tags lacking a description
2012-11-07 16:30:55 -08:00