<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/cache.h, branch v2.3.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.7</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-31T21:53:08Z</updated>
<entry>
<title>Merge branch 'jc/report-path-error-to-dir' into maint</title>
<updated>2015-03-31T21:53:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-31T21:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab0fb57aac6c5b6f074c07c7e2729bcff58cc45d'/>
<id>urn:sha1:ab0fb57aac6c5b6f074c07c7e2729bcff58cc45d</id>
<content type='text'>
Code clean-up.

* jc/report-path-error-to-dir:
  report_path_error(): move to dir.c
</content>
</entry>
<entry>
<title>report_path_error(): move to dir.c</title>
<updated>2015-03-24T21:12:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-24T21:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=777c55a61615837d4391facd75cf334b96635801'/>
<id>urn:sha1:777c55a61615837d4391facd75cf334b96635801</id>
<content type='text'>
The expected call sequence is for the caller to use match_pathspec()
repeatedly on a set of pathspecs, accumulating the "hits" in a
separate array, and then call this function to diagnose a pathspec
that never matched anything, as that can indicate a typo from the
command line, e.g. "git commit Maekfile".

Many builtin commands use this function from builtin/ls-files.c,
which is not a very healthy arrangement.  ls-files might have been
the first command to feel the need for such a helper, but the need
is shared by everybody who uses the "match and then report" pattern.

Move it to dir.c where match_pathspec() is defined.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: introduce a "ref paranoia" flag</title>
<updated>2015-03-20T19:40:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-03-20T18:43:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49672f26d9a3826a6a74c6ff4d2409b7b0c74495'/>
<id>urn:sha1:49672f26d9a3826a6a74c6ff4d2409b7b0c74495</id>
<content type='text'>
Most operations that iterate over refs are happy to ignore
broken cruft. However, some operations should be performed
with knowledge of these broken refs, because it is better
for the operation to choke on a missing object than it is to
silently pretend that the ref did not exist (e.g., if we are
computing the set of reachable tips in order to prune
objects).

These processes could just call for_each_rawref, except that
ref iteration is often hidden behind other interfaces. For
instance, for a destructive "repack -ad", we would have to
inform "pack-objects" that we are destructive, and then it
would in turn have to tell the revision code that our
"--all" should include broken refs.

It's much simpler to just set a global for "dangerous"
operations that includes broken refs in all iterations.

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>Merge branch 'jk/prune-mtime' into maint</title>
<updated>2015-03-05T21:13:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-05T21:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cbc8d6d8f8e858072faa2f8fd03d0f255fe0c288'/>
<id>urn:sha1:cbc8d6d8f8e858072faa2f8fd03d0f255fe0c288</id>
<content type='text'>
In v2.2.0, we broke "git prune" that runs in a repository that
borrows from an alternate object store.

* jk/prune-mtime:
  sha1_file: fix iterating loose alternate objects
  for_each_loose_file_in_objdir: take an optional strbuf path
</content>
</entry>
<entry>
<title>Merge branch 'jk/decimal-width-for-uintmax' into maint</title>
<updated>2015-03-05T21:12:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-05T21:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bef3c12d6c0f5be0e95eb143fdd32583bae7a74'/>
<id>urn:sha1:3bef3c12d6c0f5be0e95eb143fdd32583bae7a74</id>
<content type='text'>
We didn't format an integer that wouldn't fit in "int" but in
"uintmax_t" correctly.

* jk/decimal-width-for-uintmax:
  decimal_width: avoid integer overflow
</content>
</entry>
<entry>
<title>for_each_loose_file_in_objdir: take an optional strbuf path</title>
<updated>2015-02-09T22:14:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-02-09T01:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6f875e052bb327d43d86b4e8335ebd4746d3e2a'/>
<id>urn:sha1:e6f875e052bb327d43d86b4e8335ebd4746d3e2a</id>
<content type='text'>
We feed a root "objdir" path to this iterator function,
which then copies the result into a strbuf, so that it can
repeatedly append the object sub-directories to it. Let's
make it easy for callers to just pass us a strbuf in the
first place.

We leave the original interface as a convenience for callers
who want to just pass a const string like the result of
get_object_directory().

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>decimal_width: avoid integer overflow</title>
<updated>2015-02-05T20:38:35Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-02-05T08:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d306f3d3513c62342fec4e31457766f2473f9e9a'/>
<id>urn:sha1:d306f3d3513c62342fec4e31457766f2473f9e9a</id>
<content type='text'>
The decimal_width function originally appeared in blame.c as
"lineno_width", and was designed for calculating the
print-width of small-ish integer values (line numbers in
text files). In ec7ff5b, it was made into a reusable
function, and in dc801e7, we started using it to align
diffstats.

Binary files in a diffstat show byte counts rather than line
numbers, meaning they can be quite large (e.g., consider
adding or removing a 2GB file). decimal_width is not up to
the challenge for two reasons:

  1. It takes the value as an "int", whereas large files may
     easily surpass this. The value may be truncated, in
     which case we will produce an incorrect value.

  2. It counts "up" by repeatedly multiplying another
     integer by 10 until it surpasses the value.  This can
     cause an infinite loop when the value is close to the
     largest representable integer.

     For example, consider using a 32-bit signed integer,
     and a value of 2,140,000,000 (just shy of 2^31-1).
     We will count up and eventually see that 1,000,000,000
     is smaller than our value. The next step would be to
     multiply by 10 and see that 10,000,000,000 is too
     large, ending the loop. But we can't represent that
     value, and we have signed overflow.

     This is technically undefined behavior, but a common
     behavior is to lose the high bits, in which case our
     iterator will certainly be less than the number. So
     we'll keep multiplying, overflow again, and so on.

This patch changes the argument to a uintmax_t (the same
type we use to store the diffstat information for binary
filese), and counts "down" by repeatedly dividing our value
by 10.

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>Merge branch 'dm/compat-s-ifmt-for-zos'</title>
<updated>2014-12-22T20:27:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-22T20:27:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f17ecbd8d58c79e76767da82cf824840dfd367f'/>
<id>urn:sha1:2f17ecbd8d58c79e76767da82cf824840dfd367f</id>
<content type='text'>
Long overdue departure from the assumption that S_IFMT is shared by
everybody made in 2005.

* dm/compat-s-ifmt-for-zos:
  compat: convert modes to use portable file type values
</content>
</entry>
<entry>
<title>Sync with v2.1.4</title>
<updated>2014-12-17T19:46:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-17T19:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77933f4449b8d6aa7529d627f3c7b55336f491db'/>
<id>urn:sha1:77933f4449b8d6aa7529d627f3c7b55336f491db</id>
<content type='text'>
* maint-2.1:
  Git 2.1.4
  Git 2.0.5
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
</content>
</entry>
<entry>
<title>Sync with v2.0.5</title>
<updated>2014-12-17T19:42:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-17T19:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=58f1d950e373afe35ed8661045914d23e973d067'/>
<id>urn:sha1:58f1d950e373afe35ed8661045914d23e973d067</id>
<content type='text'>
* maint-2.0:
  Git 2.0.5
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
</content>
</entry>
</feed>
