Commit Graph

3167 Commits

Author SHA1 Message Date
nulltoken
b0f1533867 revparse: add reflog test data 2012-07-15 18:41:54 +02:00
Vicent Martí
d4b573513c Merge pull request #821 from nacho/development
Add support for the more standard LIB_INSTALL_DIR variable
2012-07-15 07:42:14 -07:00
Vicent Marti
227f313119 attr: Rename the git_attr__ exports
Pevents collisions with the original libgit, which also exports those
exact symbols.

Fixes #822
2012-07-15 14:32:51 +02:00
Carlos Martín Nieto
d1af70b050 indexer: delay resolving deltas
Not all delta bases are available on the first try. By delaying
resolving all deltas until the end, we avoid decompressing some of the
data twice or even more times, saving effort and time.
2012-07-14 22:29:11 +02:00
Ben Straub
71bc89b9b6 Disable test that aren't quite ready yet. 2012-07-13 20:24:40 -07:00
Ben Straub
dc1b0909d6 Create filtered_blob_contents out of parts on hand. 2012-07-13 16:44:13 -07:00
Ben Straub
280c7bbf13 Add checkout test suite.
Removed 'bare' option from test repository to 
allow checkout tests.
2012-07-13 15:52:27 -07:00
Ben Straub
deac801de9 Fix documentation comment to match actual params. 2012-07-13 15:50:23 -07:00
Carlos Martín Nieto
7b8c9e123d pkt: correctly advertise capabilitites
The correct way to advertise out capabilities is by appending them to
the first 'want' line, using SP as separator, instead of NUL as the
server does. Inconsistent documentation lead to the use of NUL in
libgit2.

Fix this so we can request much more efficient packs from the
remote which reduces the indexing time considerably.
2012-07-13 20:46:16 +02:00
Ignacio Casal Quinteiro
b3237ac313 Add support for the more standard LIB_INSTALL_DIR variable 2012-07-13 17:14:08 +02:00
Vicent Martí
0848ec24fa Merge pull request #815 from nulltoken/topic/revparse-refac
More revparse <3
2012-07-13 06:56:24 -07:00
Vicent Martí
68c5ef5cc5 Merge pull request #817 from nulltoken/fix/refs-leak
refs: fix a memory leak
2012-07-13 06:53:33 -07:00
nulltoken
151d81a647 refs: fix a memory leak 2012-07-12 22:53:41 +02:00
nulltoken
b5f9011524 revparse: fix propagation of error 2012-07-12 22:33:48 +02:00
nulltoken
5a6f31f28b revparse: only allow decimal specifiers in carete and tilde synatx
passing 0 to git_strol(32|64) let the implementation guess if it's
    dealing with an octal number or a decimal one.

    Let's make it safe and ensure that both 'HEAD@{010}' and 'HEAD@{10}'
    point at the same commit.
