<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/submodule.c, branch v2.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.8.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.8.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-03-04T21:46:30Z</updated>
<entry>
<title>Merge branch 'sb/submodule-parallel-fetch'</title>
<updated>2016-03-04T21:46:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-03-04T21:46:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bbe90e7950456bf1bb1ab17a9ee626f6fad7a7c6'/>
<id>urn:sha1:bbe90e7950456bf1bb1ab17a9ee626f6fad7a7c6</id>
<content type='text'>
Simplify the two callback functions that are triggered when the
child process terminates to avoid misuse of the child-process
structure that has already been cleaned up.

* sb/submodule-parallel-fetch:
  run-command: do not pass child process data into callbacks
</content>
</entry>
<entry>
<title>run-command: do not pass child process data into callbacks</title>
<updated>2016-03-01T17:42:01Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-02-29T21:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a73b3dad09ef162eb5917e9e0d01d7c306f6b35'/>
<id>urn:sha1:2a73b3dad09ef162eb5917e9e0d01d7c306f6b35</id>
<content type='text'>
The expected way to pass data into the callback is to pass them via
the customizable callback pointer. The error reporting in
default_{start_failure, task_finished} is not user friendly enough, that
we want to encourage using the child data for such purposes.

Furthermore the struct child data is cleaned by the run-command API,
before we access them in the callbacks, leading to use-after-free
situations.

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>Merge branch 'ps/config-error'</title>
<updated>2016-02-26T21:37:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-26T21:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=225caa73f25f8577a710f406b2670c3bcf0aef34'/>
<id>urn:sha1:225caa73f25f8577a710f406b2670c3bcf0aef34</id>
<content type='text'>
Many codepaths forget to check return value from git_config_set();
the function is made to die() to make sure we do not proceed when
setting a configuration variable failed.

* ps/config-error:
  config: rename git_config_set_or_die to git_config_set
  config: rename git_config_set to git_config_set_gently
  compat: die when unable to set core.precomposeunicode
  sequencer: die on config error when saving replay opts
  init-db: die on config errors when initializing empty repo
  clone: die on config error in cmd_clone
  remote: die on config error when manipulating remotes
  remote: die on config error when setting/adding branches
  remote: die on config error when setting URL
  submodule--helper: die on config error when cloning module
  submodule: die on config error when linking modules
  branch: die on config error when editing branch description
  branch: die on config error when unsetting upstream
  branch: report errors in tracking branch setup
  config: introduce set_or_die wrappers
</content>
</entry>
<entry>
<title>Merge branch 'jk/tighten-alloc'</title>
<updated>2016-02-26T21:37:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-26T21:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11529ecec914d2f0d7575e6d443c2d5a6ff75424'/>
<id>urn:sha1:11529ecec914d2f0d7575e6d443c2d5a6ff75424</id>
<content type='text'>
Update various codepaths to avoid manually-counted malloc().

* jk/tighten-alloc: (22 commits)
  ewah: convert to REALLOC_ARRAY, etc
  convert ewah/bitmap code to use xmalloc
  diff_populate_gitlink: use a strbuf
  transport_anonymize_url: use xstrfmt
  git-compat-util: drop mempcpy compat code
  sequencer: simplify memory allocation of get_message
  test-path-utils: fix normalize_path_copy output buffer size
  fetch-pack: simplify add_sought_entry
  fast-import: simplify allocation in start_packfile
  write_untracked_extension: use FLEX_ALLOC helper
  prepare_{git,shell}_cmd: use argv_array
  use st_add and st_mult for allocation size computation
  convert trivial cases to FLEX_ARRAY macros
  use xmallocz to avoid size arithmetic
  convert trivial cases to ALLOC_ARRAY
  convert manual allocations to argv_array
  argv-array: add detach function
  add helpers for allocating flex-array structs
  harden REALLOC_ARRAY and xcalloc against size_t overflow
  tree-diff: catch integer overflow in combine_diff_path allocation
  ...
</content>
</entry>
<entry>
<title>use st_add and st_mult for allocation size computation</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50a6c8efa2bbeddf46ca34c7765024108202e04b'/>
<id>urn:sha1:50a6c8efa2bbeddf46ca34c7765024108202e04b</id>
<content type='text'>
If our size computation overflows size_t, we may allocate a
much smaller buffer than we expected and overflow it. It's
probably impossible to trigger an overflow in most of these
sites in practice, but it is easy enough convert their
additions and multiplications into overflow-checking
variants. This may be fixing real bugs, and it makes
auditing the code easier.

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>config: rename git_config_set_or_die to git_config_set</title>
<updated>2016-02-22T18:23:55Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2016-02-22T11:23:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d1806487af395fb33d1de92633e96571b296305'/>
<id>urn:sha1:3d1806487af395fb33d1de92633e96571b296305</id>
<content type='text'>
Rename git_config_set_or_die functions to git_config_set, leading
to the new default behavior of dying whenever a configuration
error occurs.

By now all callers that shall die on error have been transitioned
to the _or_die variants, thus making this patch a simple rename
of the functions.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: rename git_config_set to git_config_set_gently</title>
<updated>2016-02-22T18:23:55Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2016-02-22T11:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30598ad06f2adfef1f74d6348677358865cbf373'/>
<id>urn:sha1:30598ad06f2adfef1f74d6348677358865cbf373</id>
<content type='text'>
The desired default behavior for `git_config_set` is to die
whenever an error occurs. Dying is the default for a lot of
internal functions when failures occur and is in this case the
right thing to do for most callers as otherwise we might run into
inconsistent repositories without noticing.

As some code may rely on the actual return values for
`git_config_set` we still require the ability to invoke these
functions without aborting. Rename the existing `git_config_set`
functions to `git_config_set_gently` to keep them available for
those callers.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule: die on config error when linking modules</title>
<updated>2016-02-22T18:23:52Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2016-02-22T11:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a90dfe8a7e3fae31aa0b13b799bd3345e91e985'/>
<id>urn:sha1:1a90dfe8a7e3fae31aa0b13b799bd3345e91e985</id>
<content type='text'>
When trying to connect a submodule with its corresponding
repository in '.git/modules' we try to set the core.worktree
setting in the submodule, which may fail due to an error
encountered in `git_config_set_in_file`.

The function is used in the git-mv command when trying to move a
submodule to another location. We already die when renaming a
file fails but do not pay attention to the case where updating
the connection between submodule and its repository fails. As
this leaves the repository in an inconsistent state, as well,
abort the program by dying early and presenting the failure to
the user.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodules: allow parallel fetching, add tests and documentation</title>
<updated>2015-12-16T20:06:08Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-12-16T00:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=62104ba14af4845c6c1ba1dab05fad4a289d806f'/>
<id>urn:sha1:62104ba14af4845c6c1ba1dab05fad4a289d806f</id>
<content type='text'>
This enables the work of the previous patches.

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>fetch_populated_submodules: use new parallel job processing</title>
<updated>2015-12-16T20:06:08Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-12-16T00:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe85ee6e23e642985004d37e63b4c0d0e5f30587'/>
<id>urn:sha1:fe85ee6e23e642985004d37e63b4c0d0e5f30587</id>
<content type='text'>
In a later patch we enable parallel processing of submodules, this
only adds the possibility for it. So this change should not change
any user facing behavior.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
