summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-21 10:35:43 -0800
committerJunio C Hamano <gitster@pobox.com>2013-04-22 07:57:06 -0700
commit47d6c5f2c112df55997742eab8d974bfa1cf7b3e (patch)
tree056c272bfb843e62bbd88691ce60119bae498309
parent288aa7534ae79eef03f79aaec355a7eedb08ddfa (diff)
downloadgit-47d6c5f2c112df55997742eab8d974bfa1cf7b3e.tar.gz
format-patch: rename "no_inline" field
The name of the field invites a misunderstanding that setting it to false, saying "No, I will not to tell you not to inline", may make the patch inlined in the body of the message, but that is not what it does. The result is still added to the resulting message as a MIME attachment as long as mime_boundary is set. This field only controls if the content disposition of the MIME attachment is set to "attachment" or "inline". Rename it to clarify what it is used for. Besides, a toggle whose name is "no_frotz" is asking for a double-negation. Calling it "disposition-attachment" allows us to naturally read that setting the field to true to mean "Yes, I want to set content-disposition to be 'attachment'". Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/log.c6
-rw-r--r--log-tree.c2
-rw-r--r--revision.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/builtin/log.c b/builtin/log.c
index ad46f72950..f2a11f4853 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1034,7 +1034,7 @@ static int attach_callback(const struct option *opt, const char *arg, int unset)
rev->mime_boundary = arg;
else
rev->mime_boundary = git_version_string;
- rev->no_inline = unset ? 0 : 1;
+ rev->disposition_attachment = unset ? 0 : 1;
return 0;
}
@@ -1047,7 +1047,7 @@ static int inline_callback(const struct option *opt, const char *arg, int unset)
rev->mime_boundary = arg;
else
rev->mime_boundary = git_version_string;
- rev->no_inline = 0;
+ rev->disposition_attachment = 0;
return 0;
}
@@ -1183,7 +1183,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (default_attach) {
rev.mime_boundary = default_attach;
- rev.no_inline = 1;
+ rev.disposition_attachment = 1;
}
/*
diff --git a/log-tree.c b/log-tree.c
index 7cc7d598e7..5ab821c8f3 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -326,7 +326,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,
" filename=\"%s\"\n\n",
mime_boundary_leader, opt->mime_boundary,
filename.buf,
- opt->no_inline ? "attachment" : "inline",
+ opt->disposition_attachment ? "attachment" : "inline",
filename.buf);
opt->diffopt.stat_sep = buffer;
strbuf_release(&filename);
diff --git a/revision.h b/revision.h
index 01bd2b7c07..40b9773b6c 100644
--- a/revision.h
+++ b/revision.h
@@ -142,7 +142,7 @@ struct rev_info {
const char *extra_headers;
const char *log_reencode;
const char *subject_prefix;
- int no_inline;
+ int disposition_attachment;
int show_log_size;
struct string_list *mailmap;