]> Dogcows Code - chaz/tar/commit
tar: handle files that occur multiple times but have link count 1
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Aug 2010 02:12:25 +0000 (19:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Aug 2010 02:13:12 +0000 (19:13 -0700)
commit37ddfb0b7eb41cc3f58bce686d389b1e965e9ccf
treefec0020d41f4900c8a9811ca606f4b286e77f775
parent09f039050e4c04f7344cdcaee15c817927de7c9c
tar: handle files that occur multiple times but have link count 1

This patch was inspired by the following patch that addressed a
similar problem in GNU coreutils du:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;h=efe53cc72b599979ea292754ecfe8abf7c839d22
* src/common.h (name_count): New decl.
* src/create.c (trivial_link_count): New static var.
(create_archive): Initialize it.
(dump_hard_link, file_count_links): Use it, so that files with
link count 1 are handled correctly when they are found multiple times.
* src/names.c (allocated_entries): Renamed from allocated_names,
since the identifier's name was misleading.  All uses changed.
(entries): Renamed from names.  All uses changed.
(scanned): Renamed from name_index.  All uses changed.
(name_count): New var.
(name_add_name): Increment it.
* tests/link04.at: New file.
* tests/testsuite.at: Add it.
* tests/Makefile.am (TESTSUITE_AT): Likewise.
src/common.h
src/create.c
src/names.c
tests/Makefile.am
tests/link04.at [new file with mode: 0644]
tests/testsuite.at
This page took 0.022399 seconds and 4 git commands to generate.