<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-compat-util.h, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-04-27T16:54:24Z</updated>
<entry>
<title>NetBSD compilation fix</title>
<updated>2009-04-27T16:54:24Z</updated>
<author>
<name>Patrick Welche</name>
<email>prlw1@cam.ac.uk</email>
</author>
<published>2009-04-26T13:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a695fbf388263794ccbd16a342f4e2f8c5d400d'/>
<id>urn:sha1:9a695fbf388263794ccbd16a342f4e2f8c5d400d</id>
<content type='text'>
Similar to other BSD variants, it needs USE_ST_TIMESPEC.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Windows: Skip fstat/lstat optimization in write_entry()</title>
<updated>2009-04-20T19:14:02Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2009-04-20T08:17:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34779c535c4e121414197ab08b4b502a22a75433'/>
<id>urn:sha1:34779c535c4e121414197ab08b4b502a22a75433</id>
<content type='text'>
Commit e4c72923 (write_entry(): use fstat() instead of lstat() when file
is open, 2009-02-09) introduced an optimization of write_entry().
Unfortunately, we cannot take advantage of this optimization on Windows
because there is no guarantee that the time stamps are updated before the
file is closed:

  "The only guarantee about a file timestamp is that the file time is
   correctly reflected when the handle that makes the change is closed."

