summaryrefslogtreecommitdiff
path: root/src/cp.c
AgeCommit message (Collapse)Author
2005-06-02Don't use "path" or "filename".Paul Eggert
(parents_option): Renamed from flag_path. All uses changed. (make_dir_parents_private): Renamed from make_path_private. All uses changed. (usage): Don't use "path" to describe a file name.
2005-05-31(re_protect): Remove unnecessary call to geteuid.Paul Eggert
Use chown_failure_ok rather than our own code. (cp_options_init): Use chown_privileges rather than getuid.
2005-05-30(geteuid) [!defined _POSIX_VERSION]: Remove decl.Paul Eggert
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-03-28(sparse_type_string, reply_args, decode_preserve_arg): Use NULL, not `0'.Jim Meyering
2005-01-25(usage): Add comma after "-P" to fix typo in previous patch.Paul Eggert
2005-01-24(usage): Merge the descriptions of --no-dereference and -P.Jim Meyering
2004-09-21Remove unused "case 0".Paul Eggert
2004-09-13Adjust to backup enum rename.Paul Eggert
2004-07-30(struct dir_attr, flag_path, remove_trailing_slashes,Paul Eggert
re_protect, make_path_private, target_directory_operand, do_copy, cp_option_init, decode_preserve_arg, main): Use bool when appropriate. (target_directory_operand): Do not clear *NEW_DST if stat succeeds. It's not necessary in that case, as *NEW_DST is always false already. (do_copy): Rewrite slightly to avoid need for "unreachable" comment. (main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1.
2004-07-27(do_copy): find_backup_file_name no longer returns NULL, so don'tPaul Eggert
bother to check for this.
2004-07-04(do_copy): Assume path_concat returns non-NULL.Jim Meyering
(make_path_private): 2nd arg is now size_t, not int, to avoid problem when path_concat dir name is longer than 2 GiB (!).
2004-07-02Add short names -t and -T for --target-directoryJim Meyering
and --no-target-directory options, respectively. (NO_TARGET_DIRECTORY_OPTION, TARGET_DIRECTORY_OPTION): Remove. All uses changed to 'T' and 't', respectively. (long_opts, usage, do_copy, main): Add -t and -T as aliases for --target-directory and --no-target-directory, respectively.
2004-06-30Add support for --no-target-directory option.Jim Meyering
(NO_TARGET_DIRECTORY_OPTION): New constant. (long_opts, usage, do_copy, main): Add support for
2004-06-28 Use more-consistent rules among cp, ln, and mv when dealing withJim Meyering
last operands that are (or look like) directories. * src/cp.c (target_directory_operand): New, nearly-common function, It reports an error if the destination appears to be a directory (e.g., because it has a trailing slash) but is not. * src/cp.c (do_copy): Use it. * src/cp.c (do_copy): Don't assume argc is positive. Don't bother to lstat dest, since copy() will do that for us. Use "const" to avoid the need for cast. * src/cp.c (do_copy): Don't output a usage message because of file problems (e.g., an operand is not a directory). Use it only for syntax. Standardize on "target %s is not a directory" for the diagnostic. * src/cp.c (do_copy): Remove test for trailing slash, since target_directory_operand now does this. * src/cp.c (main): Reject multiple target directories. Check whether a specified target is a directory when parsing the options, using stat. This gives more-accurate diagnostics.
2004-06-28(usage): Fix copy+paste error in description ofJim Meyering
--target-directory: s/move/copy/. From Paul Jarc.
2004-06-21Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included. (do_copy): Likewise.
2004-03-13(do_copy): Tweak wording in a diagnostic.Jim Meyering
Suggestion from Karl Berry. Include "quoatearg.h". (do_copy): Use quotearg_colon (not quote) for diagnostics that begin with `"%s:'.
2004-02-07(re_protect): Use `XSTAT (x, ...)' in place of `*(x->xstat) (...)'.Jim Meyering
(do_copy): Declare/use local xstat rather than x->xstat. (main): Remove code that set x.xstat.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(exit_status): Remove static var.... (main): Making it local here instead. Use =, not |=, to set it.
2004-01-04(re_protect): Use ASSIGN_STRDUPA rather than alloca and strcpy.Jim Meyering
(make_path_private): Likewise.
2003-11-02(make_path_private): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.Jim Meyering
The former is more maintainable and usually shorter.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-28Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).Jim Meyering
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-08-09Include utimens.h.Jim Meyering
(re_protect): Set file timestamps with utimens, not utime.
2003-07-12It appears that the `#pragma alloca' included via "system.h" isJim Meyering
adequate, since join.c uses alloca, yet lacked an in-file #pragma. Remove `#pragma alloca'.
2003-07-04(do_copy): Give a better diagnostic when failing dueJim Meyering
to nonexistent destination directory. Reported by Dmitry Rutsky. See http://bugs.debian.org/199730 for details.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-03-09fix typo in commentJim Meyering
2003-03-07Remove everything associated with mmap-stack.c.Jim Meyering
This reverts the two changes of 2003-02-21.
2003-02-21Include "mmap-stack.h".Jim Meyering
(main): Invoke `run' through a macro that (when possible) runs it with a large, mmap'd stack.
2003-02-17(run): New function, preparing for use ofJim Meyering
RUN_WITH_BIG_STACK_*
2003-01-03(do_copy): Tweak diagnostic to be consistent with the oneJim Meyering
from mv: s/missing file arguments/missing file argument/. With --target-directory=DIR, cp and mv work with a single file argument. Reported by Karl Berry.
2002-12-11Fix a bug whereby cp would fail to parse an option likeJim Meyering
--preserve=mode,ownership. (decode_preserve_arg): Advance `comma' to point the character following the comma.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-06-21Change all `preserving ...' diagnostics toJim Meyering
`failed to preserve ...' to make the failure clearer.
2002-03-10(do_copy): Change wording in diagnostic.Jim Meyering
2002-03-03(COPY_CONTENTS_OPTION): New enum value.Jim Meyering
(long_opts): Add --copy-contents. (usage): Describe new behavior. Sort options. (main): Implement new behavior. Remove diagnostics for -a and -r; no longer needed.
2002-03-02(main): Warn when -r is specified before --archive (-a).Jim Meyering
2002-03-02(main): Revert change of 2001-12-29. With this change,Jim Meyering
cp -r once again preserves symlinks. (usage): Document the original (now-restored) behavior.
2002-03-02(main): Fail if -r is specified after --archive (-a) on the command line.Jim Meyering
2001-12-29(main): With -r, always dereference symlinks.Jim Meyering