Commit Graph

598 Commits

Author SHA1 Message Date
Michael Schubert
6f6b0c013c tests-clar/repo: remove unused variable 2012-10-24 15:42:09 +02:00
yorah
a1abe66aca Add config level support in the config API
Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found.
Added `git_config_open_level`: build a single-level focused config object from a multi-level one.

We are now storing `git_config_entry`s in the khash of the config_file
2012-10-23 12:48:38 +02:00
yorah
f8ede94808 Fix adding variable to config file with no trailing newline
This can occur after a manual modification of a config file.
2012-10-23 11:48:50 +02:00
Vicent Martí
8a89aa1f57 Merge pull request #963 from carlosmn/remote-save-autotag
Save the autotag configuration for remotes
2012-10-22 12:04:48 -07:00
nulltoken
f36fb761dc tests: more git_repository_head_detached() coverage 2012-10-22 19:46:00 +02:00
nulltoken
c436ed26e0 reset: make git_reset() cope with an orphaned HEAD 2012-10-22 19:46:00 +02:00
nulltoken
cd1ef82253 test: extract make_head_orphaned() logic 2012-10-20 12:07:53 +02:00
nulltoken
209e34fa70 tests: leverage git_repository_detach_head() 2012-10-20 12:01:04 +02:00
Philip Kelley
11c2a9c67d Merge pull request #1003 from arrbee/fix-test-core-env
Fix env variable tests with new Win32 path rules
2012-10-19 17:06:07 -07:00
Russell Belfer
0d422ec9c2 Fix env variable tests with new Win32 path rules
The new Win32 global path search was not working with the
environment variable tests.  But when I fixed the test, the new
codes use of getenv() was causing more failures (presumably because
of caching on Windows ???).  This fixes the global file lookup to
always go directly to the Win32 API in a predictable way.
2012-10-19 15:40:43 -07:00
Vicent Martí
cf028856bc Merge pull request #1000 from nulltoken/error/GIT_EORPHANEDHEAD
Add error GIT_EORPHANEDHEAD
2012-10-19 14:43:09 -07:00
Ted Nyman
1a23440235 Update README because vmg is @vmg. 2012-10-19 14:05:55 -07:00
nulltoken
8b05bea870 errors: deploy GIT_EORPHANEDHEAD usage 2012-10-19 22:01:53 +02:00
nulltoken
0532e7bb87 branch: allow deletion of branch when HEAD's missing 2012-10-19 21:23:22 +02:00
nulltoken
8dd0bef921 tests: Fix unused variable warning 2012-10-19 20:35:12 +02:00
nulltoken
2df37f42c1 refs: cover more refname validity edge cases 2012-10-18 23:59:22 +02:00
nulltoken
4fd7e8e583 status: querying a bare repo returns EBAREREPO 2012-10-18 23:38:35 +02:00
nulltoken
c2e43fb1f2 diff: workdir diffing in a bare repo returns EBAREREPO 2012-10-18 23:38:27 +02:00
Vicent Martí
502be5ff3f Merge pull request #993 from pwkelley/clar_update
Update clar and add reliable rename for Win32
2012-10-18 14:15:37 -07:00
nulltoken
5912d74c69 revparse: properly handle refnames containing a @
Fix #994
2012-10-18 23:05:33 +02:00
Philip Kelley
c08b8a3a73 Update clar and add reliable rename for Win32 2012-10-18 14:50:17 -04:00
Russell Belfer
4c47a8bcfe Merge pull request #968 from arrbee/diff-support-typechange
Support TYPECHANGE records in status and adjust checkout accordingly
2012-10-17 14:14:51 -07:00
Michael Schubert
70d41f6bcd Fix -Wunused-but-set-variable warning 2012-10-16 23:42:01 +02:00
Vicent Marti
18217e7e8a test: Don't be so picky with failed lookups
Not found means not found, and the other way around.
2012-10-16 19:37:21 +02:00
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
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
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
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
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
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
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
Michael Schubert
0a32dca5ec gsoc-pack-objects WIP 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
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
Ben Straub
9adfa7d147 Merge pull request #949 from nulltoken/topic/deploy_repository_set_head
Deploy git_repository_set_head()
2012-10-08 15:25:44 -07:00