(http://msdn.microsoft.com/en-us/library/ms724290(VS.85).aspx)

The failure of this optimization on Windows can be observed most easily by
running a 'git checkout' that has to update several large files. In this
case, 'git checkout' will report modified files, but infact only the
timestamps were incorrectly recorded in the index, as can be verified by a
subsequent 'git diff', which shows no change.

Dmitry Potapov reports the same fix needs on Cygwin; this commit contains
his updates for that.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>MinGW: implement mmap</title>
<updated>2009-03-19T02:23:04Z</updated>
<author>
<name>Janos Laube</name>
<email>janos.dev@gmail.com</email>
</author>
<published>2009-03-13T15:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b130a72b274441bb5d687de93efef4d990c40c0a'/>
<id>urn:sha1:b130a72b274441bb5d687de93efef4d990c40c0a</id>
<content type='text'>
Add USE_WIN32_MMAP which triggers the use of windows' native
file memory mapping functionality in git_mmap()/git_munmap() functions.

As git functions currently use mmap with MAP_PRIVATE set only, this
implementation supports only that mode for now.

On Windows, offsets for memory mapped files need to match the allocation
granularity. Take this into account when calculating the packed git-
windowsize and file offsets. At the moment, the only function which makes
use of offsets in conjunction with mmap is use_pack() in sha1-file.c.

Git fast-import's code path tries to map a portion of the temporary
packfile that exceeds the current filesize, i.e. offset+length is
greater than the filesize. The NO_MMAP code worked with that since pread()
just reads the file content until EOF and returns gracefully, while
MapViewOfFile() aborts the mapping and returns 'Access Denied'.
Working around that by determining the filesize and adjusting the length
parameter.

Signed-off-by: Janos Laube &lt;janos.dev@gmail.com&gt;
Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kb/checkout-optim'</title>
<updated>2009-03-18T01:54:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-03-18T01:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9bfe813094cf2c8ea0e30c3196070c868fb294c'/>
<id>urn:sha1:a9bfe813094cf2c8ea0e30c3196070c868fb294c</id>
<content type='text'>
* kb/checkout-optim:
  Revert "lstat_cache(): print a warning if doing ping-pong between cache types"
  checkout bugfix: use stat.mtime instead of stat.ctime in two places
  Makefile: Set compiler switch for USE_NSEC
  Create USE_ST_TIMESPEC and turn it on for Darwin
  Not all systems use st_[cm]tim field for ns resolution file timestamp
  Record ns-timestamps if possible, but do not use it without USE_NSEC
  write_index(): update index_state-&gt;timestamp after flushing to disk
  verify_uptodate(): add ce_uptodate(ce) test
  make USE_NSEC work as expected
  fix compile error when USE_NSEC is defined
  check_updates(): effective removal of cache entries marked CE_REMOVE
  lstat_cache(): print a warning if doing ping-pong between cache types
  show_patch_diff(): remove a call to fstat()
  write_entry(): use fstat() instead of lstat() when file is open
  write_entry(): cleanup of some duplicated code
  create_directories(): remove some memcpy() and strchr() calls
  unlink_entry(): introduce schedule_dir_for_removal()
  lstat_cache(): swap func(length, string) into func(string, length)
  lstat_cache(): generalise longest_match_lstat_cache()
  lstat_cache(): small cleanup and optimisation
</content>
</entry>
<entry>
<title>Create USE_ST_TIMESPEC and turn it on for Darwin</title>
<updated>2009-03-08T21:04:41Z</updated>
<author>
<name>Brian Gernhardt</name>
<email>benji@silverinsanity.com</email>
</author>
<published>2009-03-08T20:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c567383b1e3205c895b371d42a39fbdf131032ba'/>
<id>urn:sha1:c567383b1e3205c895b371d42a39fbdf131032ba</id>
<content type='text'>
Not all OSes use st_ctim and st_mtim in their struct stat.  In
particular, it appears that OS X uses st_*timespec instead.  So add a
Makefile variable and #define called USE_ST_TIMESPEC to switch the
USE_NSEC defines to use st_*timespec.

This also turns it on by default for OS X (Darwin) machines.  Likely
this is a sane default for other BSD kernels as well, but I don't have
any to test that assumption on.

Signed-off-by: Brian Gernhardt &lt;benji@silverinsanity.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Record ns-timestamps if possible, but do not use it without USE_NSEC</title>
<updated>2009-03-08T04:25:16Z</updated>
<author>
<name>Kjetil Barvik</name>
<email>barvik@broadpark.no</email>
</author>
<published>2009-03-04T17:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c06ff4908bf9ad8bf2448439a3574321c9399b17'/>
<id>urn:sha1:c06ff4908bf9ad8bf2448439a3574321c9399b17</id>
<content type='text'>
Traditionally, the lack of USE_NSEC meant "do not record nor use the
nanosecond resolution part of the file timestamps".  To avoid problems on
filesystems that lose the ns part when the metadata is flushed to the disk
and then later read back in, disabling USE_NSEC has been a good idea in
general.

If you are on a filesystem without such an issue, it does not hurt to read
and store them in the cached stat data in the index entries even if your
git is compiled without USE_NSEC.  The index left with such a version of
git can be read by git compiled with USE_NSEC and it can make use of the
nanosecond part to optimize the check to see if the path on the filesystem
hsa been modified since we last looked at.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cleanup: add isascii()</title>
<updated>2009-03-07T19:22:42Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-07T13:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2e9364a06df55e70d7652d37bb4d712f6b3bb3e'/>
<id>urn:sha1:c2e9364a06df55e70d7652d37bb4d712f6b3bb3e</id>
<content type='text'>
Add a standard definition of isascii() and use it to replace an open
coded high-bit test in pretty.c.  While we're there, write the ESC
char as the more commonly used '\033' instead of as 0x1b to enhance
its grepability.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-1.6.0-pack-directory'</title>
<updated>2009-02-25T22:50:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-25T22:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb0cebd7d0ac9bf2ddf94fe5579603819c4a1fc7'/>
<id>urn:sha1:bb0cebd7d0ac9bf2ddf94fe5579603819c4a1fc7</id>
<content type='text'>
* jc/maint-1.6.0-pack-directory:
  Make sure objects/pack exists before creating a new pack
</content>
</entry>
<entry>
<title>Make sure objects/pack exists before creating a new pack</title>
<updated>2009-02-25T22:39:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-25T07:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e180cdcecbb3e828aa892925d7ef67abf81ad80'/>
<id>urn:sha1:6e180cdcecbb3e828aa892925d7ef67abf81ad80</id>
<content type='text'>
In a repository created with git older than f49fb35 (git-init-db: create
"pack" subdirectory under objects, 2005-06-27), objects/pack/ directory is
not created upon initialization.  It was Ok because subdirectories are
created as needed inside directories init-db creates, and back then,
packfiles were recent invention.

After the said commit, new codepaths started relying on the presense of
objects/pack/ directory in the repository.  This was exacerbated with
8b4eb6b (Do not perform cross-directory renames when creating packs,
2008-09-22) that moved the location temporary pack files are created from
objects/ directory to objects/pack/ directory, because moving temporary to
the final location was done carefully with lazy leading directory creation.

Many packfile related operations in such an old repository can fail
mysteriously because of this.

This commit introduces two helper functions to make things work better.

 - odb_mkstemp() is a specialized version of mkstemp() to refactor the
   code and teach it to create leading directories as needed;

 - odb_pack_keep() refactors the code to create a ".keep" file while
   create leading directories as needed.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add is_regex_special()</title>
<updated>2009-01-18T02:30:41Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-01-17T15:50:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f9b7cce61cbd19c99e89b859b5909f0741111185'/>
<id>urn:sha1:f9b7cce61cbd19c99e89b859b5909f0741111185</id>
<content type='text'>
Add is_regex_special(), a character class macro for chars that have a
special meaning in regular expressions.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
