<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/realpath.c, branch v8.18</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.18</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2012-03-22T20:34:57Z</updated>
<entry>
<title>maint: refactor relpath() from `realpath` for use by `ln`</title>
<updated>2012-03-22T20:34:57Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-03-22T20:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b1428e3152afa3139a2968dd530e507ddd312051'/>
<id>urn:sha1:b1428e3152afa3139a2968dd530e507ddd312051</id>
<content type='text'>
* src/relpath.c: Refactored from realpath.c and adjusted
to support returning the relative path rather than just
printing to stdout.
* src/relpath.h: Export the relpath function.
* src/Makefile.am: Reference the refactored relpath module.
* po/POTFILES.in: Likewise.
* src/realpath.c: Adjust to the refactored relpath module.
</content>
</entry>
<entry>
<title>realpath: optimize --relative-base usage</title>
<updated>2012-03-15T19:28:19Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-03-14T19:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=be17e3b98a178ea6e2c973bf49282f11f7060353'/>
<id>urn:sha1:be17e3b98a178ea6e2c973bf49282f11f7060353</id>
<content type='text'>
There is no need to recompute for every path being visited whether
the base is a prefix of the relative location.

* src/realpath.c (relpath): Hoist base check...
(main): ...here.
Based on a suggestion by Pádraig Brady.
</content>
</entry>
<entry>
<title>realpath: let --relative-to default to --relative-base</title>
<updated>2012-03-15T18:24:05Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-03-14T19:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9f5aa4850133976eee22dcc0b506d7b632cd674c'/>
<id>urn:sha1:9f5aa4850133976eee22dcc0b506d7b632cd674c</id>
<content type='text'>
Most of the time, if someone wants to filter which paths are
relative while leaving all others absolute, they also want to
to the filtering based on the same --relative-to directory.
Make this easier to specify.

* src/realpath.c (main): Convert error to default.
* doc/coreutils.texi (realpath invocation): Document this.
* tests/misc/realpath: Adjust test to match.
* NEWS: Document it.
</content>
</entry>
<entry>
<title>realpath: fix problems with root handling</title>
<updated>2012-03-15T16:28:40Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-02-04T18:50:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5e264bf248128735aaba4e368f3875680d2ca438'/>
<id>urn:sha1:5e264bf248128735aaba4e368f3875680d2ca438</id>
<content type='text'>
When --relative-base is /, all other paths should be treated as
relative (except for // where it matters).

Also, on platforms like Cygwin where / and // are distinct, realpath
was incorrectly collapsing // into /.  http://debbugs.gnu.org/10472.

* src/realpath.c (path_prefix, path_common_prefix): Treat /
and // as having no common match.
(relpath): Allow for no match even without --relative-base.
* NEWS: Document this.
</content>
</entry>
<entry>
<title>realpath: avoid the use of printf</title>
<updated>2012-01-25T19:51:43Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-01-25T19:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9d46b25dedf5259f7a20dd2e8e8a6b738687babf'/>
<id>urn:sha1:9d46b25dedf5259f7a20dd2e8e8a6b738687babf</id>
<content type='text'>
This was seen to give an 11% performance improvement.

* src/realpath.c (relpath): Avoid using printf.
(process_path): Likewise.
</content>
</entry>
<entry>
<title>realpath: remove extraneous '/' for --relative-to edge cases</title>
<updated>2012-01-25T18:01:52Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-01-25T16:42:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=11af4b31b61302188a65e521921c42ddb45c4fb9'/>
<id>urn:sha1:11af4b31b61302188a65e521921c42ddb45c4fb9</id>
<content type='text'>
* src/realpath.c (path_common_prefix): Be consistent and
always include a leading '/' in the count returned.
(relpath): Account for the change in path_common_prefix()
and avoid outputting extra '/' chars in relative paths that
span the root dir.
* tests/misc/realpath: Add the two reported cases.
Reported by Mike Frysinger
</content>
</entry>
<entry>
<title>maint: src/*.c: change remaining quotes (without embedded spaces)</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-08T14:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4'/>
<id>urn:sha1:a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4</id>
<content type='text'>
Run this (twice):
  git grep -E -l '`[^ ]+'\' src/*.c \
    |xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
</content>
</entry>
<entry>
<title>maint: convert `...' to '...' in --help output</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-08T13:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9af0dced5a2eb167ec7b9dfe3f358f214e45d41a'/>
<id>urn:sha1:9af0dced5a2eb167ec7b9dfe3f358f214e45d41a</id>
<content type='text'>
All affected lines end with \ or \n\, so run this command
until it produces no new changes (4 times):
  git grep -E -l '`[^ ]+'\''.*\\' src \
    |xargs perl -pi -e 's/`([^ ]+'\''.*\\)/'\''$1/'
</content>
</entry>
<entry>
<title>maint: use new emit_try_help in place of equivalent fprintf</title>
<updated>2012-01-07T15:54:26Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-07T15:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=101d1203c667ec3ab54a026dde43117563d4e944'/>
<id>urn:sha1:101d1203c667ec3ab54a026dde43117563d4e944</id>
<content type='text'>
Run this command:
  perl -0777 -pi -e \
   's/fprintf \(stderr, _\("Try `%s --help.*\n.*;/emit_try_help ();/m'\
     src/*.c
</content>
</entry>
<entry>
<title>realpath: a new program to print the resolved path</title>
<updated>2012-01-03T11:36:32Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2011-12-27T00:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=77ea441f79aa115f79b47d9c1fc9c0004c5c7111'/>
<id>urn:sha1:77ea441f79aa115f79b47d9c1fc9c0004c5c7111</id>
<content type='text'>
This program is compatible with other realpath(1)
implementations, and also incorporates relpath like support,
through the --relative options.  The relpath support
was suggested by Peng Yu, who also provided an initial
implemenation of that functionality.

* AUTHORS: Add my name.
* NEWS: Mention the new command.
* README: Likewise.
* doc/coreutils.texi (realpath invocation): Add realpath info.
* man/Makefile.am (realpath.1): Add dependency.
* man/realpath.x: New template.
* man/.gitignore: Ignore generated man page.
* po/POTFILES.in: Add src/realpath.c.
* src/.gitignore: Exclude realpath.
* src/Makefile.am (EXTRA_PROGRAMS): Add realpath.
* src/realpath.c: New file.
* scripts/git-hooks/commit-msg: Add realpath to the list of prefixes.
* tests/Makefile.am (TESTS): Add misc/realpath.
* tests/misc/realpath: New file.
</content>
</entry>
</feed>
