summaryrefslogtreecommitdiff
path: root/src/submodule.h
Commit message (Collapse)AuthorAgeFilesLines
* index: make relative comparison use the checksum as wellcmn/index-checksumCarlos Martín Nieto2015-06-201-1/+1
| | | | | | This is used by the submodule in order to figure out if the index has changed since it last read it. Using a timestamp is racy, so let's make it use the checksum, just like we now do for reloading the index itself.
* Make submodule refresh a bit smarterRussell Belfer2014-04-011-6/+0
| | | | | | This makes submodule cache refresh actually look at the timestamps from the data sources for submodules and reload as needed if they have changed since the last refresh.
* Make a real submodule cache objectRussell Belfer2014-04-011-0/+29
| | | | | | | This takes the old submodule cache which was just a git_strmap and makes a real git_submodule_cache object that can contain other things like a lock and timestamp-ish data to control refreshing of submodule info.
* CleanupsRussell Belfer2014-03-311-1/+1
|
* Add faster git_submodule__is_submodule checkRussell Belfer2014-03-311-0/+3
|
* Fix submodule leaks and invalid referencesRussell Belfer2014-03-251-0/+5
| | | | | | | This cleans up some places I missed that could hold onto submodule references and cleans up the way in which the repository cache is both reloaded and released so that existing submodule references aren't destroyed inappropriately.
* Make submodules externally refcountedRussell Belfer2014-03-251-3/+0
| | | | | | | | `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.
* Make submodule fetchRecurse match other optionsRussell Belfer2014-01-301-1/+4
| | | | | | 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).
* Read the submodule branch option from Git 1.8.2.Robert Konrad2014-01-021-0/+1
|
* Accept 'submodule.*.fetchRecurseSubmodules' config 'on-demand' valueLinquize2013-12-311-1/+1
|
* Add ignore_submodules to diff optionsRussell Belfer2013-07-101-0/+8
| | | | | | | | | | | | | | | | | | | | This adds correct support for an equivalent to --ignore-submodules in diff, where an actual ignore value can be passed to diff to override the per submodule settings in the configuration. This required tweaking the constants for ignore values so that zero would not be used and could represent an unset option to the diff. This was an opportunity to move the submodule values into include/git2/types.h and to rename the poorly named DEFAULT values for ignore and update constants to RESET instead. Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL (which is actually a minor change from the old behavior in that submodules will now be treated as UNMODIFIED deltas instead of being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED). This includes tests for the various new settings.
* Submodule status improvementsRussell Belfer2013-07-101-12/+26
| | | | | | | | | | | | | | | This fixes the way that submodule status is checked to bypass just about all of the caching in the submodule object. Based on the ignore value, it will try to do the minimum work necessary to find the current status of the submodule - but it will actually go to disk to get all of the current values. This also removes the custom refcounting stuff in favor of the common git_refcount style. Right now, it is still for internal purposes only, but it should make it easier to add true submodule refcounting in the future with a public git_submodule_free call that will allow bindings not to worry about the submodule object getting freed from underneath them.
* Add timestamp check to submodule statusRussell Belfer2013-07-101-17/+31
| | | | | | | | This is probably not the final form of this change, but this is a preliminary version of checking a timestamp to see if the cached working directory HEAD OID matches the current. Right now, this uses the timestamp on the index and is, like most of our timestamp checking, subject to having only second accuracy.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Working implementation of git_submodule_statusRussell Belfer2012-08-241-5/+13
| | | | | | | | | | | | | This is a big redesign of the git_submodule_status API and the implementation of the redesigned API. It also fixes a number of bugs that I found in other parts of the submodule API while writing the tests for the status part. This also fixes a couple of bugs in the iterators that had not been noticed before - one with iterating when there is a gitlink (i.e. separate-work-dir) and one where I was treating anything even vaguely submodule-like as a submodule, more aggressively than core git does.
* Major submodule rewriteRussell Belfer2012-08-241-0/+94
This replaces the old submodule API with a new extended API that supports most of the things that can be done with `git submodule`.