Ben Straub
18b2d560d3
Deploy git_clone_options; remove git_clone_bare
2012-12-14 13:03:59 -08:00
Vicent Marti
2d466b7dcb
tests: Fix unused temp repo
2012-12-14 02:49:11 +01:00
Vicent Marti
509216a5b2
test: Fix clone tests
2012-12-14 02:49:01 +01:00
Vicent Marti
b0b9fd3245
Merge remote-tracking branch 'origin/clone-auth' into development
2012-12-14 02:41:53 +01:00
Jameson Miller
8a8820d89f
Add test to clone with absolute path
2012-12-13 17:58:12 -05:00
Ben Straub
24393ea6d3
Stop premature remote freeing when cloning
2012-12-13 09:14:56 -08:00
Ben Straub
7c353afd0e
Define constant for default fetch spec
2012-12-13 08:47:29 -08:00
Ben Straub
44f36f6e3b
Convert clone to use dangling remotes
2012-12-12 19:48:44 -08:00
Ben Straub
b914e17d82
API to set a dangling remote's repository
2012-12-12 12:23:24 -08:00
Ben Straub
a71c27ccda
Allow creation of dangling remotes
2012-12-12 12:15:25 -08:00
Russell Belfer
91e7d26303
Fix iterator reset and add reset ranges
...
The `git_iterator_reset` command has not been working in all cases
particularly when there is a start and end range. This fixes it
and adds tests for it, and also extends it with the ability to
update the start/end range strings when an iterator is reset.
2012-12-10 15:38:41 -08:00
Russell Belfer
9950d27ab6
Clean up iterator APIs
...
This removes the need to explicitly pass the repo into iterators
where the repo is implied by the other parameters. This moves
the repo to be owned by the parent struct. Also, this has some
iterator related updates to the internal diff API to lay the
groundwork for checkout improvements.
2012-12-10 15:38:28 -08:00
Ben Straub
59bccf33c4
Add a payload param to git_cred_acquire_cb
...
Fixes #1128 .
2012-12-10 11:11:01 -08:00
Ben Straub
72629a10e3
Clean up GCC build warnings
2012-12-10 10:05:31 -08: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
Vicent Marti
a9c07c47ea
tests: MSVC fix
2012-12-05 21:06:54 +01:00
Vicent Marti
bf192cdb43
versions: MSVC build fixes
2012-12-05 20:56:27 +01:00
Vicent Martí
e05ca13f1f
Merge pull request #1115 from ben/struct-versions
...
Version info for public structs
2012-12-05 11:47:19 -08:00
Edward Thomson
b241466133
status should ignore conflicts entries in the index
2012-12-03 14:51:39 -06:00
Ben Straub
de70aea6b1
Remove GIT_SIGNATURE_VERSION and friends
2012-12-03 12:41:50 -08:00
nulltoken
cc1466264a
revparse: Deploy EINVALIDSPEC usage
2012-12-01 08:34:31 +01:00
nulltoken
84166facc9
revparse: remove timezone setup in tests
2012-12-01 08:34:30 +01:00
nulltoken
bc05f30c47
object: refine git_object_peel() error report
2012-12-01 08:34:29 +01:00
nulltoken
621730383a
branch: Deploy EINVALIDSPEC usage
2012-12-01 08:34:28 +01:00
nulltoken
18d6f12040
tag: Deploy EINVALIDSPEC usage
2012-12-01 08:34:28 +01:00
nulltoken
80212ecb1c
reflog: Deploy EINVALIDSPEC usage
2012-12-01 08:34:27 +01:00
nulltoken
e4aa7f58fe
refs: cover git_reference_name_to_oid() unfound behavior
2012-12-01 08:34:26 +01:00
nulltoken
80d9d1df14
refs: Deploy EINVALIDSPEC usage
2012-12-01 08:34:26 +01:00
nulltoken
47261d9c8a
tests: drop unused variables
2012-12-01 08:34:25 +01:00
nulltoken
032ba9e4ad
remote: deploy EINVALIDSPEC usage
2012-12-01 08:34:23 +01:00
nulltoken
3da73c40fc
Fix compilation warnings
2012-12-01 08:34:21 +01:00
Ben Straub
0ab3a2ab2c
Deploy GIT_INIT_STRUCTURE
2012-11-30 20:34:50 -08:00
Ben Straub
1071176900
Deploy versioned git_transport structure
2012-11-30 13:12:15 -08:00
Ben Straub
79cfa20d60
Deploy GIT_STATUS_OPTIONS_INIT
2012-11-30 13:12:15 -08:00
Ben Straub
b4d136527c
Deploy GIT_REPOSITORY_INIT_OPTIONS_INIT
2012-11-30 13:12:15 -08:00
Ben Straub
9267ff586f
Deploy GIT_REMOTE_CALLBACKS_INIT
2012-11-30 13:12:15 -08:00
Ben Straub
55f6f21b7d
Deploy versioned git_odb_backend structure
2012-11-30 13:12:15 -08:00
Ben Straub
ca901e7b0f
Deploy GIT_DIFF_FIND_OPTIONS_INIT
2012-11-30 13:12:15 -08:00
Ben Straub
2f8d30becb
Deploy GIT_DIFF_OPTIONS_INIT
2012-11-30 13:12:14 -08:00
Ben Straub
6917762139
Deploy git_config_backend version
2012-11-30 13:12:14 -08:00
Ben Straub
b81aa2f1de
Deploy GIT_CHECKOUT_OPTS_INIT
2012-11-30 13:12:14 -08:00
Ben Straub
f4fc9fdba0
Cleanup nitpicky things
2012-11-30 13:12:10 -08:00
Ben Straub
bde336ea51
Add version fields and init macros for public input structs.
2012-11-30 12:55:45 -08: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
Scott J. Goldman
1a0c5a34e0
Fixup ahead/behind tests
...
Fix a typo that caused a failing test, and use cl_assert_equal
instead of cl_assert.
2012-11-29 18:11:30 -08:00
Russell Belfer
d5e44d8498
Fix function name and add real error check
...
`revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()`
and make `git_commit_list_parse()` do real error checking that
the item in the list is an actual commit object. Also fixed an
apparent typo in a test name.
2012-11-29 17:02:27 -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
Philip Kelley
ac22d08f2f
Remove git_object_oid2type
2012-11-29 08:22:15 -05:00
Vicent Martí
e2934db2c7
Merge pull request #1090 from arrbee/ignore-invalid-by-default
...
Ignore invalid entries by default
2012-11-29 02:05:46 -08:00
Vicent Martí
ee06fec507
Merge pull request #1083 from nulltoken/fix/tracking
...
Fix git_branch_tracking() for branches with empty merge and/or remote config entries
2012-11-29 01:29:50 -08:00
Vicent Martí
2775d1cb8f
Merge pull request #1102 from nulltoken/topic/fetch-test-coverage
...
fetch: enhance test coverage
2012-11-29 01:02:08 -08:00
Vicent Martí
3ae550e36c
Merge pull request #1107 from nulltoken/fix/diff-null-tree-against-workdir
...
Enhance diff test coverage between a null Tree and the Workdir
2012-11-29 01:01:44 -08:00
Scott J. Goldman
0984c8768d
Rename git_count_ahead_behind -> git_graph_ahead_behind
...
Moved it into graph.{c,h} which i created for the new "graph"
functions namespace. Also adjusted the function prototype
to use `size_t` and `const git_oid *`.
2012-11-28 18:54:57 -08: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
Scott J. Goldman
eddde61846
Add tests for ahead-behind count
2012-11-28 18:54:57 -08:00
nulltoken
046a1573ff
fetch: enhance test coverage
2012-11-29 00:05:16 +01:00
nulltoken
59a0d772f8
diff: enhance test coverage against the workdir
2012-11-28 20:04:34 +01: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
nulltoken
f1bd50d61d
tracking: remove code duplication in test
2012-11-28 20:00:06 +01:00
nulltoken
35108a216e
Fix MSVC compilation warning
2012-11-28 19:37:31 +01:00
Russell Belfer
7bf87ab698
Consolidate text buffer functions
...
There are many scattered functions that look into the contents of
buffers to do various text manipulations (such as escaping or
unescaping data, calculating text stats, guessing if content is
binary, etc). This groups all those functions together into a
new file and converts the code to use that.
This has two enhancements to existing functionality. The old
text stats function is significantly rewritten and the BOM
detection code was extended (although largely we can't deal with
anything other than a UTF8 BOM).
2012-11-28 09:58:48 -08:00
Philip Kelley
613d5eb939
Push! By schu, phkelley, and congyiwu, et al
2012-11-28 11:42:37 -05:00
Russell Belfer
c3fb7d04ed
Make git_odb_foreach_cb take const param
...
This makes the first OID param of the ODB callback a const pointer
and also propogates that change all the way to the backends.
2012-11-27 15:00:49 -08:00
Russell Belfer
2bd5998c9c
Remove git_note_data structure
2012-11-27 14:47:39 -08:00
Ben Straub
cb7ac81c4d
Fix warning
2012-11-27 13:30:04 -08:00
Ben Straub
df705148ec
API updates for remote.h
...
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Russell Belfer
a8122b5d4a
Fix warnings on Win64 build
2012-11-27 13:18:29 -08:00
Russell Belfer
16248ee2d1
Fix up some missing consts in tree & index
...
This fixes some missed places where we can apply const-ness to
various public APIs.
There are still some index and tree APIs that cannot take const
pointers because we sort our `git_vectors` lazily and so we can't
reliably bsearch the index and tree content without applying a
`git_vector_sort()` first.
This also fixes some missed places where size_t can be used and
where const can be applied to a couple internal functions.
2012-11-27 13:18:29 -08:00
Ben Straub
f45d51ff8e
API updates for index.h
2012-11-27 13:18:28 -08:00
Russell Belfer
d9023dbe0c
API updates for tag.h
2012-11-27 13:18:28 -08:00
Russell Belfer
9cd423583f
API updates for submodule.h
2012-11-27 13:18:28 -08:00
Russell Belfer
793c438559
Update diff callback param order
...
This makes the diff functions that take callbacks both take
the payload parameter after the callback function pointers and
pass the payload as the last argument to the callback function
instead of the first. This should make them consistent with
other callbacks across the API.
2012-11-27 13:18:28 -08:00
Ben Straub
54b2a37ac7
Clean up config.h
2012-11-27 13:18:28 -08:00
Russell Belfer
e120123e36
API review / update for tree.h
2012-11-27 13:18:28 -08:00
Vicent Marti
cfbe4be3fb
More external API cleanup
...
Conflicts:
src/branch.c
tests-clar/refs/branches/create.c
2012-11-27 13:18:27 -08:00
Ben Straub
2508cc66eb
Rename ref and reflog apis for consistency
2012-11-27 13:17:45 -08:00
Vicent Martí
c4d8df27bc
Merge pull request #1097 from nulltoken/topic/head_tree_error
...
Make `git_repository_head_tree()` return error codes
2012-11-23 15:19:47 -08:00
Sascha Cunz
9094d30b93
Reset all static variables to NULL in clar's __cleanup
...
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.
This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.
Fixes #1096
2012-11-23 11:41:56 +01:00
nulltoken
5cec896a3b
repo: Make git_repository_head_tree() return error codes
2012-11-22 18:51:06 +01:00
nulltoken
a94002a983
test: Minor fixes
2012-11-22 18:50:50 +01:00
Philip Kelley
5cf1b4f094
Call git_remote_update_tips before git_remote_disconnect
2012-11-22 11:16:35 -05:00
Eduardo Bart
e566b609df
Update clar tests p_lstat_posixly and p_lstat
2012-11-20 00:57:56 -02:00
Russell Belfer
d46b0a04c7
Improve iterator ignoring .git file
...
The workdir iterator has always tried to ignore .git files, but
it turns out there were some bugs. This makes it more robust at
ignoring .git files.
This also makes iterators always check ".git" case insensitively
regardless of the properties of the system. This will make libgit2
skip ".GIT" and the like. This is different from core git, but on
systems with case insensitive but case preserving file systems,
allowing ".GIT" to be added is problematic.
2012-11-19 16:34:44 -08:00
Russell Belfer
02df42ddbf
Set up default internal ignores
...
This adds "." ".." and ".git" to the internal ignores list by
default - asking about paths with these files will always say
that they are ignored.
2012-11-19 16:33:30 -08:00
Scott J. Goldman
1876360f81
Add a test for invalid filenames while writing tree from index
2012-11-18 16:59:42 -08:00
Scott J. Goldman
19af78bb36
Prevent creating ..
, .
, and .git
with tree builder
...
As per core git.
2012-11-18 15:15:24 -08:00
Michael Schubert
0066955d97
Fix a couple of warnings
2012-11-18 04:27:49 +01:00
nulltoken
b15df1d937
reflog: make entry_byindex() and drop() git compliant
...
Passing 0 as the index now retrieves the most recent entry instead
of the oldest one.
2012-11-17 18:30:35 -08:00
nulltoken
270160b91a
config: Opening a nonexistent file returns ENOTFOUND
2012-11-17 18:30:34 -08:00
nulltoken
6091457e76
repo: ensure is_empty() checks there are no refs
2012-11-17 07:20:08 -08:00
nulltoken
f5a0e734bc
tests: introduce cl_git_remove_placeholders()
2012-11-17 07:20:07 -08:00
nulltoken
5df7207a67
repo: readonly tests don't need a sandboxed repo
2012-11-17 07:20:04 -08:00
nulltoken
0e95e70a55
env: ensure git_futils_find_xxx() returns ENOTFOUND
2012-11-17 05:41:22 -08:00
nulltoken
aa8a76eff9
tag: rename git_tag_type to git_tag_target_type
2012-11-17 05:41:20 -08:00
nulltoken
86b9dbc12f
Fix MSVC compilation warnings
2012-11-17 05:13:13 -08:00
Vicent Martí
e087973ec7
Merge pull request #1075 from carlosmn/alternates-recurse
...
odb: recursively load alternates
2012-11-16 10:27:46 -08:00
Carlos Martín Nieto
85e7efa163
odb: recursively load alternates
...
The maximum depth is 5, like in git
2012-11-16 08:46:02 -08:00
Scott J. Goldman
0cd063fd87
Merge pull request #1071 from arrbee/alternate-fix-strcmp
...
Win32 fixes for diff/checkout/reset
2012-11-15 23:28:52 -08:00