- 01 Apr, 2014 21 commits
-
-
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.
Russell Belfer committed -
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.
Russell Belfer committed -
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.
Russell Belfer committed -
This improvement the management of the lock around submodule cache updates slightly, using the lock to make sure that foreach can safely make a snapshot of all existing submodules and making sure that git_submodule_add_setup also grabs a lock before inserting the new submodule. Cache initialization / refresh should already have been holding the lock correctly as it adds submodules.
Russell Belfer committed -
This makes it so that git_submodule_reload_all will actually only reload changed items unless the `force` flag is used.
Russell Belfer committed -
When forcing cache flushes or reload, etc., it is easier to keep track of intent using enums instead of plain bools. Also, this fixes a bug where the cache was not being properly refreshes by a git_submodule_reload_all.
Russell Belfer committed -
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.
Russell Belfer committed -
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.
Russell Belfer committed -
This allows you to use a --repeat option to run status over and over and see how the output changes as you make local directory changes without reopening the git_repository object each time. Also, adds a flag to explicitly list the submodules before status.
Russell Belfer committed -
Turns out there was already a helper to do what I wanted to do, so I just made it so that I could use it for sync and switched to that instead.
Russell Belfer committed -
This fixes `git_submodule_sync` to correctly update the remote URL of the default branch of the submodule along with the URL in the parent repository config (i.e. match core Git's behavior). Also move some useful helper logic from the submodule code into a shared config API `git_config__update_entry` that can either set or delete an entry with constraints like not overwriting or not creating a new entry. I used that helper to update a couple other places in the code.
Russell Belfer committed -
There are a few places where we need to join three strings to assemble a path. This adds a simple join3 function to avoid the comparatively expensive join_n (which calls strlen on each string twice).
Russell Belfer committed -
In-memory packing backend
Russell Belfer committed -
Fix submodule sort order during iteration
Edward Thomson committed -
Add CFLAGS -Wdeclaration-after-statement
Vicent Marti committed -
This warns local variables declarations after statement, which helps not to break MSVC
Linquize committed -
Use git_object_short_id in examples
Vicent Marti committed -
Rename in-memory remote to anonymous and swap url and fetch order
Vicent Marti committed -
The order in this function is the opposite to what create_with_fetchspec() has, so change this one, as url-then-refspec is what git does. As we need to break compilation and the swap doesn't do that, let's take this opportunity to rename in-memory remotes to anonymous as that's really what sets them apart.
Carlos Martín Nieto committed -
Jiri Pospisil committed
-
Fix git_odb_short_id and git_odb_exists_prefix bugs
Edward Thomson committed
-
- 31 Mar, 2014 9 commits
-
-
Russell Belfer committed
-
Russell Belfer committed
-
With the changes to how git_path_dirload_with_stat handles things that look like submodules, submodules could end up sorted in the wrong order with the workdir iterator. This moves the submodule check earlier in the iterator processing of a new directory so that the submodule name updates will happen immediately and the sort order will be correct.
Russell Belfer committed -
Russell Belfer committed
-
Const up members of git_merge_file_result
Vicent Marti committed -
Edward Thomson committed
-
Introduce git_merge_head_id
Vicent Marti committed -
Edward Thomson committed
-
Don't reset need_pack
Carlos Martín Nieto committed
-
- 30 Mar, 2014 2 commits
-
-
While looping over multiple heads, an up-to-date head will clobber the `remote->need_pack` setting, preventing the rest of the machinery from building and downloading a pack-file, breaking fetches.
Etienne Samson committed -
Update clar to 4b75388
Edward Thomson committed
-
- 29 Mar, 2014 1 commit
-
-
Edward Thomson committed
-
- 28 Mar, 2014 3 commits
-
-
RFC: Sandbox HOME during test execution
Vicent Marti committed -
Edward Thomson committed
-
Edward Thomson committed
-
- 27 Mar, 2014 4 commits
-
-
Fix use-after-free in submodule reload code and other memory leaks
Vicent Marti committed -
Russell Belfer committed
-
Russell Belfer committed
-
If the first call to release a no-longer-existent submodule freed the object, the check if a second is needed would dereference the data that was just freed.
Russell Belfer committed
-