<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/dir.c, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-05-23T21:54:29Z</updated>
<entry>
<title>Merge branch 'nd/worktree-various-heads'</title>
<updated>2016-05-23T21:54:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-23T21:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=352d72a30e3d113064ebc194f49560eeae34b332'/>
<id>urn:sha1:352d72a30e3d113064ebc194f49560eeae34b332</id>
<content type='text'>
The experimental "multiple worktree" feature gains more safety to
forbid operations on a branch that is checked out or being actively
worked on elsewhere, by noticing that e.g. it is being rebased.

* nd/worktree-various-heads:
  branch: do not rename a branch under bisect or rebase
  worktree.c: check whether branch is bisected in another worktree
  wt-status.c: split bisect detection out of wt_status_get_state()
  worktree.c: check whether branch is rebased in another worktree
  worktree.c: avoid referencing to worktrees[i] multiple times
  wt-status.c: make wt_status_check_rebase() work on any worktree
  wt-status.c: split rebase detection out of wt_status_get_state()
  path.c: refactor and add worktree_git_path()
  worktree.c: mark current worktree
  worktree.c: make find_shared_symref() return struct worktree *
  worktree.c: store "id" instead of "git_dir"
  path.c: add git_common_path() and strbuf_git_common_path()
  dir.c: rename str(n)cmp_icase to fspath(n)cmp
</content>
</entry>
<entry>
<title>dir.c: rename str(n)cmp_icase to fspath(n)cmp</title>
<updated>2016-04-22T21:09:37Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-04-22T13:01:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba0897e6ae6b0b3f259efb31be0f1ab3d820aacf'/>
<id>urn:sha1:ba0897e6ae6b0b3f259efb31be0f1ab3d820aacf</id>
<content type='text'>
These functions compare two paths that are taken from file system.
Depending on the running file system, paths may need to be compared
case-sensitively or not, and maybe even something else in future. The
current names do not convey that well.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>dir.c: remove dead function fnmatch_icase()</title>
<updated>2016-04-22T21:07:45Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-04-22T12:25:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=423b592a06876a90f584884d4381dcf4d41f6b3b'/>
<id>urn:sha1:423b592a06876a90f584884d4381dcf4d41f6b3b</id>
<content type='text'>
It was largely replaced by fnmatch_icase_mem() and its last use was in
84b8b5d (remove match_pathspec() in favor of match_pathspec_depth() -
2013-07-14).

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ss/exc-flag-is-a-collection-of-bits' into maint</title>
<updated>2016-04-15T01:37:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-15T01:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9fabc7083275f455ef21123cbdcbdd31b21a8251'/>
<id>urn:sha1:9fabc7083275f455ef21123cbdcbdd31b21a8251</id>
<content type='text'>
Code clean-up.

* ss/exc-flag-is-a-collection-of-bits:
  dir: store EXC_FLAG_* values in unsigned integers
</content>
</entry>
<entry>
<title>Merge branch 'ss/exc-flag-is-a-collection-of-bits'</title>
<updated>2016-04-06T18:38:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-06T18:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=12508a83549e59f0160ada423997069bf4a4003f'/>
<id>urn:sha1:12508a83549e59f0160ada423997069bf4a4003f</id>
<content type='text'>
Code clean-up.

* ss/exc-flag-is-a-collection-of-bits:
  dir: store EXC_FLAG_* values in unsigned integers
</content>
</entry>
<entry>
<title>Revert "Merge branch 'nd/exclusion-regression-fix'"</title>
<updated>2016-03-18T18:06:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-03-18T18:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cee349370bd2dce48d0d653ab4ce99bb79a3415'/>
<id>urn:sha1:5cee349370bd2dce48d0d653ab4ce99bb79a3415</id>
<content type='text'>
This reverts commit 5e57f9c3dfe7dd44a1b56bb5b3327d7a1356ec7c, reversing
changes made to e79112d21024beb997951381db21a70b087d459d.

We will be postponing nd/exclusion-regression-fix topic to later
cycle.
</content>
</entry>
<entry>
<title>dir: store EXC_FLAG_* values in unsigned integers</title>
<updated>2016-03-01T18:20:22Z</updated>
<author>
<name>Saurav Sachidanand</name>
<email>sauravsachidanand@gmail.com</email>
</author>
<published>2016-03-01T17:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f870899864e077a54776af838c6476d5850cfaaf'/>
<id>urn:sha1:f870899864e077a54776af838c6476d5850cfaaf</id>
<content type='text'>
The values defined by the macro EXC_FLAG_* (1, 4, 8, 16) are stored
in fields of the structs "pattern" and "exclude", some functions
arguments and a local variable.  None of these uses its most
significant bit in any special way and there is no good reason to
use a signed integer for them.

And while we're at it, document "flags" of "exclude" to explicitly
state the values it's supposed to take on.

Signed-off-by: Saurav Sachidanand &lt;sauravsachidanand@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</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>write_untracked_extension: use FLEX_ALLOC helper</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0b837351084c3cb52c5acaf8a505835e631744a'/>
<id>urn:sha1:e0b837351084c3cb52c5acaf8a505835e631744a</id>
<content type='text'>
We perform unchecked additions when computing the size of a
"struct ondisk_untracked_cache". This is unlikely to have an
integer overflow in practice, but we'd like to avoid this
dangerous pattern to make further audits easier.

Note that there's one subtlety here, though.  We protect
ourselves against a NULL exclude_per_dir entry in our
source, and avoid calling strlen() on it, keeping "len" at
0. But later, we unconditionally memcpy "len + 1" bytes to
get the trailing NUL byte. If we did have a NULL
exclude_per_dir, we would read from bogus memory.

As it turns out, though, we always create this field
pointing to a string literal, so there's no bug. We can just
get rid of the pointless extra conditional.

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>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>
</feed>
