summaryrefslogtreecommitdiff
path: root/src/mv.c
AgeCommit message (Collapse)Author
1999-10-31tweak usageJim Meyering
1999-10-23label use of -V/--versin-control as a warningJim Meyering
1999-10-17Convert --backup to take an optional argument.Jim Meyering
Deprecate --version-control (-V) in comments. (usage): Remove mention of --version-control. (main): Make -V warn then fall through into --backup case. [--backup case]: Handle optional arg.
1999-10-17change a message and add usage(1) to another.Jim Meyering
1999-10-17don't compute isdir() of -- or an option stringJim Meyering
1999-10-17remove last `,' in enumJim Meyering
1999-10-03(TARGET_DIRECTORY_OPTION): Define.Jim Meyering
(usage): Describe it. (main): Implement it. Remove unused variable, stdin_tty. Make code clearer: use new variable `n_files' in place of `argc - optind'. Use `file' instead of `argv + optind'.
1999-04-26Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-01(main): Qualify a char* with the `const' keyword.Jim Meyering
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.
1999-03-26No longer include long-options.h.Jim Meyering
Include version-etc.h instead. (PROGRAM_NAME, AUTHORS): Define. [long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-02-16update copyright datesJim Meyering
1999-01-16Remove declarations of base_name and get_version.Jim Meyering
(main): Don't call getenv ("VERSION_CONTROL"); xget_version does it. Use xget_version and function-style XARGMATCH.
1998-11-30(do_move): Don't arrange to remove DEST in the copied-into-self case.Jim Meyering
1998-11-30(movefile): Don't free new_dest.Jim Meyering
Bob McCracken reported that mv couldn't handle certain combinations of hard linked source files.
1998-09-19update bug-reporting addressJim Meyering
1998-08-16(do_move): Fail upon attempt to move a directory into itself.Jim Meyering
With prodding from François Pinard :-)
1998-07-26(chown): Remove unused definition.Jim Meyering
Reported by Kaveh Ghazi.
1998-05-11(do_move): Remove lots of code that was duplicated inJim Meyering
copy.c (copy), now that copy() has better support for mv. This fixes a bug with cross-filesystem `mv -i' whereby you could get two prompts for the same destination file and eventually remove the destination file even though one of the responses was negative. Reported by Dirk Lattermann.
1998-05-10(cp_option_init): Initialize new members.Jim Meyering
1998-05-04remove dcl of unused safe_readJim Meyering
1998-04-26Don't define NDEBUG.Jim Meyering
1998-03-15Use #if, not #ifdef with HAVE_ macros.Jim Meyering
Use #if !, not #ifndef with HAVE_ macros.
1998-03-13(do_move): Add &copy_into_self arg in call to copy.Jim Meyering
Don't remove source directory when copy_into_self is nonzero. Reported by Arne Henrik Juul.
1998-02-16(cp_option_init): Set copy_as_regular to 0, not 1.Jim Meyering
Otherwise, mv tries to open special files. Reported by Kjetil Torgrim Homme.
1998-01-22(rm_option_init): New function.Jim Meyering
(cp_option_init): New function. (copy_reg): Remove now-unused function. (do_move): Set up for and use `copy.c (copy)' in place of copy_reg. Set up for and use `remove.c (rm)' in place of unlink.
1998-01-04(main, usage): Check for write error to stdout before exiting.Jim Meyering
Include "closeout.h".
1997-12-13(do_move): If rename fails for any reason (not just whenJim Meyering
errno == EXDEV), then revert to trying copy-then-unlink. This is necessary to allow moving files within certain types of Linux NFS mounted filesystems. Reported by Marty Leisner.
1997-10-07update bug-reporting addressJim Meyering
1997-07-03(apply_attributes): New function.Jim Meyering
(copy_reg): Use apply_attributes instead of open-coding the pieces. Now, failure to preserve file attributes does not cause mv to change its exit status, and such failures elicit warning diagnostics. This behavior is required by POSIX. Before, failure to preserve ownership due to insufficient access was diagnosed only for root. Prompted by a report from Bengt Martensson.
1997-06-29(copy_reg): New parameter, SOURCE_STATS.Jim Meyering
(do_move): Update caller. (movefile): Take new boolean parameter, DEST_IS_DIR, to save a stat per moved file when the destination is a directory. (main): Call movefile with additional argument. (strip_trailing_slashes_2): New function. (movefile): Remove trailing slashes from dest. Otherwise, stat ("b/") fails with ENOTDIR on systems including Linux w/libc 2.0.30. Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'. (do_move): Fix misleading comment.
1997-05-27Use base_name, not basename.Jim Meyering
1997-02-09update copyrights for 1997Jim Meyering
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1996-11-23(usage): Alphabetize option descriptions the way sort -f would.Jim Meyering
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-08-31(usage): remove spurious trailing \n in puts.Jim Meyering
1996-08-29(usage): Tell where to report bugs.Jim Meyering
1996-08-19Include path-concat.h.Jim Meyering
(movefile): Use path_concat instead of open-coding its functionality. Declare pointer parameters const as appropriate.
1996-07-06(usage): Factor out backup-related text into separate string/printf statement.Jim Meyering
1996-07-05(usage): Remove space before newline in usage message.Jim Meyering
1996-05-28(main): Don't mark "%s" as a translatable string.Jim Meyering
From Göran Uddeborg.
1996-05-15(main): Restructure pluralization of error message so it's easier to translate.Jim Meyering
1996-04-24update Copyright years for 1996Jim Meyering
1996-04-24[HAVE_LCHOWN]: Define chown to lchown.Jim Meyering