|
129788a6
|
2015-03-18T11:45:18
|
|
Implement git_submodule_set_branch.
|
|
e6903ea2
|
2015-03-12T16:05:07
|
|
Fix git_submodule_sync writing URL to wrong key.
Currently git_submodule_sync writes the submodule's URL to the
key 'branch.<REMOTE_NAME>.remote' while the reference
implementation of `git submodule sync` writes to
'remote.<REMOTE_NAME>.url', which is the intended behavior
according to git-submodule(1).
|
|
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.
|
|
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.
|
|
fe8399fe
|
2015-01-09T16:29:08
|
|
Fix warning
|
|
365d3672
|
2015-01-08T21:32:44
|
|
submodule::init tests: free some leaks
|
|
9d1f97df
|
2014-10-29T17:49:04
|
|
Introduce a convenience function for submodule update
This introduces the functionality of submodule update in
'git_submodule_do_update'. The existing 'git_submodule_update' function is
renamed to 'git_submodule_update_strategy'. The 'git_submodule_update'
function now refers to functionality similar to `git submodule update`,
while `git_submodule_update_strategy` is used to get the configured value
of submodule.<name>.update.
|
|
b2ab887e
|
2014-10-20T18:07:32
|
|
submodule init should resolve relative url paths
Submodule init should handle relative paths in .gitmodules files
and resolve these urls when updating the git config file.
|
|
209425ce
|
2014-11-08T13:25:51
|
|
remote: rename _load() to _lookup()
This brings it in line with the rest of the lookup functions.
|
|
62a617dc
|
2014-11-06T16:16:46
|
|
iterator: submodules are determined by an index or tree
We cannot know from looking at .gitmodules whether a directory is a
submodule or not. We need the index or tree we are comparing against to
tell us. Otherwise we have to assume the entry in .gitmodules is stale
or otherwise invalid.
Thus we pass the index of the repository into the workdir iterator, even
if we do not want to compare against it. This follows what git does,
which even for `git diff <tree>`, it will consider staged submodules as
such.
|
|
e4985fe3
|
2014-10-25T19:52:52
|
|
submodule test: free submodule
|
|
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.
|
|
ce5e6617
|
2014-06-08T16:44:32
|
|
Merge pull request #2407 from libgit2/cmn/remote-rename-more
More remote rename fixes
|
|
daf2a648
|
2014-06-07T12:18:56
|
|
Win32: Fix diff::workdir::submodules test #2361
|
|
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.
|
|
eedeeb9e
|
2014-04-03T11:58:51
|
|
Test (and fix) the git_submodule_sync changes
I wrote this stuff a while ago and forgot to write tests. Wanted
to do so now to wrap up the PR and immediately found problems.
|
|
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
|
|
12d4ed4d
|
2014-03-08T23:04:56
|
|
Test git_submodule_add_setup with relative url
|
|
8f4e5275
|
2014-04-01T16:46:25
|
|
More tests and fix submodule index refresh
There was a little bug where the submodule cache thought that the
index date was out of date even when it wasn't that was resulting
in some extra scans of index data even when not needed.
Mostly this commit adds a bunch of new tests including adding and
removing submodules in the index and in the HEAD and seeing if we
can automatically pick them up when refreshing.
|
|
8061d519
|
2014-04-01T13:24:06
|
|
Remove most submodule reloads from tests
With the new submodule cache validity checks, we generally don't
need to call git_submodule_reload_all to have up-to-date submodule
data. Some tests are still calling it where I want to actually
test that it can be called safely and doesn't break anything, but
mostly it is not needed.
This also expands some of the existing submodule tests to cover
some variants on the behavior that was already being tested.
|
|
4ece3e22
|
2014-04-01T12:19:11
|
|
Fix submodule accounting for name and path changes
Wrote tests that try adding, removing, and updating the name of
submodules which showed a number of problems with how we account
for changes when incrementally updating the submodule info. Most
of these issues didn't exist before because reloading would always
blow away the old submodule data.
|
|
380f864a
|
2014-03-26T16:06:21
|
|
Fix error when submodule path and name differ
When a submodule was inserted with a different path and name, the
return value from khash greater than zero was allowed to propagate
back out to the caller when it should really be zeroed. This led
to a possible crash when reloading submodules if that was the
first time that submodule data was loaded.
|
|
22df47cb
|
2014-03-26T14:38:26
|
|
Fix segfault if gitmodules is invalid
The reload_all call could end up dereferencing a NULL pointer if
there was an error while attempting to load the submodules config
data (i.e. invalid content in the gitmodules file). This fixes it.
|
|
dc7efa1a
|
2014-03-26T18:29:34
|
|
Merge pull request #2204 from libgit2/rb/submodule-reference-counting
Make submodules externally refcounted
|
|
d3bc95fd
|
2014-03-25T12:37:05
|
|
Update behavior for untracked sub-repos
When a directory containing a .git directory (or even just a plain
gitlink) was found, libgit2 was going out of its way to treat it
specially. This seemed like it was necessary because the diff
code was not originally emulating Git's behavior for untracked
directories correctly (i.e. scanning for ignored vs untracked items
inside). Now that libgit2 diff mimics Git's untracked directory
behavior, the special handling for contained Git repos is actually
incorrect and this commit rips it out.
|
|
a15c7802
|
2014-03-25T09:14:48
|
|
Make submodules externally refcounted
`git_submodule` objects were already refcounted internally in case
the submodule name was different from the path at which it was
stored. This makes that refcounting externally used as well, so
`git_submodule_lookup` and `git_submodule_add_setup` return an
object that requires a `git_submodule_free` when done.
|
|
c0644c3f
|
2014-01-28T11:45:06
|
|
Make submodule fetchRecurse match other options
This removes the fetchRecurse compiler warnings and makes the
behavior match the other submodule options (i.e. the in-memory
setting can be reset to the on-disk value).
|
|
0b28217b
|
2014-01-15T12:51:31
|
|
refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
|
41ceab25
|
2013-12-29T11:21:13
|
|
Update test related to fetchRecurseSubmodules
|
|
17820381
|
2013-11-14T14:05:52
|
|
Rename tests-clar to tests
|