<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-compat-util.h, branch v2.14.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.14.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.14.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-08-23T21:33:46Z</updated>
<entry>
<title>Merge branch 'rs/move-array' into maint</title>
<updated>2017-08-23T21:33:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-08-23T21:33:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3b7ee087e3ed409b943d62501bd7fb8dbd96dd8'/>
<id>urn:sha1:d3b7ee087e3ed409b943d62501bd7fb8dbd96dd8</id>
<content type='text'>
Code clean-up.

* rs/move-array:
  ls-files: don't try to prune an empty index
  apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
  use MOVE_ARRAY
  add MOVE_ARRAY
</content>
</entry>
<entry>
<title>Merge branch 'tb/push-to-cygwin-unc-path'</title>
<updated>2017-07-18T19:48:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-07-18T19:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33400c0e96460f36708789a6a3c8eeb7cbc8f0cc'/>
<id>urn:sha1:33400c0e96460f36708789a6a3c8eeb7cbc8f0cc</id>
<content type='text'>
On Cygwin, similar to Windows, "git push //server/share/repository"
ought to mean a repository on a network share that can be accessed
locally, but this did not work correctly due to stripping the double
slashes at the beginning.

This may need to be heavily tested before it gets unleashed to the
wild, as the change is at a fairly low-level code and would affect
not just the code to decide if the push destination is local.  There
may be unexpected fallouts in the path normalization.

* tb/push-to-cygwin-unc-path:
  cygwin: allow pushing to UNC paths
</content>
</entry>
<entry>
<title>add MOVE_ARRAY</title>
<updated>2017-07-17T21:54:53Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-07-15T19:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=578398071e45d296c3dc1de10acdbc15365e763f'/>
<id>urn:sha1:578398071e45d296c3dc1de10acdbc15365e763f</id>
<content type='text'>
Similar to COPY_ARRAY (introduced in 60566cbb58), add a safe and
convenient helper for moving potentially overlapping ranges of array
entries.  It infers the element size, multiplies automatically and
safely to get the size in bytes, does a basic type safety check by
comparing element sizes and unlike memmove(3) it supports NULL
pointers iff 0 elements are to be moved.

Also add a semantic patch to demonstrate the helper's intended usage.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cygwin: allow pushing to UNC paths</title>
<updated>2017-07-05T21:01:03Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2017-07-03T14:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=496f2569892273a142889193350ceb95b6019011'/>
<id>urn:sha1:496f2569892273a142889193350ceb95b6019011</id>
<content type='text'>
 cygwin can use an UNC path like //server/share/repo

 $ cd //server/share/dir
 $ mkdir test
 $ cd test
 $ git init --bare

 However, when we try to push from a local Git repository to this repo,
 there is a problem: Git converts the leading "//" into a single "/".

 As cygwin handles an UNC path so well, Git can support them better:

 - Introduce cygwin_offset_1st_component() which keeps the leading "//",
   similar to what Git for Windows does.

 - Move CYGWIN out of the POSIX in the tests for path normalization in t0060

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-compat-util: add a FREE_AND_NULL() wrapper around free(ptr); ptr = NULL</title>
<updated>2017-06-15T21:56:39Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-06-15T21:06:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=481df65f4f72582369eea8d002070c5dff38f8e6'/>
<id>urn:sha1:481df65f4f72582369eea8d002070c5dff38f8e6</id>
<content type='text'>
Add a FREE_AND_NULL() wrapper marco for the common pattern of freeing
a pointer and assigning NULL to it right afterwards.

