<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-05-10T07:59:46Z</updated>
<entry>
<title>Merge branch 'bc/hash-transition-interop-part-1'</title>
<updated>2021-05-10T07:59:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-10T07:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aaa3c8065d86e8f25850eb79e90da68d6adcf03f'/>
<id>urn:sha1:aaa3c8065d86e8f25850eb79e90da68d6adcf03f</id>
<content type='text'>
SHA-256 transition.

* bc/hash-transition-interop-part-1:
  hex: print objects using the hash algorithm member
  hex: default to the_hash_algo on zero algorithm value
  builtin/pack-objects: avoid using struct object_id for pack hash
  commit-graph: don't store file hashes as struct object_id
  builtin/show-index: set the algorithm for object IDs
  hash: provide per-algorithm null OIDs
  hash: set, copy, and use algo field in struct object_id
  builtin/pack-redundant: avoid casting buffers to struct object_id
  Use the final_oid_fn to finalize hashing of object IDs
  hash: add a function to finalize object IDs
  http-push: set algorithm when reading object ID
  Always use oidread to read into struct object_id
  hash: add an algo member to struct object_id
</content>
</entry>
<entry>
<title>hash: provide per-algorithm null OIDs</title>
<updated>2021-04-27T07:31:39Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2021-04-26T01:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14228447c9ce664a4e9c31ba10344ec5e4ea4ba5'/>
<id>urn:sha1:14228447c9ce664a4e9c31ba10344ec5e4ea4ba5</id>
<content type='text'>
Up until recently, object IDs did not have an algorithm member, only a
hash.  Consequently, it was possible to share one null (all-zeros)
object ID among all hash algorithms.  Now that we're going to be
handling objects from multiple hash algorithms, it's important to make
sure that all object IDs have a correct algorithm field.

Introduce a per-algorithm null OID, and add it to struct hash_algo.
Introduce a wrapper function as well, and use it everywhere we used to
use the null_oid constant.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*: remove 'const' qualifier for struct index_state</title>
<updated>2021-04-14T20:46:00Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-04-01T01:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=847a9e5d4f876646e128c89f0818b1a8ce792509'/>
<id>urn:sha1:847a9e5d4f876646e128c89f0818b1a8ce792509</id>
<content type='text'>
Several methods specify that they take a 'struct index_state' pointer
with the 'const' qualifier because they intend to only query the data,
not change it. However, we will be introducing a step very low in the
method stack that might modify a sparse-index to become a full index in
the case that our queries venture inside a sparse-directory entry.

This change only removes the 'const' qualifiers that are necessary for
the following change which will actually modify the implementation of
index_name_stage_pos().

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sj/untracked-files-in-submodule-directory-is-not-dirty'</title>
<updated>2021-01-25T22:19:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-01-25T22:19:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=080627942802e767b068a491f3d349227f4e2cdc'/>
<id>urn:sha1:080627942802e767b068a491f3d349227f4e2cdc</id>
<content type='text'>
"git diff" showed a submodule working tree with untracked cruft as
"Submodule commit &lt;objectname&gt;-dirty", but a natural expectation is
that the "-dirty" indicator would align with "git describe --dirty",
which does not consider having untracked files in the working tree
as source of dirtiness.  The inconsistency has been fixed.

* sj/untracked-files-in-submodule-directory-is-not-dirty:
  diff: do not show submodule with untracked files as "-dirty"
</content>
</entry>
<entry>
<title>submodules: fix of regression on fetching of non-init subsub-repo</title>
<updated>2020-12-09T20:32:07Z</updated>
<author>
<name>Peter Kaestle</name>
<email>peter.kaestle@nokia.com</email>
</author>
<published>2020-12-09T10:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=505a27659638614157a36b218fdaf25fe9fed0ce'/>
<id>urn:sha1:505a27659638614157a36b218fdaf25fe9fed0ce</id>
<content type='text'>
A regression has been introduced by a62387b (submodule.c: fetch in
submodules git directory instead of in worktree, 2018-11-28).

The scenario in which it triggers is when one has a repository with a
submodule inside a submodule like this:
superproject/middle_repo/inner_repo

Person A and B have both a clone of it, while Person B is not working
with the inner_repo and thus does not have it initialized in his working
copy.

Now person A introduces a change to the inner_repo and propagates it
through the middle_repo and the superproject.

Once person A pushed the changes and person B wants to fetch them using
"git fetch" at the superproject level, B's git call will return with
error saying:

Could not access submodule 'inner_repo'
Errors during submodule fetch:
         middle_repo

Expectation is that in this case the inner submodule will be recognized
as uninitialized submodule and skipped by the git fetch command.

