|
8a00de08
|
2018-07-06T10:47:06
|
|
Merge pull request #4699 from nelhage/fetch-null-dst
git_refspec_transform: Handle NULL dst
|
|
ff8edac9
|
2018-06-29T16:18:36
|
|
formatting fix
|
|
af3088e4
|
2018-06-29T11:45:15
|
|
refspec: rename `git_refspec__free` to `git_refspec__dispose`
Since commit 630a67366 (refspec: add public parsing api, 2018-02-07), we
now have two functions `git_refspec_free` and `git_refspec__free`. The
difference is that the first one will free the structure itself, while
the second one will only free the structure's contents. Use our new
`dispose` naming pattern for the latter function to help avoid
confusion.
|
|
46c9f26f
|
2018-06-25T15:47:31
|
|
Add a test.
Verified that this breaks before the fix and passes afterwards.
|
|
630a6736
|
2018-02-07T22:30:27
|
|
refspec: add public parsing api
Fix typo
Fix some type issues
More fixes
Address requested changes
Add test
Fix naming
Fix condition and tests
Address requested changes
Fix typo
|
|
ecf4f33a
|
2018-02-08T11:14:48
|
|
Convert usage of `git_buf_free` to new `git_buf_dispose`
|
|
093e671e
|
2018-01-12T12:55:40
|
|
tests: network::fetchlocal: let cleanup function handle sandbox cleanup
Two tests in network::fetchlocal explicitly set a cleanup function to
free and remove the created sandbox repositories. This is not necessary,
though, as the cleanup function executed after each test already takes
care of cleaning up after them. Remove the code to avoid needless code
duplication.
|
|
bee423cc
|
2017-06-13T10:29:23
|
|
tests: network: add missing include for `git_repository_new`
A newly added test uses the `git_repository_new` function without the
corresponding header file being included. While this works due to the
compiler deducing the correct function signature, we should obviously
just include the function's declaration file.
|
|
fe9a5dd3
|
2017-06-12T12:00:14
|
|
remote: ensure we can create an anon remote on inmemory repo
Given a wholly in-memory repository, ensure that we can create an
anonymous remote and perform actions on it.
|
|
fe345c73
|
2016-02-09T12:29:31
|
|
Remove unused static functions
|
|
4e017413
|
2015-09-21T21:11:02
|
|
netops: make the path optional in URLs
When we're dealing with proxy addresses, we only want a hostname and
port, and the user would not provide a path, so make it optional so we
can use this same function to parse git as well as proxy URLs.
|
|
07bd3e57
|
2015-05-07T12:57:56
|
|
proxy: ask the user for credentials if necessary
|
|
4f2b6093
|
2015-09-08T13:53:41
|
|
Tell the git_transport about the custom_headers
|
|
a8792767
|
2015-08-11T20:44:19
|
|
remote: add failing test for a mirror refspec
While we download the remote's remote-tracking branches, we don't
download the tag. This points to the tag auto-follow rules interfering
with the refspec.
|
|
534d136d
|
2015-06-17T08:52:28
|
|
Fix memory leak in tests/network/refspecs.c
|
|
fb92b48d
|
2015-05-28T10:13:07
|
|
Merge pull request #3149 from libgit2/cmn/upstream-matching-push
Fill the pointers for matching refspecs
|
|
c6e942fb
|
2015-05-17T15:19:22
|
|
remote: validate refspecs before adding to config
When we moved from acting on the instance to acting on the
configuration, we dropped the validation of the passed refspec, which
can lead to writing an invalid refspec to the configuration. Bring that
validation back.
|
|
ae5b9362
|
2015-05-17T15:11:45
|
|
remote: remove fetch parameter from create_anonymous
An anonymous remote is not configured and cannot therefore have
configured refspecs. Remove the parameter which adds this from the
constructor.
|
|
7cd4ba1b
|
2015-05-22T12:11:42
|
|
refspec: make sure matching refspecs have src, dst and input strings
When we find out that we're dealing with a matching refspec, we set the
flag and return immediately. This leaves the strings as NULL, which
breaks the contract.
Assign these pointers to a string with the correct values.
|
|
041ad7db
|
2015-05-14T10:34:05
|
|
push: add tests for the push negotiation callback
The functionality was meged without including tests, so let's add them
now.
|
|
0bc3d56d
|
2015-05-07T16:12:36
|
|
tests: don't push to our resources
A couple of tests use the wrong remote to push to. We did not notice up
to now because the local push would copy individual objects, and those
already existed, so it became a no-op.
Once we made local push create the packfile, it became noticeable that
there was a new packfile where it didn't belong.
|
|
a4b6452a
|
2015-04-23T06:55:29
|
|
remote: remove git_remote_save()
It has now become a no-op, so remove the function and all references to
it.
|
|
77254990
|
2015-04-23T06:51:34
|
|
remote: remove live changing of refspecs
The base refspecs changing can be a cause of confusion as to what is the
current base refspec set and complicate saving the remote's
configuration.
Change `git_remote_add_{fetch,push}()` to update the configuration
instead of an instance.
This finally makes `git_remote_save()` a no-op, it will be removed in a
later commit.
|
|
35a8a8c5
|
2015-04-22T17:29:20
|
|
remote: move the tagopt setting to the fetch options
This is another option which we should not be keeping in the remote, but
is specific to each particular operation.
|
|
3eff2a57
|
2015-04-22T16:11:10
|
|
remote: move the update_fetchhead setting to the options
While this will rarely be different from the default, having it in the
remote adds yet another setting it has to keep around and can affect its
behaviour. Move it to the options.
|
|
058b753c
|
2015-04-22T15:45:21
|
|
remote: move the transport ctor to the callbacks
Instead of having it set in a different place from every other callback,
put it the main structure. This removes some state from the remote and
makes it behave more like clone, where the constructors are passed via
the options.
|
|
22261344
|
2015-04-22T04:38:08
|
|
remote: remove url and pushurl from the save logic
As a first step in removing the repository-saving logic, don't allow
chaning the url or push url from a remote object, but change the
configuration on the configuration immediately.
|
|
8f0104ec
|
2015-04-21T22:10:36
|
|
Remove the callbacks struct from the remote
Having the setting be different from calling its actions was not a great
idea and made for the sake of the wrong convenience.
Instead of that, accept either fetch options, push options or the
callbacks when dealing with the remote. The fetch options are currently
only the callbacks, but more options will be moved from setters and
getters on the remote to the options.
This does mean passing the same struct along the different functions but
the typical use-case will only call git_remote_fetch() or
git_remote_push() and so won't notice much difference.
|
|
fc6f044e
|
2015-04-21T20:02:24
|
|
Fix for Issue #3023 tests fail with no network
Moved offending tests from network to online so they will get skipped
when there is a lack of network connectivity:
-test_online_remotes__single_branch
-test_online_remotes__restricted_refspecs
|
|
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.
|
|
4e498646
|
2015-01-15T16:50:31
|
|
repository: remove log message override for switching the active branch
We want to use the "checkout: moving from ..." message in order to let
git know when a change of branch has happened. Make the convenience
functions for this goal write this message.
|
|
412a3808
|
2015-01-15T15:31:23
|
|
push: remove reflog message override
We always use "update by push".
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.
In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
|
|
de4a75f9
|
2015-01-07T09:26:36
|
|
Fix more indentation.
|
|
66b71ea5
|
2015-01-05T13:33:36
|
|
Fix intentation.
|
|
1ef3f0ce
|
2015-01-05T13:24:11
|
|
Load prune configuration when a remote is created.
|
|
a3ef70bb
|
2014-12-30T11:53:55
|
|
Merge pull request #2761 from libgit2/cmn/fetch-prune
Remote-tracking branch prunning
|
|
c4c47fc2
|
2014-12-30T11:53:45
|
|
Merge pull request #2762 from libgit2/cmn/hide-push
remote: remove git_push from the public API
|
|
fe794b2e
|
2014-12-16T08:57:05
|
|
remote: remove git_push from the public API
Instead we provide git_remote_upload() and git_remote_update_tips() in
order to have a parallel API for fetching and pushing.
|
|
3ded7f28
|
2014-12-16T10:05:49
|
|
local: add failing test for sideband information
We do not currently generate any messages when we're counting the
objects, as might be expected from a local upload-pack. Assert that we
do call the function when working.
|
|
4adc64a8
|
2014-12-14T21:24:46
|
|
fetch: plug leaks in the prune tests
|
|
26186b15
|
2014-12-14T21:01:19
|
|
fetch: remove the prune setter
This option does not get persisted to disk, which makes it different
from the rest of the setters. Remove it until we go all the way.
We still respect the configuration option, and it's still possible to
perform a one-time prune by calling the function.
|
|
7b6e1e4c
|
2014-12-14T20:40:52
|
|
fetch: add test for the other order of overlapping specs
|
|
4aa23369
|
2014-12-14T16:56:38
|
|
fetch: assert we don't call update tips when there are no upates
This is hiding a bug in the prune code, whereby we prune references we
shouldn't but don't notice it in the code afterwards because
update_tips() recreates them.
This means that we do perform changes to the references (and get rid of
the reflogs) when we shouldn't.
|
|
020aab93
|
2014-12-14T16:50:33
|
|
fetch: do set prune when testing
We load the remote again, so we need to ask the new remote to prune the
refs, or we're not exercising the code in our tests.
|
|
5e0c3d2d
|
2014-11-13T11:26:02
|
|
Make sure that `fetch --prune --tags` doesn't remove tags.
|
|
b91194e8
|
2014-11-13T09:22:10
|
|
Cleanup repository after prune tests.
|
|
93d968fa
|
2014-11-12T22:05:09
|
|
Cleanup after testing remote prune.
|
|
82eeba81
|
2014-11-12T20:44:28
|
|
Fix references to git_remote_lookup.
|
|
439e19f6
|
2014-11-12T17:12:30
|
|
Test that prune overlapping works as expected.
|
|
ce4b57c6
|
2014-10-27T14:40:33
|
|
Fix calls to `git_remote_download` and `git_remote_fetch`.
|
|
b8fefcb9
|
2014-09-23T23:21:41
|
|
Add test for prune refs
|
|
d524b2d3
|
2014-12-10T17:23:33
|
|
push: fold unpack_ok() into finish()
The push cannot be successful if we sent a bad packfile. We should
return an error in that case instead of storing it elsewhere.
|
|
d226fbf1
|
2014-12-07T22:42:06
|
|
Fix broken test suite on Windows
|
|
3fade40e
|
2014-11-23T21:29:35
|
|
remote: add test for pushing and deleting with the local transport
|
|
f7fcb18f
|
2014-11-23T14:12:54
|
|
Plug leaks
Valgrind is now clean except for libssl and libgcrypt.
|
|
8b5b814e
|
2014-11-17T20:10:58
|
|
Merge pull request #2671 from swisspol/remote_create_fix
Fixed active_refspecs field not initialized on new git_remote objects
|
|
7f1b73b7
|
2014-11-17T17:03:55
|
|
Merge pull request #2693 from libgit2/cmn/push-refspec-refactor
push: use the common refspec parser
|
|
d3cd7da5
|
2014-10-28T20:56:18
|
|
Fixed active_refspecs field not initialized on new git_remote objects
When creating a new remote, contrary to loading one from disk,
active_refspecs was not populated. This means that if using the new
remote to push, git_push_update_tips() will be a no-op since it
checks the refspecs passed during the push against the base ones
i.e. active_refspecs. And therefore the local refs won't be created
or updated after the push operation.
|
|
aad638f3
|
2014-11-07T15:00:11
|
|
push: use the common refspec parser
There is one well-known and well-tested parser which we should use,
instead of implementing parsing a second time.
The common parser is also augmented to copy the LHS into the RHS if the
latter is empty.
The expressions test had to change a bit, as we now catch a bad RHS of a
refspec locally.
|
|
e284c451
|
2014-10-28T22:18:38
|
|
Changed GIT_REMOTE_DOWNLOAD_TAGS_ALL to behave like git 1.9.0
|
|
02bc5233
|
2014-11-08T17:05:13
|
|
Merge pull request #2698 from libgit2/cmn/fetchhead-refactor
Refactor fetchhead
|
|
64fdd86d
|
2014-11-08T20:21:14
|
|
remote: don't check for upstream on an anonymous remote
If the remote is anonymous, then we cannot check for any configuration,
as there is no name. Check for this before we try to use the name, which
may be a NULL pointer.
This fixes #2697.
|
|
209425ce
|
2014-11-08T13:25:51
|
|
remote: rename _load() to _lookup()
This brings it in line with the rest of the lookup functions.
|
|
f890a84f
|
2014-11-06T10:19:22
|
|
Merge pull request #2682 from libgit2/cmn/fetch-tags-refspec
remote: check for the validity of the refspec when updating FETCH_HEAD
|
|
cce27d82
|
2014-11-03T14:07:20
|
|
git_remote_rename: propogate GIT_ENOTFOUND
|
|
ea8dedc9
|
2014-11-02T20:39:29
|
|
remote: fix tagopt test
An anonymous remote wouldn't create remote-tracking branches, so testing
we don't create them for TAGS_ALL is nonsensical. Furthermore, the name
of the supposed remote-tracking branch was also not one which would have
been created had it had a name.
Give the remote a name and test that we only create the tags when we
pass TAGS_ALL and that we do create the remote-branch branch when given
TAGS_AUTO.
|
|
0f838d27
|
2014-11-02T20:03:23
|
|
remote: add a failing test for checking the current branch's upstream
When we update FETCH_HEAD we check whether the remote is the current
branch's upstream remote. The code does not check whether the current
refspec is relevant for this reference but always tries to perform the
reverse transformation, which causes it to error out if the refspec
doesn't match the reference.
Thanks to Pierre-Olivier Latour for the reproduction recipe.
|
|
fad0aea9
|
2014-10-27T01:47:40
|
|
tests: fix leak
|
|
9223f288
|
2014-10-27T01:06:28
|
|
Fix test repo dir not deleted after running
|
|
725cd5f2
|
2014-10-24T16:44:07
|
|
Merge pull request #2646 from libgit2/cmn/remote-rename
remote: accept a repo and name for renaming
|
|
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.
|
|
0862f617
|
2014-10-24T12:19:13
|
|
remote: delete git_remote_supported_url()
This function does not in fact tell us anything, as almost anything with
a colon in it is a valid rsync-style SSH path; it can not tell us that
we do not support ftp or afp or similar as those are still valid SSH
paths and we do support that.
|
|
a6ed1fcb
|
2014-10-10T12:21:28
|
|
Merge pull request #2593 from libgit2/cmn/remote-delete-name
remote: accept a repository and remote name for deletion
|
|
942a7b39
|
2014-10-10T18:03:09
|
|
Fix test build
Some PRs have fallen out of sync with the changes in signatures, so we
need to take a few extra parameters into account.
|
|
2139c9b7
|
2014-10-10T17:50:28
|
|
Merge pull request #2542 from linquize/fetch-head
Do not error out when fetching from second remote
|
|
262eec23
|
2014-09-30T16:07:30
|
|
remote: accept a repository and remote name for deletion
We don't need the remote loaded, and the function extracted both of
these from the git_remote in order to do its work, so let's remote a
step and not ask for the loaded remote at all.
This fixes #2390.
|
|
c5837cad
|
2014-07-04T09:03:33
|
|
remote: implement opportunistic remote-tracking branch updates
When a list of refspecs is passed to fetch (what git would consider
refspec passed on the command-line), we not only need to perform the
updates described in that refspec, but also update the remote-tracking
branch of the fetched remote heads according to the remote's configured
refspecs.
These "fetches" are not however to be written to FETCH_HEAD as they
would be duplicate data, and it's not what the user asked for.
|
|
9c206a22
|
2014-06-06T15:24:53
|
|
remote: use active refspec override in the tests
This lets us test this bit as well as getting closer to what they were
trying to do.
|
|
3f894205
|
2014-06-06T15:01:45
|
|
remote: allow overriding the refspecs for download and fetch
With opportunistic ref updates, git has introduced the concept of having
base refspecs *and* refspecs that are active for a particular fetch.
Let's start by letting the user override the refspecs for download.
|
|
25abbc27
|
2014-09-17T03:19:40
|
|
Clean up some leaks in the test suite
|
|
31e752b6
|
2014-09-09T12:52:36
|
|
Merge pull request #2511 from libgit2/cmn/remote-default-restrict
Restrict which refs can be the default branch
|
|
8deea589
|
2014-09-02T19:35:06
|
|
Add network::fetchlocal multi remotes test
|
|
15c30b72
|
2014-09-02T13:23:54
|
|
clone: handle overly restrictive refspecs
When the fetch refspec does not include the remote's default branch, it
indicates an error in user expectations or programmer error. Error out
in that case.
This lets us get rid of the dummy refspec which can never work as its
zeroed out. In the cases where we did not find a default branch, we set
HEAD detached immediately, which lets us refactor the "normal" path,
removing `found_branch`.
|
|
e128a1af
|
2014-09-02T13:10:19
|
|
clone: correct handling of an unborn HEAD
If the remote does not advertise HEAD, then it is unborn and we cannot
checkout that branch. Handle it the same way as an empty repo.
|
|
538f9081
|
2014-09-01T16:35:10
|
|
remote: add test for single-branch clone
When cloning, we may be asking for a particular branch or subset of
branches. Make sure we test for that.
|
|
f2ffab61
|
2014-09-01T15:59:36
|
|
remote: add tests for remote-branch edge cases
Add tests for the case when there are no branches on the remote and when
HEAD is detached but has the id of a non-branch. In both of these cases,
we should return ENOTFOUND.
|
|
05ac7051
|
2014-08-31T21:53:42
|
|
remote: test for supported URLs in a single place
Instead of using ifdefs to run the tests, use them to set when we expect
to support a particular scheme and always have the tests in the code.
|
|
ba67c075
|
2014-08-31T17:16:40
|
|
remote: get rid of git_remote_valid_url()
It does the same as git_remote_supported_url() but has a name which
implies we'd check the URL for correctness while we're simply looking at
the scheme and looking it up in our lists.
While here, fix up the tests so we check all the combination of what's
supported.
|
|
94412b00
|
2014-08-10T17:48:12
|
|
remote: assert what we want to happen when ther is no default branch
Assert what we already do, so as to notice changes.
|
|
4e53c280
|
2014-08-17T14:55:06
|
|
Check if the refspec matches before transforming
|
|
dc8adda4
|
2014-08-15T22:51:19
|
|
git_remote_ls() should return an error if the transport is not available
|
|
f5287fa6
|
2014-07-04T17:17:23
|
|
refspec: support asterisks in the middle of a pattern
We used to assume a refspec would only have an asterisk in the middle of
their respective pattern. This has not been a valid assumption for some
time now with git.
Instead of assuming where the asterisk is going to be, change the logic
to treat each pattern as having two halves with a replacement bit in the
middle, where the asterisk is.
|
|
193fe9cb
|
2014-07-03T02:41:10
|
|
Merge pull request #2459 from libgit2/cmn/http-url-path
netops: error out on url without a path
|
|
1380e7c6
|
2014-07-03T02:34:32
|
|
netops: error out on url without a path
In order to connect to a remote server, we need to provide a path to the
repository we're interested in. Consider the lack of path in the url an
error.
|
|
6812afaf
|
2014-06-30T21:36:38
|
|
clone: remote git_clone_into{,_local} from the public API
As git_clone now has callbacks to configure the details of the
repository and remote, remove the lower-level functions from the public
API, as they lack some of the logic from git_clone proper.
|
|
1697cd6f
|
2014-06-25T13:20:27
|
|
Improvements to git_transport extensibility
git_remote_set_transport now takes a transport factory rather than a transport
git_clone_options now allows the caller to specify a remote creation callback
|
|
231f350d
|
2014-06-06T22:55:34
|
|
remote: don't free the remote on delete
This was a bad idea. Don't free except in the free function.
|
|
eb6aa791
|
2014-06-06T22:01:35
|
|
remote: failing test for renaming with a symref
|
|
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.
|