<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/dir.c, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-05-13T21:05:51Z</updated>
<entry>
<title>Merge branch 'cn/bom-in-gitignore' into maint</title>
<updated>2015-05-13T21:05:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-13T21:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8a1d89745d1b60d0d9e8bd91e4e9564673b6c22a'/>
<id>urn:sha1:8a1d89745d1b60d0d9e8bd91e4e9564673b6c22a</id>
<content type='text'>
Teach the codepaths that read .gitignore and .gitattributes files
that these files encoded in UTF-8 may have UTF-8 BOM marker at the
beginning; this makes it in line with what we do for configuration
files already.

* cn/bom-in-gitignore:
  attr: skip UTF8 BOM at the beginning of the input file
  config: use utf8_bom[] from utf.[ch] in git_parse_source()
  utf8-bom: introduce skip_utf8_bom() helper
  add_excludes_from_file: clarify the bom skipping logic
  dir: allow a BOM at the beginning of exclude files
</content>
</entry>
<entry>
<title>utf8-bom: introduce skip_utf8_bom() helper</title>
<updated>2015-04-16T18:35:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-16T17:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dde843e7378f65004415bd108038659de9ce2abd'/>
<id>urn:sha1:dde843e7378f65004415bd108038659de9ce2abd</id>
<content type='text'>
With the recent change to ignore the UTF8 BOM at the beginning of
.gitignore files, we now have two codepaths that do such a skipping
(the other one is for reading the configuration files).

Introduce utf8_bom[] constant string and skip_utf8_bom() helper
and teach .gitignore code how to use it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add_excludes_from_file: clarify the bom skipping logic</title>
<updated>2015-04-16T18:26:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-16T18:26:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb0abea87017559e1db3721a7e6d89a336d845e9'/>
<id>urn:sha1:cb0abea87017559e1db3721a7e6d89a336d845e9</id>
<content type='text'>
Even though the previous step shifts where the "entry" begins, we
still iterate over the original buf[], which may begin with the
UTF-8 BOM we are supposed to be skipping.  At the end of the first
line, the code grabs the contents of it starting at "entry", so
there is nothing wrong per-se, but the logic looks really confused.

Instead, move the buf pointer and shrink its size, to truly
pretend that UTF-8 BOM did not exist in the input.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>dir: allow a BOM at the beginning of exclude files</title>
<updated>2015-04-16T17:17:04Z</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@elego.de</email>
</author>
<published>2015-04-16T14:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=245e1c196dab226675a02a8caca5a83373f5e4d4'/>
<id>urn:sha1:245e1c196dab226675a02a8caca5a83373f5e4d4</id>
<content type='text'>
Some text editors like Notepad or LibreOffice write an UTF-8 BOM in
order to indicate that the file is Unicode text rather than whatever the
current locale would indicate.

If someone uses such an editor to edit a gitignore file, we are left
with those three bytes at the beginning of the file. If we do not skip
them, we will attempt to match a filename with the BOM as prefix, which
won't match the files the user is expecting.

Signed-off-by: Carlos Martín Nieto &lt;cmn@elego.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/report-path-error-to-dir'</title>
<updated>2015-03-26T18:57:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-26T18:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=574ee8ae8636ffad8146e0f8e648b866dad725e6'/>
<id>urn:sha1:574ee8ae8636ffad8146e0f8e648b866dad725e6</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>Merge branch 'nd/dir-prep-exclude-cleanup'</title>
<updated>2014-10-24T22:00:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-24T22:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1758d236a253c10f34ae16cd2ae6d9c57eb312a7'/>
<id>urn:sha1:1758d236a253c10f34ae16cd2ae6d9c57eb312a7</id>
<content type='text'>
Code clean-up.

* nd/dir-prep-exclude-cleanup:
  dir.c: remove the second declaration of "stk" in prep_exclude()
</content>
</entry>
<entry>
<title>dir.c: remove the second declaration of "stk" in prep_exclude()</title>
<updated>2014-10-21T18:22:00Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-10-21T11:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=03e11a715bffb0715ebcc9d6370aac7b968b3a4a'/>
<id>urn:sha1:03e11a715bffb0715ebcc9d6370aac7b968b3a4a</id>
<content type='text'>
This "stk" shadows the first declaration at the top. There's currently
no bad effect. But let's avoid it.

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