<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.c, branch v2.15.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.15.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.15.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-10-03T06:42:49Z</updated>
<entry>
<title>Merge branch 'sb/submodule-diff-header-fix'</title>
<updated>2017-10-03T06:42:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-10-03T06:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9257d3d7db17be306875f41b842716d275a3f76a'/>
<id>urn:sha1:9257d3d7db17be306875f41b842716d275a3f76a</id>
<content type='text'>
Error message tweak.

* sb/submodule-diff-header-fix:
  submodule: correct error message for missing commits
</content>
</entry>
<entry>
<title>Merge branch 'hn/submodule-comment'</title>
<updated>2017-10-03T06:42:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-10-03T06:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f777fad342e5a12cc910516ba575db4c3e4e53a'/>
<id>urn:sha1:2f777fad342e5a12cc910516ba575db4c3e4e53a</id>
<content type='text'>
* hn/submodule-comment:
  submodule.c: describe submodule_to_gitdir() in a new comment
</content>
</entry>
<entry>
<title>Merge branch 'ma/leakplugs'</title>
<updated>2017-09-29T02:23:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-29T02:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69c54c72845ebc686d0f4bdd8d44b06f799b0a80'/>
<id>urn:sha1:69c54c72845ebc686d0f4bdd8d44b06f799b0a80</id>
<content type='text'>
Memory leaks in various codepaths have been plugged.

* ma/leakplugs:
  pack-bitmap[-write]: use `object_array_clear()`, don't leak
  object_array: add and use `object_array_pop()`
  object_array: use `object_array_clear()`, not `free()`
  leak_pending: use `object_array_clear()`, not `free()`
  commit: fix memory leak in `reduce_heads()`
  builtin/commit: fix memory leak in `prepare_index()`
</content>
</entry>
<entry>
<title>submodule: correct error message for missing commits</title>
<updated>2017-09-28T05:15:20Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-09-26T18:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d94dd2fc6428ff5f0a18223aadaaecd49fd18e5'/>
<id>urn:sha1:2d94dd2fc6428ff5f0a18223aadaaecd49fd18e5</id>
<content type='text'>
When a submodule diff should be displayed we currently just add the
submodule objects to the main object store and then e.g. walk the
revision graph and create a summary for that submodule.

It is possible that we are missing the submodule either completely or
partially, which we currently differentiate with different error messages
depending on whether (1) the whole submodule object store is missing or
(2) just the needed for this particular diff. (1) is reported as
"not initialized", and (2) is reported as "commits not present".

If a submodule is deinit'ed its repository data is still around inside
the superproject, such that the diff can still be produced. In that way
the error message (1) is misleading as we can have a diff despite the
submodule being not initialized.

Downgrade the error message (1) to be the same as (2) and just say
the commits are not present, as that is the true reason why the diff
cannot be shown.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule.c: describe submodule_to_gitdir() in a new comment</title>
<updated>2017-09-26T05:08:23Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2017-09-25T15:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ce08548bb8768259c98f7fcf30be4c0bae9c611'/>
<id>urn:sha1:3ce08548bb8768259c98f7fcf30be4c0bae9c611</id>
<content type='text'>
Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jn/per-repo-object-store-fixes'</title>
<updated>2017-09-25T06:24:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-25T06:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ceb7a01aac907f124ca9bc0d768336e7c0aaa944'/>
<id>urn:sha1:ceb7a01aac907f124ca9bc0d768336e7c0aaa944</id>
<content type='text'>
Step #0 of a planned &amp; larger series to make the in-core object
store per in-core repository object.

* jn/per-repo-object-store-fixes:
  replace-objects: evaluate replacement refs without using the object store
  push, fetch: error out for submodule entries not pointing to commits
  pack: make packed_git_mru global a value instead of a pointer
</content>
</entry>
<entry>
<title>object_array: use `object_array_clear()`, not `free()`</title>
<updated>2017-09-24T01:06:01Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2017-09-22T23:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dcb572ab94f83a1a857d276fcebff5700077f2b7'/>
<id>urn:sha1:dcb572ab94f83a1a857d276fcebff5700077f2b7</id>
<content type='text'>
Instead of freeing `foo.objects` for an object array `foo` (sometimes
conditionally), call `object_array_clear(&amp;foo)`. This means we don't
poke as much into the implementation, which is already a good thing, but
also that we release the individual entries as well, thereby fixing at
least one memory-leak (in diff-lib.c).

If someone is holding on to a pointer to an element's `name` or `path`,
that is now a dangling pointer, i.e., we'd be turning an unpleasant
situation into an outright bug. To the best of my understanding no such
long-term pointers are being taken.

The way we handle `study` in builting/reflog.c still looks like it might
leak. That will be addressed in the next commit.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/prune-in-worktree'</title>
<updated>2017-09-19T01:47:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-19T01:47:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8a044c7f1d56cef657be342e40de0795d688e882'/>
<id>urn:sha1:8a044c7f1d56cef657be342e40de0795d688e882</id>
<content type='text'>
"git gc" and friends when multiple worktrees are used off of a
single repository did not consider the index and per-worktree refs
of other worktrees as the root for reachability traversal, making
objects that are in use only in other worktrees to be subject to
garbage collection.

* nd/prune-in-worktree:
  refs.c: reindent get_submodule_ref_store()
  refs.c: remove fallback-to-main-store code get_submodule_ref_store()
  rev-list: expose and document --single-worktree
  revision.c: --reflog add HEAD reflog from all worktrees
  files-backend: make reflog iterator go through per-worktree reflog
  revision.c: --all adds HEAD from all worktrees
  refs: remove dead for_each_*_submodule()
  refs.c: move for_each_remote_ref_submodule() to submodule.c
  revision.c: use refs_for_each*() instead of for_each_*_submodule()
  refs: add refs_head_ref()
  refs: move submodule slash stripping code to get_submodule_ref_store
  refs.c: refactor get_submodule_ref_store(), share common free block
  revision.c: --indexed-objects add objects from all worktrees
  revision.c: refactor add_index_objects_to_pending()
  refs.c: use is_dir_sep() in resolve_gitlink_ref()
  revision.h: new flag in struct rev_info wrt. worktree-related refs
</content>
</entry>
<entry>
<title>push, fetch: error out for submodule entries not pointing to commits</title>
<updated>2017-09-14T06:05:51Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-09-12T17:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3c96aa97232367a24eef8b3b387f5ddae5b0c10f'/>
<id>urn:sha1:3c96aa97232367a24eef8b3b387f5ddae5b0c10f</id>
<content type='text'>
The check_has_commit helper uses resolves a submodule entry to a
commit, when validating its existence. As a side effect this means
tolerates a submodule entry pointing to a tag, which is not a valid
submodule entry that git commands would know how to cope with.

Tighten the check to require an actual commit, not a tag pointing to a
commit.

Also improve the error handling when a submodule entry points to
non-commit (e.g., a blob) to error out instead of warning and
pretending the pointed to object doesn't exist.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bw/push-options-recursively-to-submodules' into maint</title>
<updated>2017-09-10T08:02:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-10T08:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eba2a68f25c8afc56e204daf707e80613cc6e926'/>
<id>urn:sha1:eba2a68f25c8afc56e204daf707e80613cc6e926</id>
<content type='text'>
"git push --recurse-submodules $there HEAD:$target" was not
propagated down to the submodules, but now it is.

* bw/push-options-recursively-to-submodules:
  submodule--helper: teach push-check to handle HEAD
</content>
</entry>
</feed>