This used to work correctly before 'a62387b (submodule.c: fetch in
submodules git directory instead of in worktree, 2018-11-28)'.

Starting with a62387b the code wants to evaluate "is_empty_dir()" inside
.git/modules for a directory only existing in the worktree, delivering
then of course wrong return value.

This patch ensures is_empty_dir() is getting the correct path of the
uninitialized submodule by concatenation of the actual worktree and the
name of the uninitialized submodule.

The first attempt to fix this regression, in 1b7ac4e6d4 (submodules:
fix of regression on fetching of non-init subsub-repo, 2020-11-12), by
simply reverting a62387b, resulted in an infinite loop of submodule
fetches in the simpler case of a recursive fetch of a superproject with
uninitialized submodules, and so this commit was reverted in 7091499bc0
(Revert "submodules: fix of regression on fetching of non-init
subsub-repo", 2020-12-02).
To prevent future breakages, also add a regression test for this
scenario.

Signed-off-by: Peter Kaestle &lt;peter.kaestle@nokia.com&gt;
CC: Junio C Hamano &lt;gitster@pobox.com&gt;
CC: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
CC: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
CC: Eric Sunshine &lt;sunshine@sunshineco.us&gt;
Reviewed-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: do not show submodule with untracked files as "-dirty"</title>
<updated>2020-12-08T22:27:35Z</updated>
<author>
<name>Sangeeta Jain</name>
<email>sangunb09@gmail.com</email>
</author>
<published>2020-11-10T08:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ef93124645f89c45c9ec3edd3b268b38154061a'/>
<id>urn:sha1:8ef93124645f89c45c9ec3edd3b268b38154061a</id>
<content type='text'>
Git diff reports a submodule directory as -dirty even when there are
only untracked files in the submodule directory. This is inconsistent
with what `git describe --dirty` says when run in the submodule
directory in that state.

Make `--ignore-submodules=untracked` the default for `git diff` when
there is no configuration variable or command line option, so that the
command would not give '-dirty' suffix to a submodule whose working
tree has untracked files, to make it consistent with `git
describe --dirty` that is run in the submodule working tree.

And also make `--ignore-submodules=none` the default for `git status`
so that the user doesn't end up deleting a submodule that has
uncommitted (untracked) files.

Signed-off-by: Sangeeta Jain &lt;sangunb09@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'so/combine-diff-simplify'</title>
<updated>2020-10-05T21:01:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-05T21:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34415c76c8f67c8692090ef4911d1626689e8f38'/>
<id>urn:sha1:34415c76c8f67c8692090ef4911d1626689e8f38</id>
<content type='text'>
Code simplification.

* so/combine-diff-simplify:
  diff: get rid of redundant 'dense' argument
</content>
</entry>
<entry>
<title>diff: get rid of redundant 'dense' argument</title>
<updated>2020-09-29T18:54:53Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-09-29T11:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d01141de5ab02cf4a156183ef4dc5ee8bf2638a3'/>
<id>urn:sha1:d01141de5ab02cf4a156183ef4dc5ee8bf2638a3</id>
<content type='text'>
Get rid of 'dense' argument that is redundant for every function that has
'struct rev_info *rev' argument as well, as the value of 'dense' passed is
always taken from 'rev-&gt;dense_combined_merges' field.

The only place where this was not the case is in 'submodule.c' where
'diff_tree_combined_merge()' was called with '1' for 'dense' argument. However,
at that call the 'revs' instance used is local to the function, and we now just
set 'revs-&gt;dense_combined_merges' to 1 in this local instance.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mf/submodule-summary-with-correct-repository'</title>
<updated>2020-09-19T00:58:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-19T00:58:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4831c23f75556df8906a508454d70faca0facd27'/>
<id>urn:sha1:4831c23f75556df8906a508454d70faca0facd27</id>
<content type='text'>
"git diff/show" on a change that involves a submodule used to read
the information on commits in the submodule from a wrong repository
and gave a wrong information when the commit-graph is involved.

* mf/submodule-summary-with-correct-repository:
  submodule: use submodule repository when preparing summary
  revision: use repository from rev_info when parsing commits
</content>
</entry>
<entry>
<title>Merge branch 'os/collect-changed-submodules-optim'</title>
<updated>2020-09-19T00:58:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-19T00:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ce9d4e5c7186e15f2e2f7be06a9db52b5e61bde'/>
<id>urn:sha1:2ce9d4e5c7186e15f2e2f7be06a9db52b5e61bde</id>
<content type='text'>
Optimization around submodule handling.

* os/collect-changed-submodules-optim:
  submodule: suppress checking for file name and ref ambiguity for object ids
</content>
</entry>
</feed>
