Commit Graph

3381 Commits

Author SHA1 Message Date
Philip Kelley
9e37305aad Merge pull request #984 from arrbee/fix-fnmatch-and-ignore
Fix single file ignores
2012-10-16 08:34:28 -07:00
Philip Kelley
ebb867558e Merge pull request #985 from nulltoken/fix/leaks
test: fix some memory leaks
2012-10-15 15:58:53 -07:00
nulltoken
add5efe7e9 test: fix some memory leaks 2012-10-16 00:49:05 +02:00
Ben Straub
71b79a0aab Merge pull request #982 from nulltoken/clone/no-checkout
clone: Explicit support of no-checkout option
2012-10-15 15:24:50 -07:00
Russell Belfer
52032ae536 Fix single-file ignore checks
To answer if a single given file should be ignored, the path to
that file has to be processed progressively checking that there
are no intermediate ignored directories in getting to the file
in question.  This enables that, fixing the broken old behavior,
and adds tests to exercise various ignore situations.
2012-10-15 12:54:46 -07:00
Russell Belfer
d5a5191067 Import DOS fix for fnmatch
Because fnmatch uses recursion, there were some input sequences
that cause seriously degenerate behavior.  This imports a fix
that imposes a max recursion limiter to avoid the worst of it.
2012-10-15 12:54:46 -07:00
Russell Belfer
824d5e4d26 Always use internal fnmatch, not system 2012-10-15 12:54:46 -07:00
Ben Straub
1c3acf148b Merge pull request #978 from nulltoken/fix/reset-hard
reset: prevent hard reset in a bare repository
2012-10-15 12:02:20 -07:00
nulltoken
68206c54bf test: fix some memory leaks 2012-10-15 20:41:43 +02:00
nulltoken
fa5d94a0d4 reset: prevent hard reset in a bare repository 2012-10-15 20:41:42 +02:00
nulltoken
c4f68b3202 clone: fix detection of remote HEAD 2012-10-15 20:40:37 +02:00
nulltoken
4d968f134b clone: Explicit support of no-checkout option 2012-10-15 20:40:37 +02:00
Vicent Martí
1ddc537c77 Merge pull request #969 from ben/network_category
Test category for live network tests
2012-10-15 10:56:47 -07:00
Ben Straub
86a2da6e8a Clone: use libgit2's test repos 2012-10-15 10:48:17 -07:00
Ben Straub
65415ea275 Tests: add "network" category
Split the clone tests into network and no-network suites.
2012-10-15 10:48:17 -07:00
Carlos Martín Nieto
7ae5ab5696 Fix leak in the tests
Also introduce the slective ref trimming promised but also missed in
the previous commit.
2012-10-15 16:35:10 +02:00
Carlos Martín Nieto
47f44b6ee4 refs: loosen the OID parsing
We used to require loose references to contain only an OID (possibly
after trimming the string). This is however not enough for letting us
lookup FETCH_HEAD, which can have a lot of content after the initial
OID.

