<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.c, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-10-25T23:06:56Z</updated>
<entry>
<title>Merge branch 'jt/no-abuse-alternate-odb-for-submodules'</title>
<updated>2021-10-25T23:06:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-25T23:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=162a13b855ee8d920a31d6d1e928cef0f0a18e18'/>
<id>urn:sha1:162a13b855ee8d920a31d6d1e928cef0f0a18e18</id>
<content type='text'>
Follow through the work to use the repo interface to access
submodule objects in-process, instead of abusing the alternate
object database interface.

* jt/no-abuse-alternate-odb-for-submodules:
  submodule: trace adding submodule ODB as alternate
  submodule: pass repo to check_has_commit()
  object-file: only register submodule ODB if needed
  merge-{ort,recursive}: remove add_submodule_odb()
  refs: peeling non-the_repository iterators is BUG
  refs: teach arbitrary repo support to iterators
  refs: plumb repo into ref stores
</content>
</entry>
<entry>
<title>Merge branch 'en/removing-untracked-fixes'</title>
<updated>2021-10-13T22:15:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-13T22:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a7c2daa06d6f7d8fd13a1d72f23741acbaeba522'/>
<id>urn:sha1:a7c2daa06d6f7d8fd13a1d72f23741acbaeba522</id>
<content type='text'>
Various fixes in code paths that move untracked files away to make room.

* en/removing-untracked-fixes:
  Documentation: call out commands that nuke untracked files/directories
  Comment important codepaths regarding nuking untracked files/dirs
  unpack-trees: avoid nuking untracked dir in way of locally deleted file
  unpack-trees: avoid nuking untracked dir in way of unmerged file
  Change unpack_trees' 'reset' flag into an enum
  Remove ignored files by default when they are in the way
  unpack-trees: make dir an internal-only struct
  unpack-trees: introduce preserve_ignored to unpack_trees_options
  read-tree, merge-recursive: overwrite ignored files by default
  checkout, read-tree: fix leak of unpack_trees_options.dir
  t2500: add various tests for nuking untracked files
</content>
</entry>
<entry>
<title>Merge branch 'ab/designated-initializers'</title>
<updated>2021-10-11T17:21:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-11T17:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=404c4a54624c3e0ea9066809344a6269c16de69f'/>
<id>urn:sha1:404c4a54624c3e0ea9066809344a6269c16de69f</id>
<content type='text'>
Code clean-up.

* ab/designated-initializers:
  cbtree.h: define cb_init() in terms of CBTREE_INIT
  *.h: move some *_INIT to designated initializers
  *.h _INIT macros: don't specify fields equal to 0
  *.[ch] *_INIT macros: use { 0 } for a "zero out" idiom
  submodule-config.h: remove unused SUBMODULE_INIT macro
</content>
</entry>
<entry>
<title>submodule: trace adding submodule ODB as alternate</title>
<updated>2021-10-08T22:06:06Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2021-10-08T21:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=71ef66d7403c05a6fe8ec118431332a8919b52a2'/>
<id>urn:sha1:71ef66d7403c05a6fe8ec118431332a8919b52a2</id>
<content type='text'>
Submodule ODBs are never added as alternates during the execution of the
test suite, but there may be a rare interaction that the test suite does
not have coverage of. Add a trace message when this happens, so that
users who trace their commands can notice such occurrences.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: pass repo to check_has_commit()</title>
<updated>2021-10-08T22:06:06Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2021-10-08T21:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13a2f620b27c0fa29de026de5d74a2434c565ece'/>
<id>urn:sha1:13a2f620b27c0fa29de026de5d74a2434c565ece</id>
<content type='text'>
Pass the repo explicitly when calling check_has_commit() to avoid
relying on add_submodule_odb(). With this commit and the parent commit,
the last remaining tests no longer rely on add_submodule_odb(), so mark
these tests accordingly.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/add-submodule-odb-clean-up'</title>
<updated>2021-10-06T20:40:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-06T20:40:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=921c795c25577e40df1f607a22748332bfb225ea'/>
<id>urn:sha1:921c795c25577e40df1f607a22748332bfb225ea</id>
<content type='text'>
More code paths that use the hack to add submodule's object
database to the set of alternate object store have been cleaned up.

* jt/add-submodule-odb-clean-up:
  revision: remove "submodule" from opt struct
  repository: support unabsorbed in repo_submodule_init
  submodule: remove unnecessary unabsorbed fallback