2012-07-12 22:30:02 +02:00
nulltoken
d1b7921a48 revparse: fix disambiguation of refs and abbrev oids 2012-07-12 22:30:00 +02:00
nulltoken
bb89cf9478 revparse: simplify handling of the colon syntax 2012-07-12 22:29:58 +02:00
nulltoken
dc1f4b32d3 tree: unfound tree entry returns GIT_ENOTFOUND 2012-07-12 22:29:55 +02:00
nulltoken
1c3edb3078 tree: prevent git_tree_entry_free() from segfaulting when being passed a NULL tree_entry 2012-07-12 22:29:53 +02:00
Carlos Martín Nieto
9f99c5de2e travis: make it run the tests under valgrind 2012-07-12 21:26:21 +02:00
Russell Belfer
465092ce3f Fix memory leak in test 2012-07-12 11:56:50 -07:00
Russell Belfer
39b8e047b4 Missed a couple of khash inline dependencies 2012-07-12 11:52:10 -07:00
Russell Belfer
72ee078762 Isolate khash inlines from global namespace
khash.h was globally #define'ing "inline" which messes with
other files.  Let's keep it as "kh_inline".
2012-07-12 11:49:15 -07:00
Carlos Martín Nieto
b7158c53a4 Use GIT_INLINE instead of inline 2012-07-12 20:48:46 +02:00
Carlos Martín Nieto
eca67c585e tests: fix git_odb_foreach() object count
Some objects were added in another PR
2012-07-12 20:40:09 +02:00
Carlos Martín Nieto
1ebe432e2f commit: properly export git_commit_nth_gen_ancestor() 2012-07-12 20:33:30 +02:00
Vicent Martí
dd4345b424 Merge pull request #789 from carlosmn/odb-foreach
odb: add git_odb_foreach()
2012-07-12 09:42:54 -07:00
Vicent Martí
0cf6b2f29e Merge pull request #805 from nulltoken/fix/revwalk-email-parsing
Fix revwalk email parsing
2012-07-12 09:37:09 -07:00
Vicent Martí
db2d4061f6 Merge pull request #814 from nulltoken/topic/revparse-refac
Revparse refactoring: a start
2012-07-12 09:35:35 -07:00
Vicent Martí
48bcf81dd2 Merge pull request #812 from arrbee/assorted-tweaks
Assorted goodies
2012-07-12 09:32:44 -07:00
Ben Straub
339f3d071e Move is_dot_or_dotdotW into path.h. 2012-07-11 19:20:49 -07:00
nulltoken
12595ab8f9 revparse: deploy git_reference_remote_tracking_from_branch() 2012-07-12 01:06:13 +02:00
nulltoken
84f18e3587 refs: introduce git_reference_remote_tracking_from_branch() 2012-07-12 01:06:13 +02:00
nulltoken
874303d468 refs: readonly tests don't need a sandboxed repo 2012-07-12 01:06:12 +02:00
nulltoken
2d012c0c72 revparse: deploy git_commit_nth_gen_ancestor() 2012-07-12 01:06:12 +02:00
nulltoken
b1aca6eae0 commit: introduce git_commit_nth_gen_ancestor() 2012-07-12 01:06:11 +02:00
nulltoken
2b92a154b6 commit: reduce code duplication 2012-07-12 01:06:11 +02:00
nulltoken
8f17ed801f revparse: simplify the parsing of described object 2012-07-12 01:06:10 +02:00
Ben Straub
81167385e9 Fix compile and workings on msvc.
Signed-off-by: Ben Straub <bstraub@github.com>
2012-07-11 15:41:37 -07:00
nulltoken
8aedf1d558 signature: prevent angle bracket usage in identity 2012-07-11 20:40:13 +02:00
nulltoken
118cf57d42 revwalk: relax the parsing of the commit time 2012-07-11 20:40:12 +02:00
nulltoken
5b07111529 tests: add test commit with angle brackets in the author name 2012-07-11 20:40:12 +02:00
Ben Straub
d024419f16 Add git_path_is_empty_dir. 2012-07-11 10:40:53 -07:00
Ben Straub
c3b5099fe4 Add git_path_is_dot_or_dotdot.
Also, remove some duplication in the clone test
suite.
2012-07-11 10:10:31 -07:00
Ben Straub
822d9dd51f Remove duplicate of git_repository_head_tree. 2012-07-11 09:50:12 -07:00
Vicent Marti
111ee3fe2d Add missing includes 2012-07-11 14:37:26 +02:00
Vicent Martí
a13a30ac30 Merge pull request #801 from nulltoken/fix/ref-renaming
refs and revparse love <3
2012-07-11 05:29:51 -07:00
Russell Belfer
54e29b9380 Fix missing NUL termination of buffer 2012-07-10 23:51:32 -07:00
Russell Belfer
991a56c704 Add flag to write gitlink on setting repo workdir
This added a flag to the `git_repository_set_workdir()` function
that enables generation of a `.git` gitlink file that links the
new workdir to the parent repository.  Essentially, the flag tells
the function to write out the changes to disk to permanently set
the workdir of the repository to the new path.

If you pass this flag as true, then setting the workdir to something
other than the default workdir (i.e. the parent of the .git repo
directory), will create a plain file named ".git" with the standard
gitlink contents "gitdir: <repo-path>", and also update the
"core.worktree" and "core.bare" config values.

Setting the workdir to the default repo workdir will clear the
core.worktree flag (but still permanently set core.bare to false).

BTW, the libgit2 API does not currently provide a function for
clearing the workdir and converting a non-bare repo into a bare one.
2012-07-10 23:19:47 -07:00
Russell Belfer
b3ff1dab31 Adding git_config_foreach_match() iteration fn
Adding a new config iteration function that let's you iterate
over just the config entries that match a particular regular
expression.  The old foreach becomes a simple use of this with
an empty pattern.

This also fixes an apparent bug in the existing `git_config_foreach`
where returning a non-zero value from the iteration callback was
not correctly aborting the iteration and the returned value was
not being propogated back to the caller of foreach.

Added to tests to cover all these changes.
2012-07-10 23:19:47 -07:00