Change the parsing rules so that a loose refernce must e at least 40
bytes long and the 41st (if it's there) must be accepted by
isspace(3). This makes the trim unnecessary, so only do it for
symrefs. This fixes #977.
2012-10-15 14:00:19 +02:00
Philip Kelley
9d9288f417 Fix buffer overrun in git_buf_put_base64 2012-10-14 12:29:05 -04:00
Ben Straub
80a6e86bb6 Merge pull request #974 from nulltoken/EEXISTS
Enforce returning of EEXISTS when trying to overwrite a reference
2012-10-11 15:45:26 -07:00
Vicent Martí
26ddcfa4c4 Merge pull request #973 from AndrejMitrovic/DBinding
Add link to D libgit2 bindings.
2012-10-11 09:25:15 -07:00
Andrej Mitrovic
26127ea764 Add link to D libgit2 bindings. 2012-10-11 18:22:00 +02:00
nulltoken
b73200c1ed tags: cover EEXISTS propagation upon creation 2012-10-11 14:15:40 +02:00
nulltoken
6251de1d17 branches: cover EEXISTS propagation upon moving 2012-10-11 14:09:27 +02:00
nulltoken
62993b6158 branches: propagate EEXISTS upon creation 2012-10-11 14:08:32 +02:00
Paul Thompson
b46708aaf9 Separated git_strarray from common.h. Added doxy comments. 2012-10-11 23:04:08 +11:00
nulltoken
3548fcf562 refs: propagate EEXISTS upon renaming 2012-10-11 14:00:26 +02:00
Carlos Martín Nieto
a75770febc tests: add a test for tag autofollow behaviour
Also tell ctest and valgrind to run libgit2_clar with '-iall' so we
run the network tests in travis.
2012-10-11 00:19:54 +02:00
Vicent Martí
9206976fc7 Merge pull request #971 from arrbee/base64-encoder
Add git_buf_put_base64 to buffer API
2012-10-10 15:00:32 -07:00
Carlos Martín Nieto
aeba5e175a http: don't discard the HEAD ref
The fix for fetching from empty repositories (22935b06d protocol:
don't store flushes; 2012-10-07) forgot to take into account the
deletion of the flush pkt in the HTTP transport. As a result, the HEAD
ref advertisement where we detect the remote's capabilities was
deleted instead. Fix this.
2012-10-10 23:59:16 +02:00
Russell Belfer
2d3579bea6 Add git_buf_put_base64 to buffer API 2012-10-10 14:54:31 -07:00
Russell Belfer
8ea05f3f8f Fix clar issue 2012-10-09 15:25:58 -07:00
Russell Belfer
0bc47b6339 Update to latest clar 2012-10-09 15:13:00 -07:00
Russell Belfer
fe67e404da Move enum comments next to actual values 2012-10-09 14:35:24 -07:00
Vicent Martí
2306ba1084 Merge pull request #803 from schu/gsoc-pack-objects
[GSoC] RFC: pack objects
2012-10-09 13:34:40 -07:00
Michael Schubert
0cf49e1017 fixup! gsoc-pack-objects WIP
Use khash instead of git.git's hashing algorithm.
2012-10-09 21:50:04 +02:00
Michael Schubert
0a32dca5ec gsoc-pack-objects WIP 2012-10-09 21:28:31 +02:00
Michael Schubert
ec1d42b7d5 Add diff-delta code from git.git 2012-10-09 21:28:31 +02:00
Michael Schubert
e3f8d58d12 indexer: do not require absolute path 2012-10-09 21:28:31 +02:00
Michael Schubert
fa16a6ecc4 Enable pthread condition vars 2012-10-09 21:28:31 +02:00
Michael Schubert
2f05339e3e Add git_tag_foreach 2012-10-09 21:28:31 +02:00
Michael Schubert
edca6c8fed git_odb_object_free: don't segfault w/ arg == NULL 2012-10-09 21:28:31 +02:00
Michael Schubert
4bc1a30f13 util: add git__compress() 2012-10-09 21:28:31 +02:00
Russell Belfer
0d64bef941 Add complex checkout test and then fix checkout
This started as a complex new test for checkout going through the
"typechanges" test repository, but that revealed numerous issues
with checkout, including:

* complete failure with submodules
* failure to create blobs with exec bits
* problems when replacing a tree with a blob because the tree
  "example/" sorts after the blob "example" so the delete was
  being processed after the single file blob was created

This fixes most of those problems and includes a number of other
minor changes that made it easier to do that, including improving
the TYPECHANGE support in diff/status, etc.
2012-10-09 11:59:34 -07:00
Russell Belfer
f3a04e0f49 Test data with lots of type changes 2012-10-09 11:54:02 -07:00
Russell Belfer
95f5f1e63a Cleanup TYPECHANGE support
This is just some cleanup code, rearranging some of the checkout
code where TYPECHANGE support was added and adding some comments
to the diff header regarding the constants.
2012-10-09 11:54:01 -07:00
Russell Belfer
fbec2fb991 Fix checkout to know about TYPECHANGE diffs 2012-10-09 11:54:01 -07:00
Russell Belfer
bc16fd3ebf Introduce status/diff TYPECHANGE flags
When I wrote the diff code, I based it on core git's diff output
which tends to split a type change into an add and a delete.  But
core git's status has the notion of a T (typechange) flag for a
file.  This introduces that into our status APIs and modifies the
diff code so it can be forced to not split type changes.
2012-10-09 11:54:01 -07:00
Russell Belfer
fade21db0a Improve error propogation in checkout 2012-10-09 11:53:00 -07:00
Vicent Martí
21e0d297af Merge pull request #967 from arrbee/diff-submodule-tests-and-fixes
Diff submodule tests and fixes
2012-10-09 11:45:50 -07:00
Michael Schubert
aa4437f637 Fix compiler warnings
* tests-clar/status: remove an unused variable
* clone: fix -Wmaybe-uninitialized warning
2012-10-09 17:51:11 +02:00