Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Notify the remote side about -i (if either specified or inferred from
[rsync/rsync.git]
/
options.c
diff --git
a/options.c
b/options.c
index
9b260d4
..
4d3d038
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-152,7
+152,7
@@
char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int F_option_cnt = 0;
static int modify_window_set;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int F_option_cnt = 0;
static int modify_window_set;
-static int refused_
verbose, refused_
delete, refused_archive_part;
+static int refused_delete, refused_archive_part;
static int refused_partial, refused_progress, refused_delete_before;
static char *dest_option = NULL;
static char *max_size_arg;
static int refused_partial, refused_progress, refused_delete_before;
static char *dest_option = NULL;
static char *max_size_arg;
@@
-548,9
+548,6
@@
static void set_refuse_options(char *bp)
/* These flags are set to let us easily check
* an implied option later in the code. */
switch (*shortname) {
/* These flags are set to let us easily check
* an implied option later in the code. */
switch (*shortname) {
- case 'v':
- refused_verbose = op->val;
- break;
case 'r': case 'd': case 'l': case 'p':
case 't': case 'g': case 'o': case 'D':
refused_archive_part = op->val;
case 'r': case 'd': case 'l': case 'p':
case 't': case 'g': case 'o': case 'D':
refused_archive_part = op->val;
@@
-1068,12
+1065,14
@@
int parse_arguments(int *argc, const char ***argv, int frommain)
log_format = "%i %n%L";
log_before_transfer = !am_server;
}
log_format = "%i %n%L";
log_before_transfer = !am_server;
}
- if (do_progress && !verbose && !log_before_transfer) {
- if (refused_verbose) {
- create_refuse_error(refused_verbose);
- return 0;
- }
+
+ if ((do_progress || dry_run) && !verbose && !log_before_transfer
+ && !am_server)
verbose = 1;
verbose = 1;
+
+ if (verbose && !log_format) {
+ log_format = "%n%L";
+ log_before_transfer = !am_server;
}
if (daemon_bwlimit && (!bwlimit || bwlimit > daemon_bwlimit))
}
if (daemon_bwlimit && (!bwlimit || bwlimit > daemon_bwlimit))
@@
-1272,6
+1271,11
@@
void server_options(char **args,int *argc)
if (list_only > 1)
args[ac++] = "--list-only";
if (list_only > 1)
args[ac++] = "--list-only";
+ /* The server side doesn't use our log-format, but if verbose isn't
+ * on, they may need to know that we want some extra messages. */
+ if (log_format && !verbose && !itemize_changes)
+ args[ac++] = "--log-format=specified";
+
if (block_size) {
if (asprintf(&arg, "-B%lu", block_size) < 0)
goto oom;
if (block_size) {
if (asprintf(&arg, "-B%lu", block_size) < 0)
goto oom;