<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.c, branch v2.27.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.27.0</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.27.0'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2020-04-22T20:42:49Z</updated>
<entry>
<title>Merge branch 'jk/oid-array-cleanups'</title>
<updated>2020-04-22T20:42:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-04-22T20:42:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a768f866e9233b758cb21e25c7b8c985b0009c1f'/>
<id>urn:sha1:a768f866e9233b758cb21e25c7b8c985b0009c1f</id>
<content type='text'>
Code cleanup.

* jk/oid-array-cleanups:
  oidset: stop referring to sha1-array
  ref-filter: stop referring to "sha1 array"
  bisect: stop referring to sha1_array
  test-tool: rename sha1-array to oid-array
  oid_array: rename source file from sha1-array
  oid_array: use size_t for iteration
  oid_array: use size_t for count and allocation
</content>
</entry>
<entry>
<title>oid_array: rename source file from sha1-array</title>
<updated>2020-03-30T17:59:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-03-30T14:03:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=fe299ec5ae7b419990bbc3efd4e6bfa3f0773b45'/>
<id>urn:sha1:fe299ec5ae7b419990bbc3efd4e6bfa3f0773b45</id>
<content type='text'>
We renamed the actual data structure in 910650d2f8 (Rename sha1_array to
oid_array, 2017-03-31), but the file is still called sha1-array. Besides
being slightly confusing, it makes it more annoying to grep for leftover
occurrences of "sha1" in various files, because the header is included
in so many places.

Let's complete the transition by renaming the source and header files
(and fixing up a few comment references).

I kept the "-" in the name, as that seems to be our style; cf.
fc1395f4a4 (sha1_file.c: rename to use dash in file name, 2018-04-10).
We also have oidmap.h and oidset.h without any punctuation, but those
are "struct oidmap" and "struct oidset" in the code. We _could_ make
this "oidarray" to match, but somehow it looks uglier to me because of
the length of "array" (plus it would be a very invasive patch for little
gain).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>get_superproject_working_tree(): return strbuf</title>
<updated>2020-03-10T18:41:40Z</updated>
<author>
<name>Alexandr Miloslavskiy</name>
<email>alexandr.miloslavskiy@syntevo.com</email>
</author>
<published>2020-03-10T13:11:24Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=49d3c4b481f12c2ec655a71d5a5b9259a398d059'/>
<id>urn:sha1:49d3c4b481f12c2ec655a71d5a5b9259a398d059</id>
<content type='text'>
Together with the previous commits, this commit fully fixes the problem
of using shared buffer for `real_path()` in `get_superproject_working_tree()`.

Signed-off-by: Alexandr Miloslavskiy &lt;alexandr.miloslavskiy@syntevo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>real_path_if_valid(): remove unsafe API</title>
<updated>2020-03-10T18:41:40Z</updated>
<author>
<name>Alexandr Miloslavskiy</name>
<email>alexandr.miloslavskiy@syntevo.com</email>
</author>
<published>2020-03-10T13:11:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4530a85b4c34f009b5f190eb2dc8367801de5028'/>
<id>urn:sha1:4530a85b4c34f009b5f190eb2dc8367801de5028</id>
<content type='text'>
This commit continues the work started with previous commit.

Signed-off-by: Alexandr Miloslavskiy &lt;alexandr.miloslavskiy@syntevo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>real_path: remove unsafe API</title>
<updated>2020-03-10T18:41:40Z</updated>
<author>
<name>Alexandr Miloslavskiy</name>
<email>alexandr.miloslavskiy@syntevo.com</email>
</author>
<published>2020-03-10T13:11:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3d7747e318532a36a263c61cdf92f2decb6424ff'/>
<id>urn:sha1:3d7747e318532a36a263c61cdf92f2decb6424ff</id>
<content type='text'>
Returning a shared buffer invites very subtle bugs due to reentrancy or
multi-threading, as demonstrated by the previous patch.

There was an unfinished effort to abolish this [1].

Let's finally rid of `real_path()`, using `strbuf_realpath()` instead.

This patch uses a local `strbuf` for most places where `real_path()` was
previously called.

However, two places return the value of `real_path()` to the caller. For
them, a `static` local `strbuf` was added, effectively pushing the
problem one level higher:
    read_gitfile_gently()
    get_superproject_working_tree()

[1] https://lore.kernel.org/git/1480964316-99305-1-git-send-email-bmwill@google.com/

Signed-off-by: Alexandr Miloslavskiy &lt;alexandr.miloslavskiy@syntevo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'es/submodule-fetch-message-fix'</title>
<updated>2020-02-12T20:41:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-12T20:41:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=afa34c5cf3ec96b2bc6f2faddf5860fa06cb0f26'/>
<id>urn:sha1:afa34c5cf3ec96b2bc6f2faddf5860fa06cb0f26</id>
<content type='text'>
Error message fix.

* es/submodule-fetch-message-fix:
  submodule: add newline on invalid submodule error
</content>
</entry>
<entry>
<title>Merge branch 'dt/submodule-rm-with-stale-cache'</title>
<updated>2020-02-12T20:41:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-12T20:41:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a74c387495d1640537c5e163b053932ab1992156'/>
<id>urn:sha1:a74c387495d1640537c5e163b053932ab1992156</id>
<content type='text'>
Running "git rm" on a submodule failed unnecessarily when
.gitmodules is only cache-dirty, which has been corrected.

* dt/submodule-rm-with-stale-cache:
  git rm submodule: succeed if .gitmodules index stat info is zero
</content>
</entry>
<entry>
<title>submodule: add newline on invalid submodule error</title>
<updated>2020-02-07T19:05:45Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2020-02-07T00:48:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=303b3c1c4685c020f5d408c997f060a1f8530895'/>
<id>urn:sha1:303b3c1c4685c020f5d408c997f060a1f8530895</id>
<content type='text'>
Since 'err' contains output for multiple submodules and is printed all
at once by fetch_populated_submodules(), errors for each submodule
should be newline separated for readability. The same strbuf is added to
with a newline in the other half of the conditional where this error is
detected, so make the two consistent.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pb/recurse-submodule-in-worktree-fix'</title>
<updated>2020-02-05T22:35:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-05T22:35:00Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ff5134b2fffe202fb48498f15d6e47673f9bd6b2'/>
<id>urn:sha1:ff5134b2fffe202fb48498f15d6e47673f9bd6b2</id>
<content type='text'>
The "--recurse-submodules" option of various subcommands did not
work well when run in an alternate worktree, which has been
corrected.

* pb/recurse-submodule-in-worktree-fix:
  submodule.c: use get_git_dir() instead of get_git_common_dir()
  t2405: clarify test descriptions and simplify test
  t2405: use git -C and test_commit -C instead of subshells
  t7410: rename to t2405-worktree-submodule.sh
</content>
</entry>
<entry>
<title>Merge branch 'es/fetch-show-failed-submodules-atend'</title>
<updated>2020-02-05T22:34:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-05T22:34:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b5c71cc33d8dbd0b95fb05e630fe54f8063467f1'/>
<id>urn:sha1:b5c71cc33d8dbd0b95fb05e630fe54f8063467f1</id>
<content type='text'>
A fetch that is told to recursively fetch updates in submodules
inevitably produces reams of output, and it becomes hard to spot
error messages.  The command has been taught to enumerate
submodules that had errors at the end of the operation.

* es/fetch-show-failed-submodules-atend:
  fetch: emphasize failure during submodule fetch
</content>
</entry>
</feed>
