<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/init-db.c, branch v2.2.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-12-22T20:18:00Z</updated>
<entry>
<title>Merge branch 'mh/config-flip-xbit-back-after-checking' into maint</title>
<updated>2014-12-22T20:18:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-22T20:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e524fb497a0259cee4559f60d815218fc01ac466'/>
<id>urn:sha1:e524fb497a0259cee4559f60d815218fc01ac466</id>
<content type='text'>
"git init" (hence "git clone") initialized the per-repository
configuration file .git/config with x-bit by mistake.

* mh/config-flip-xbit-back-after-checking:
  create_default_files(): don't set u+x bit on $GIT_DIR/config
</content>
</entry>
<entry>
<title>create_default_files(): don't set u+x bit on $GIT_DIR/config</title>
<updated>2014-11-18T18:10:54Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-11-18T13:50:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f32ecffd864ea5b339883f94463b0b69f4aeb35'/>
<id>urn:sha1:1f32ecffd864ea5b339883f94463b0b69f4aeb35</id>
<content type='text'>
Since time immemorial, the test of whether to set "core.filemode"
has been done by trying to toggle the u+x bit on $GIT_DIR/config,
which we know always exists, and then testing whether the change
"took".  I find it somewhat odd to use the config file for this
test, but whatever.

The test code didn't set the u+x bit back to its original state
itself, instead relying on the subsequent call to git_config_set()
to re-write the config file with correct permissions.

But ever since

    daa22c6f8d config: preserve config file permissions on edits (2014-05-06)

git_config_set() copies the permissions from the old config file to
the new one.  This is a good change in and of itself, but it
invalidates the create_default_files()'s assumption, causing "git
init" to leave the executable bit set on $GIT_DIR/config.

Reset the permissions on $GIT_DIR/config when we are done with the
test in create_default_files().

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/strbuf-getcwd'</title>
<updated>2014-09-02T20:28:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-02T20:27:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f655651e09b9fa7bf8ff13f1b4a5b16c7956e4cf'/>
<id>urn:sha1:f655651e09b9fa7bf8ff13f1b4a5b16c7956e4cf</id>
<content type='text'>
Reduce the use of fixed sized buffer passed to getcwd() calls
by introducing xgetcwd() helper.

* rs/strbuf-getcwd:
  use strbuf_add_absolute_path() to add absolute paths
  abspath: convert absolute_path() to strbuf
  use xgetcwd() to set $GIT_DIR
  use xgetcwd() to get the current directory or die
  wrapper: add xgetcwd()
  abspath: convert real_path_internal() to strbuf
  abspath: use strbuf_getcwd() to remember original working directory
  setup: convert setup_git_directory_gently_1 et al. to strbuf
  unix-sockets: use strbuf_getcwd()
  strbuf: add strbuf_getcwd()
</content>
</entry>
<entry>
<title>use xgetcwd() to set $GIT_DIR</title>
<updated>2014-08-26T18:06:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-07-28T18:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d3ab44d26c47d100cec39d0ef9ed9746eb7e454'/>
<id>urn:sha1:4d3ab44d26c47d100cec39d0ef9ed9746eb7e454</id>
<content type='text'>
Instead of dying of a segmentation fault if getcwd() returns NULL, use
xgetcwd() to make sure to write a useful error message and then exit
in an orderly fashion.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
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>use xgetcwd() to get the current directory or die</title>
<updated>2014-08-26T18:06:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-07-28T18:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56b9f6e738af6f5238f57a29e96103cf61e3f8cd'/>
<id>urn:sha1:56b9f6e738af6f5238f57a29e96103cf61e3f8cd</id>
<content type='text'>
Convert several calls of getcwd() and die() to use xgetcwd() instead.
This way we get rid of fixed-size buffers (which can be too small
depending on the used file system) and gain consistent error messages.

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>init: avoid superfluous real_path() calls</title>
<updated>2014-07-28T23:17:12Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-07-28T18:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d186c8be5bea10640927e0822bd9e1c7a2e01ea'/>
<id>urn:sha1:2d186c8be5bea10640927e0822bd9e1c7a2e01ea</id>
<content type='text'>
Feeding the result of a real_path() call to real_path() again doesn't
change that result -- the returned path won't get any more real.  Avoid
such a double call in set_git_dir_init() and for the same reason stop
calling real_path() before feeding paths to set_git_work_tree(), as the
latter already takes care of that.

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>i18n: only extract comments marked with "TRANSLATORS:"</title>
<updated>2014-04-17T18:09:56Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2014-04-17T05:37:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=47fbfded53d46ef73c5f5c150d6e6e7602a7f66f'/>
<id>urn:sha1:47fbfded53d46ef73c5f5c150d6e6e7602a7f66f</id>
<content type='text'>
When extract l10n messages, we use "--add-comments" option to keep
comments right above the l10n messages for references.  But sometimes
irrelevant comments are also extracted.  For example in the following
code block, the comment in line 2 will be extracted as comment for the
l10n message in line 3, but obviously it's wrong.

        { OPTION_CALLBACK, 0, "ignore-removal", &amp;addremove_explicit,
          NULL /* takes no arguments */,
          N_("ignore paths removed in the working tree (same as
          --no-all)"),
          PARSE_OPT_NOARG, ignore_removal_cb },

