Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering 8f28cc8708 add tests for some of the recent changes to cp 2001-10-13 20:44:59 +00:00
Jim Meyering 0dc71387d4 *** empty log message *** 2001-10-13 19:58:41 +00:00
Jim Meyering ed759a47cb (enum) [NO_DEREFERENCE_OPTION]: New member.
(enum) [NO_PRESERVE_ATTRIBUTES_OPTION]: New member.
(enum) [PRESERVE_ATTRIBUTES_OPTION]: New member.
(long_opts): Separate -d and --no-dereference options.
Add `no-preserve'.
Separate -p and --preserve options.
The long-named --preserve now accepts optional arguments; -p doesn't.
(usage): Describe additions and changes.
(cp_option_init): Initialize new member, preserve_links, to 0.
(decode_preserve_arg): New function.
(main) [case 'a']: Set preserve_links to 1.
[case 'd']: Set preserve_links to 1.
Add `case' for long-named --no-dereference.
Handle long-named --no-preserve and --preserve.
2001-10-13 19:57:08 +00:00
Jim Meyering a5f6a3dc40 (cp_option_init): Initialize new member to 1. 2001-10-13 19:41:17 +00:00
Jim Meyering 8429ee57dd (cp_option_init): Initialize new member, preserve_links. 2001-10-13 19:40:31 +00:00
Jim Meyering 95cc4c0984 (enum Dereference_symlink): Add comments.
(struct cp_options) [preserve_links]: New member.
2001-10-13 19:36:26 +00:00
Jim Meyering ef549ef73e *** empty log message *** 2001-10-13 19:13:16 +00:00
Jim Meyering 6d334f8f62 (cp_option_init): Don't set it. 2001-10-13 19:12:52 +00:00
Jim Meyering da73a665f0 (struct cp_options) [failed_unlink_is_fatal]: Remove unused member. 2001-10-13 19:12:06 +00:00
Jim Meyering 72695161da *** empty log message *** 2001-10-13 17:25:17 +00:00
Jim Meyering 66372e29eb * src/copy.h (struct cp_options): Rename members:
s/preserve_owner_and_group/preserve_ownership/, and
s/preserve_chmod_bits/preserve_mode/.
* src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses.
2001-10-13 17:24:38 +00:00
Jim Meyering b604e6b1f1 * src/copy.h (struct cp_options): Rename members:
s/preserve_owner_and_group/preserve_ownership/, and
s/preserve_chmod_bits/preserve_mode/.
* src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses.
2001-10-13 17:24:09 +00:00
Jim Meyering 039d440f50 (struct cp_options): Rename members:
s/preserve_owner_and_group/preserve_ownership/, and
s/preserve_chmod_bits/preserve_mode/.
2001-10-13 17:23:44 +00:00
Jim Meyering f40532072e *** empty log message *** 2001-10-13 16:54:18 +00:00
Jim Meyering b9f3b0ed92 *** empty log message *** 2001-10-13 16:51:09 +00:00
Jim Meyering 35e2136e59 Fix typo: s/Sh/SH/ before OPTIONS. 2001-10-13 16:50:59 +00:00
Jim Meyering 209557e03a don't use diff 2001-10-12 21:47:06 +00:00
Jim Meyering d225261a77 *** empty log message *** 2001-10-12 07:03:12 +00:00
Jim Meyering 0f14bad291 (TESTS): Add infloop.
(XFAIL_TESTS): Mark it as a test that we expect to fail (temporarily).
2001-10-12 07:03:04 +00:00
Jim Meyering f4e8ba6beb *** empty log message *** 2001-10-12 06:33:55 +00:00
Jim Meyering 1afc458839 (main): Tell what's wrong with `mknod c zero 1 5' rather
than saying just `Try `./mknod --help' for more information.'.
2001-10-12 06:32:13 +00:00
Jim Meyering 629576ece4 *** empty log message *** 2001-10-11 15:52:22 +00:00
Jim Meyering b729ec75ca (argmatch_invalid): Use quotearg_n_style (0, ...
and quote_n (1, ... to avoid clobbering a buffer.
2001-10-11 15:52:17 +00:00
Jim Meyering 4d390a18ba *** empty log message *** 2001-10-07 09:39:35 +00:00
Jim Meyering fc3429bc45 *** empty log message *** 2001-10-07 09:39:09 +00:00
Jim Meyering 06ab933220 *** empty log message *** 2001-10-07 08:41:23 +00:00
Jim Meyering 61b95dac69 (remember_copied): Make a local copy of the file name.
(src_to_dest_free): New function (to free the above).
(hash_init): Register src_to_dest_free.
2001-10-07 08:41:03 +00:00
Jim Meyering 3cff443b59 (copy_dir): Now that remember_copied copies the
file name, free the temporary `dst_path' allocated here.
2001-10-07 08:40:00 +00:00
Jim Meyering 38e11fdc5d (do_copy): Don't clear the hash table after processing
each command line argument.
2001-10-07 08:39:43 +00:00
Jim Meyering 94eb7340ec whoops. use cp's -a option 2001-10-07 07:52:40 +00:00
Jim Meyering 79476921ef (TESTS): Add link-preserve. 2001-10-07 07:47:41 +00:00
Jim Meyering d34280f171 *** empty log message *** 2001-10-07 07:47:29 +00:00
Jim Meyering c8987dca56 *** empty log message *** 2001-10-06 21:31:57 +00:00
Jim Meyering ccdb1b0215 Convert du.c to use the functions in lib/hash.c, not private,
slightly-modified copies of those that used to be in cp-hash.c.

(struct entry) [coll_link]: Remove member.
(struct htab): Remove.
(hash_reset, hash_init, hash_insert2, hash_insert): Remove functions.

Include hash.h and same.h.
(htab): Change type of global to `struct hash';
(entry_hash, entry_compare, hash_ins): New functions.
(count_entry): Use hash_ins instead of hash_insert.
2001-10-06 21:29:19 +00:00
Jim Meyering bf0b70f10d (hash_init): Die if hash_initialize fails. 2001-10-06 21:25:08 +00:00
Jim Meyering adac7cd0e3 *** empty log message *** 2001-10-06 17:25:12 +00:00
Jim Meyering de879011f3 Update prototype for hash_init. 2001-10-06 17:24:58 +00:00
Jim Meyering f275d7ae99 Rewrite to use the functions in lib/hash.c. 2001-10-06 17:24:10 +00:00
Jim Meyering f5b2352264 (record_dest): Fix test for whether to free `ent'.
Thank heavens for regression tests.
2001-10-06 17:07:15 +00:00
Jim Meyering 110190e4d9 *** empty log message *** 2001-10-06 16:46:27 +00:00
Jim Meyering e1b81c9b74 (main): Reflect that hash_init now takes no arguments. 2001-10-06 16:46:06 +00:00
Jim Meyering 3dfa4910e2 (do_move): Reflect that hash_init now takes no arguments. 2001-10-06 16:45:53 +00:00
Jim Meyering 706a45c0b8 (record_dest): Avoid a small leak.
(copy_internal): Call remember_copied only for if the source file
has 1 < st_nlink, or if it's a directory.
Now that EARLIER_FILE is set conditionally, initialize it to NULL.
2001-10-06 16:43:07 +00:00
Jim Meyering 7bdd841fd2 Redirect stderr. 2001-10-06 10:43:07 +00:00
Jim Meyering 6d64ac8442 *** empty log message *** 2001-10-05 11:47:15 +00:00
Jim Meyering 175e677c82 Include hash-pjw.h and remove definition of hash_pjw. 2001-10-05 11:46:57 +00:00
Jim Meyering 8b856a3132 . 2001-10-05 11:45:36 +00:00
Jim Meyering a97b7f61ff (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h. 2001-10-05 11:45:25 +00:00
Jim Meyering 0b9c7cac74 *** empty log message *** 2001-10-05 11:44:30 +00:00
Jim Meyering 32852d9825 *** empty log message *** 2001-10-04 07:52:44 +00:00