The implementation is similar to the (currently unused) XDL_PTRFREE
macro in xdiff/xmacros.h added in commit 3443546f6e ("Use a *real*
built-in diff generator", 2006-03-24). The only difference is that
free() is called unconditionally, see [1].

See [2] for a suggested alternative which does this via a function
instead of a macro. As covered in replies to that message, while it's
a viable approach, it would introduce caveats which this approach
doesn't have, so that potential change is left to a future follow-up
change.

This merely allows us to translate exactly what we're doing now to a
less verbose &amp; idiomatic form using a macro, while guaranteeing that
we don't introduce any functional changes.

1. &lt;alpine.DEB.2.20.1608301948310.129229@virtualbox&gt;
   (http://public-inbox.org/git/alpine.DEB.2.20.1608301948310.129229@virtualbox/)

2. &lt;20170610032143.GA7880@starla&gt;
   (https://public-inbox.org/git/20170610032143.GA7880@starla/)

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>Merge branch 'nd/fopen-errors'</title>
<updated>2017-06-13T20:47:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-13T20:47:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b9a7d55d938a81eb6268196b789d573437492100'/>
<id>urn:sha1:b9a7d55d938a81eb6268196b789d573437492100</id>
<content type='text'>
We often try to open a file for reading whose existence is
optional, and silently ignore errors from open/fopen; report such
errors if they are not due to missing files.

* nd/fopen-errors:
  mingw_fopen: report ENOENT for invalid file names
  mingw: verify that paths are not mistaken for remote nicknames
  log: fix memory leak in open_next_file()
  rerere.c: move error_errno() closer to the source system call
  print errno when reporting a system call error
  wrapper.c: make warn_on_inaccessible() static
  wrapper.c: add and use fopen_or_warn()
  wrapper.c: add and use warn_on_fopen_errors()
  config.mak.uname: set FREAD_READS_DIRECTORIES for Darwin, too
  config.mak.uname: set FREAD_READS_DIRECTORIES for Linux and FreeBSD
  clone: use xfopen() instead of fopen()
  use xfopen() in more places
  git_fopen: fix a sparse 'not declared' warning
</content>
</entry>
<entry>
<title>Merge branch 'jc/noent-notdir'</title>
<updated>2017-06-13T20:47:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-13T20:47:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93dd544f54ea596e9d70d06c100123c10689861c'/>
<id>urn:sha1:93dd544f54ea596e9d70d06c100123c10689861c</id>
<content type='text'>
Our code often opens a path to an optional file, to work on its
contents when we can successfully open it.  We can ignore a failure
to open if such an optional file does not exist, but we do want to
report a failure in opening for other reasons (e.g. we got an I/O
error, or the file is there, but we lack the permission to open).

The exact errors we need to ignore are ENOENT (obviously) and
ENOTDIR (less obvious).  Instead of repeating comparison of errno
with these two constants, introduce a helper function to do so.

* jc/noent-notdir:
  treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checked
  compat-util: is_missing_file_error()
</content>
</entry>
<entry>
<title>Merge branch 'bw/forking-and-threading' into maint</title>
<updated>2017-06-13T20:27:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-13T20:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e350625b68cf747e4933239735ceb111f4375a83'/>
<id>urn:sha1:e350625b68cf747e4933239735ceb111f4375a83</id>
<content type='text'>
The "run-command" API implementation has been made more robust
against dead-locking in a threaded environment.

* bw/forking-and-threading:
  usage.c: drop set_error_handle()
  run-command: restrict PATH search to executable files
  run-command: expose is_executable function
  run-command: block signals between fork and execve
  run-command: add note about forking and threading
  run-command: handle dup2 and close errors in child
  run-command: eliminate calls to error handling functions in child
  run-command: don't die in child when duping /dev/null
  run-command: prepare child environment before forking
  string-list: add string_list_remove function
  run-command: use the async-signal-safe execv instead of execvp
  run-command: prepare command before forking
  t0061: run_command executes scripts without a #! line
  t5550: use write_script to generate post-update hook
</content>
</entry>
<entry>
<title>Merge branch 'bw/forking-and-threading'</title>
<updated>2017-05-30T02:16:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-05-30T02:16:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d5e13f652b4dfbf5e399dd2de32e5954368f0f8'/>
<id>urn:sha1:7d5e13f652b4dfbf5e399dd2de32e5954368f0f8</id>
<content type='text'>
The "run-command" API implementation has been made more robust
against dead-locking in a threaded environment.

* bw/forking-and-threading:
  usage.c: drop set_error_handle()
  run-command: restrict PATH search to executable files
  run-command: expose is_executable function
  run-command: block signals between fork and execve
  run-command: add note about forking and threading
  run-command: handle dup2 and close errors in child
  run-command: eliminate calls to error handling functions in child
  run-command: don't die in child when duping /dev/null
  run-command: prepare child environment before forking
  string-list: add string_list_remove function
  run-command: use the async-signal-safe execv instead of execvp
  run-command: prepare command before forking
  t0061: run_command executes scripts without a #! line
  t5550: use write_script to generate post-update hook
</content>
</entry>
<entry>
<title>compat-util: is_missing_file_error()</title>
<updated>2017-05-30T00:14:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-05-26T03:09:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc5a18b3643553cacd6f1a3e4bff6a678b067055'/>
<id>urn:sha1:dc5a18b3643553cacd6f1a3e4bff6a678b067055</id>
<content type='text'>
Our code often opens a path to an optional file, to work on its
contents when we can successfully open it.  We can ignore a failure
to open if such an optional file does not exist, but we do want to
report a failure in opening for other reasons (e.g. we got an I/O
error, or the file is there, but we lack the permission to open).

The exact errors we need to ignore are ENOENT (obviously) and
ENOTDIR (less obvious).  Instead of repeating comparison of errno
with these two constants, introduce a helper function to do so.

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