Since almost all comments for l10n translators are marked with the same
prefix (tag): "TRANSLATORS:", it's safe to only extract comments with
this special tag.  I.E. it's better to call xgettext as:

        xgettext --add-comments=TRANSLATORS: ...

Also tweaks the multi-line comment in "init-db.c", to make it start with
the proper tag, not "* TRANSLATORS:" (which has a star before the tag).

Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/safe-create-leading-directories'</title>
<updated>2014-01-27T18:45:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-27T18:45:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0956cfa8ef8b3668ea6adc94b27f5dcdc93bde0'/>
<id>urn:sha1:d0956cfa8ef8b3668ea6adc94b27f5dcdc93bde0</id>
<content type='text'>
Code clean-up and protection against concurrent write access to the
ref namespace.

* mh/safe-create-leading-directories:
  rename_tmp_log(): on SCLD_VANISHED, retry
  rename_tmp_log(): limit the number of remote_empty_directories() attempts
  rename_tmp_log(): handle a possible mkdir/rmdir race
  rename_ref(): extract function rename_tmp_log()
  remove_dir_recurse(): handle disappearing files and directories
  remove_dir_recurse(): tighten condition for removing unreadable dir
  lock_ref_sha1_basic(): if locking fails with ENOENT, retry
  lock_ref_sha1_basic(): on SCLD_VANISHED, retry
  safe_create_leading_directories(): add new error value SCLD_VANISHED
  cmd_init_db(): when creating directories, handle errors conservatively
  safe_create_leading_directories(): introduce enum for return values
  safe_create_leading_directories(): always restore slash at end of loop
  safe_create_leading_directories(): split on first of multiple slashes
  safe_create_leading_directories(): rename local variable
  safe_create_leading_directories(): add explicit "slash" pointer
  safe_create_leading_directories(): reduce scope of local variable
  safe_create_leading_directories(): fix format of "if" chaining
</content>
</entry>
<entry>
<title>cmd_init_db(): when creating directories, handle errors conservatively</title>
<updated>2014-01-06T17:34:22Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-01-06T13:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3565c0ca535d3becdcd2266002385709ddfa66c'/>
<id>urn:sha1:f3565c0ca535d3becdcd2266002385709ddfa66c</id>
<content type='text'>
safe_create_leading_directories_const() returns a non-zero value on
error.  The old code at this calling site recognized a couple of
particular error values, and treated all other return values as
success.  Instead, be more conservative: recognize the errors we are
interested in, but treat any other nonzero values as failures.  This
is more robust in case somebody adds another possible return value
without telling us.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>safe_create_leading_directories(): introduce enum for return values</title>
<updated>2014-01-06T17:34:21Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-01-06T13:45:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0be0521b23f46dac586e1b464fafe8b97027b645'/>
<id>urn:sha1:0be0521b23f46dac586e1b464fafe8b97027b645</id>
<content type='text'>
Instead of returning magic integer values (which a couple of callers
go to the trouble of distinguishing), return values from an enum.  Add
a docstring.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