</content>
</entry>
<entry>
<title>Merge branch 'jk/ref-paranoia' into jt/no-abuse-alternate-odb-for-submodules</title>
<updated>2021-09-28T22:15:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-28T22:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6b210c5e1705c28274ac2e83a500644c126dd9a'/>
<id>urn:sha1:b6b210c5e1705c28274ac2e83a500644c126dd9a</id>
<content type='text'>
* jk/ref-paranoia: (71 commits)
  refs: drop "broken" flag from for_each_fullref_in()
  ref-filter: drop broken-ref code entirely
  ref-filter: stop setting FILTER_REFS_INCLUDE_BROKEN
  repack, prune: drop GIT_REF_PARANOIA settings
  refs: turn on GIT_REF_PARANOIA by default
  refs: omit dangling symrefs when using GIT_REF_PARANOIA
  refs: add DO_FOR_EACH_OMIT_DANGLING_SYMREFS flag
  refs-internal.h: reorganize DO_FOR_EACH_* flag documentation
  refs-internal.h: move DO_FOR_EACH_* flags next to each other
  t5312: be more assertive about command failure
  t5312: test non-destructive repack
  t5312: create bogus ref as necessary
  t5312: drop "verbose" helper
  t5600: provide detached HEAD for corruption failures
  t5516: don't use HEAD ref for invalid ref-deletion tests
  t7900: clean up some more broken refs
  The eighth batch
  t0000: avoid masking git exit value through pipes
  tree-diff: fix leak when not HAVE_ALLOCA_H
  pack-revindex.h: correct the time complexity descriptions
  ...
</content>
</entry>
<entry>
<title>*.h: move some *_INIT to designated initializers</title>
<updated>2021-09-27T21:48:00Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-09-27T12:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f69a6e4f076ec9ec89d94a6d960d0c161381a597'/>
<id>urn:sha1:f69a6e4f076ec9ec89d94a6d960d0c161381a597</id>
<content type='text'>
Move various *_INIT macros to use designated initializers. This helps
readability. I've only picked those leftover macros that were not
touched by another in-flight series of mine which changed others, but
also how initialization was done.

In the case of SUBMODULE_ALTERNATE_SETUP_INIT I've left an explicit
initialization of "error_mode", even though
SUBMODULE_ALTERNATE_ERROR_IGNORE itself is defined as "0". Let's not
peek under the hood and assume that enum fields we know the value of
will stay at "0".

The change to "TESTSUITE_INIT" in "t/helper/test-run-command.c" was
part of an earlier on-list version[1] of c90be786da9 (test-tool
run-command: fix flip-flop init pattern, 2021-09-11).

1. https://lore.kernel.org/git/patch-1.1-0aa4523ab6e-20210909T130849Z-avarab@gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Comment important codepaths regarding nuking untracked files/dirs</title>
<updated>2021-09-27T20:38:37Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-09-27T16:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94b7f1563ace91af823125e5b8895cb24b2c0e4a'/>
<id>urn:sha1:94b7f1563ace91af823125e5b8895cb24b2c0e4a</id>
<content type='text'>
In the last few commits we focused on code in unpack-trees.c that
mistakenly removed untracked files or directories.  There may be more of
those, but in this commit we change our focus: callers of toplevel
commands that are expected to remove untracked files or directories.

As noted previously, we have toplevel commands that are expected to
delete untracked files such as 'read-tree --reset', 'reset --hard', and
'checkout --force'.  However, that does not mean that other highlevel
commands that happen to call these other commands thought about or
conveyed to users the possibility that untracked files could be removed.
Audit the code for such callsites, and add comments near existing
callsites to mention whether these are safe or not.

My auditing is somewhat incomplete, though; it skipped several cases:
  * git-rebase--preserve-merges.sh: is in the process of being
    deprecated/removed, so I won't leave a note that there are
    likely more bugs in that script.
  * contrib/git-new-workdir: why is the -f flag being used in a new
    empty directory??  It shouldn't hurt, but it seems useless.
  * git-p4.py: Don't see why -f is needed for a new dir (maybe it's
    not and is just superfluous), but I'm not at all familiar with
    the p4 stuff
  * git-archimport.perl: Don't care; arch is long since dead
  * git-cvs*.perl: Don't care; cvs is long since dead

Also, the reset --hard in builtin/worktree.c looks safe, due to only
running in an empty directory.

Signed-off-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 'jt/submodule-name-to-gitdir'</title>
<updated>2021-09-23T20:44:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-23T20:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f7511fdfbd6dc249aca551d56fcb3011d85ddd08'/>
<id>urn:sha1:f7511fdfbd6dc249aca551d56fcb3011d85ddd08</id>
<content type='text'>
Code refactoring.

* jt/submodule-name-to-gitdir:
  submodule: extract path to submodule gitdir func
</content>
</entry>
</feed>
