|
73e9535d
|
2019-10-17T13:43:26
|
|
tests: submodule: test cloning edge cases
Add two more tests that verify our behaviour in some edge cases, notably
when cloning into a non-empty directory and when cloning the same
submodule twice.
|
|
de412fc2
|
2019-10-17T13:36:22
|
|
tests: submodule: make use of sandboxes to clean repos
The test submodule::add::submodule_clone doesn't use a sandbox, and thus
the created repo will not get deleted after the test has finished.
Convert the test to use the empty standard repo sandbox instead to fix
this.
|
|
09b1ac11
|
2019-10-17T13:32:22
|
|
tests: submodule: fix tests for cloning submodules
The test submodule::add::homemade_clone unfortunately doesn't test
what's expected, but does instead clone the submodule to a directory
that is outside of the parent repository. Fixing this by cloning to the
correct location isn't possible, though, as `git_submodule_add_setup`
will have pre-created a ".git" file already, which will cause
`git_clone` to error out.
As it's not possible to perform the clone without fiddling around with
the repo's layout, let's just remove this test as that is in fact what
the new `git_submodule_clone` function is for.
|
|
3c5d78bd
|
2019-05-01T16:16:26
|
|
submodule: provide a wrapper for simple submodule clone steps
|
|
e54343a4
|
2019-06-29T09:17:32
|
|
fileops: rename to "futils.h" to match function signatures
Our file utils functions all have a "futils" prefix, e.g.
`git_futils_touch`. One would thus naturally guess that their
definitions and implementation would live in files "futils.h" and
"futils.c", respectively, but in fact they live in "fileops.h".
Rename the files to match expectations.
|
|
ecf4f33a
|
2018-02-08T11:14:48
|
|
Convert usage of `git_buf_free` to new `git_buf_dispose`
|
|
69a282da
|
2018-03-28T06:48:55
|
|
submodule: add more robust error handling when a submodule path is found on add
|
|
677d393c
|
2017-12-18T10:28:37
|
|
tests: submodule: insert index entries directly into index
|
|
ef9a7749
|
2017-11-19T20:59:59
|
|
submodule: update index check to check path before directory and fix tests
|
|
9371149f
|
2017-10-20T14:24:01
|
|
submodule: fix styling errors
|
|
3e500fc8
|
2017-10-16T19:55:45
|
|
test: submodule: add: join path without slashes
|
|
0a74f391
|
2017-10-16T16:16:03
|
|
test: submodule: add: use p_mkdir to create directories
|
|
ad1c4350
|
2017-10-16T15:30:47
|
|
submodule: check index for prefix before adding submodule
submodule: check path and prefix before adding submodule
submodule: fix test errors
|
|
0d98af09
|
2015-07-11T19:03:38
|
|
blob: fail to create a blob from a dir with EDIRECTORY
This also affects `git_index_add_bypath()` by providing a better error
message and a specific error code when a directory is passed.
|
|
9a97f49e
|
2014-12-21T15:31:03
|
|
config: borrow refcounted references
This changes the get_entry() method to return a refcounted version of
the config entry, which you have to free when you're done.
This allows us to avoid freeing the memory in which the entry is stored
on a refresh, which may happen at any time for a live config.
For this reason, get_string() has been forbidden on live configs and a
new function get_string_buf() has been added, which stores the string in
a git_buf which the user then owns.
The functions which parse the string value takea advantage of the
borrowing to parse safely and then release the entry.
|
|
209425ce
|
2014-11-08T13:25:51
|
|
remote: rename _load() to _lookup()
This brings it in line with the rest of the lookup functions.
|
|
46c8f7f8
|
2014-10-24T16:25:59
|
|
remote: accept a repo and name for renaming
Remote objects are not meant to be changed from under the user. We did
this in rename, but only the name and left the refspecs, such that a
save would save the wrong refspecs (and a fetch and anything else would
use the wrong refspecs).
Instead, let's simply take a name and not change any loaded remote from
under the user.
|
|
bc737620
|
2014-08-20T10:24:41
|
|
Introduce option to use relative paths for repository work directory
Teach git_repository_init_ext to use relative paths for the gitlink
to the work directory. This is used when creating a sub repository
where the sub repository resides in the parent repository's
.git directory.
|
|
72bca13e
|
2014-06-06T16:33:54
|
|
remote: return problem refspecs instead of using a callback
There is no reason why we need to use a callback here. A string array
fits better with the usage, as this is not an event and we don't need
anything from the user.
|
|
18cc7d28
|
2014-04-03T11:29:08
|
|
Minor code cleanup
|
|
f2fb4bac
|
2014-04-02T23:55:21
|
|
git_submodule_resolve_url supports relative urls
The base for the relative urls is determined as follows, with descending
priority:
- remote url of HEAD's remote tracking branch
- remote "origin"
- workdir
This follows git.git behaviour
|