<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/dir.c, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-07-12T22:13:54Z</updated>
<entry>
<title>git add: Add the "--ignore-missing" option for the dry run</title>
<updated>2010-07-12T22:13:54Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2010-07-09T22:18:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=108da0db1277fc2f4820d0a47c02b2c63111f7a5'/>
<id>urn:sha1:108da0db1277fc2f4820d0a47c02b2c63111f7a5</id>
<content type='text'>
Sometimes it is useful to know if a file or directory will be ignored
before it is added to the work tree. An example is "git submodule add",
where it would be really nice to be able to fail with an appropriate
error message before the submodule is cloned and checked out.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-simpler-common-prefix'</title>
<updated>2010-06-22T16:45:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-22T16:45:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c177a1ca1b82ee6cbaa32521da75b8b1c137a73'/>
<id>urn:sha1:2c177a1ca1b82ee6cbaa32521da75b8b1c137a73</id>
<content type='text'>
* jc/maint-simpler-common-prefix:
  common_prefix: simplify and fix scanning for prefixes
</content>
</entry>
<entry>
<title>Merge branch 'gv/portable'</title>
<updated>2010-06-21T13:02:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-21T13:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d676d85f772ce3a100b6f0dddd1c34a7e4313cf'/>
<id>urn:sha1:8d676d85f772ce3a100b6f0dddd1c34a7e4313cf</id>
<content type='text'>
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
</content>
</entry>
<entry>
<title>common_prefix: simplify and fix scanning for prefixes</title>
<updated>2010-06-16T19:13:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-15T23:02:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=42f9852f3c7476b5608ad297443e6d459516f8c0'/>
<id>urn:sha1:42f9852f3c7476b5608ad297443e6d459516f8c0</id>
<content type='text'>
common_prefix() scans backwards from the far end of each 'next'
pathspec, starting from 'len', shortening the 'prefix' using 'path' as
a reference.

However, there is a small opportunity for an out-of-bounds access
because len is unconditionally set to prefix-1 after a "direct match"
test failed.  This means that if 'next' is shorter than prefix+2, we
read past it.

Instead of a minimal fix, simplify the loop: scan *forward* over the
'next' entry, remembering the last '/' where it matched the prefix
known so far.  This is far easier to read and also has the advantage
that we only scan over each entry once.

Acked-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>enums: omit trailing comma for portability</title>
<updated>2010-05-31T23:59:27Z</updated>
<author>
<name>Gary V. Vaughan</name>
<email>git@mlists.thewrittenword.com</email>
</author>
<published>2010-05-14T09:31:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b05548fc0523744b7a1276cfa0f4aae19d6d9c9'/>
<id>urn:sha1:4b05548fc0523744b7a1276cfa0f4aae19d6d9c9</id>
<content type='text'>
Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
5.1 fails to compile git.

enum style is inconsistent already, with some enums declared on one
line, some over 3 lines with the enum values all on the middle line,
sometimes with 1 enum value per line... and independently of that the
trailing comma is sometimes present and other times absent, often
mixing with/without trailing comma styles in a single file, and
sometimes in consecutive enum declarations.

Clearly, omitting the comma is the more portable style, and this patch
changes all enum declarations to use the portable omitted dangling
comma style consistently.

Signed-off-by: Gary V. Vaughan &lt;gary@thewrittenword.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>get_cwd_relative(): do not misinterpret suffix as subdirectory</title>
<updated>2010-05-28T22:02:50Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2010-05-22T11:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=490544b1282416a033dc25481db205248ac0bfc8'/>
<id>urn:sha1:490544b1282416a033dc25481db205248ac0bfc8</id>
<content type='text'>
If the current working directory is the same as the work tree path
plus a suffix, e.g. 'work' and 'work-xyz', then the suffix '-xyz'
would be interpreted as a subdirectory of 'work'.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-add-ignored-dir'</title>
<updated>2010-03-20T18:29:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-03-20T18:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e7d08a229a531f8d7841a8a1a892d5989130d67'/>
<id>urn:sha1:4e7d08a229a531f8d7841a8a1a892d5989130d67</id>
<content type='text'>
* jk/maint-add-ignored-dir:
  tests for "git add ignored-dir/file" without -f
  dir: fix COLLECT_IGNORED on excluded prefixes
  t0050: mark non-working test as such
</content>
</entry>
<entry>
<title>dir: fix COLLECT_IGNORED on excluded prefixes</title>
<updated>2010-03-14T07:23:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-03-11T07:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=29209cbe58e7a977ae7267b11da19250b6878028'/>
<id>urn:sha1:29209cbe58e7a977ae7267b11da19250b6878028</id>
<content type='text'>
As we walk the directory tree, if we see an ignored path, we
want to add it to the ignored list only if it matches any
pathspec that we were given. We used to check for the
pathspec to appear explicitly. E.g., if we see "subdir/file"
and it is excluded, we check to see if we have "subdir/file"
in our pathspec.

However, this interacts badly with the optimization to avoid
recursing into ignored subdirectories. If "subdir" as a
whole is ignored, then we never recurse, and consider only
whether "subdir" itself is in our pathspec.  It would not
match a pathspec of "subdir/file" explicitly, even though it
is the reason that subdir/file would be excluded.

This manifests itself to the user as "git add subdir/file"
failing to correctly note that the pathspec was ignored.

This patch extends the in_pathspec logic to include prefix
directory case.

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/maint-rmdir-fix' into maint</title>
<updated>2010-02-19T09:31:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-02-19T09:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c0be4da5cab4efd89ee6583f7009d648a75a725'/>
<id>urn:sha1:7c0be4da5cab4efd89ee6583f7009d648a75a725</id>
<content type='text'>
* jk/maint-rmdir-fix:
  rm: fix bug in recursive subdirectory removal
</content>
</entry>
<entry>
<title>rm: fix bug in recursive subdirectory removal</title>
<updated>2010-02-19T06:22:22Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-02-19T05:57:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3fc0d131c573f6f774e2e4abba9cbda694b08321'/>
<id>urn:sha1:3fc0d131c573f6f774e2e4abba9cbda694b08321</id>
<content type='text'>
If we remove a path in a/deep/subdirectory, we should try to
remove as many trailing components as possible (i.e.,
subdirectory, then deep, then a). However, the test for the
return value of rmdir was reversed, so we only ever deleted
at most one level.

The fix is in remove_path, so "apply" and "merge-recursive"
also are fixed.

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