summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/RelNotes/2.20.0.txt30
-rw-r--r--Documentation/git-rebase.txt30
-rw-r--r--builtin/log.c11
-rw-r--r--log-tree.c11
-rwxr-xr-xt/t3206-range-diff.sh20
5 files changed, 65 insertions, 37 deletions
diff --git a/Documentation/RelNotes/2.20.0.txt b/Documentation/RelNotes/2.20.0.txt
index b1deaf37da..e71fe3dee1 100644
--- a/Documentation/RelNotes/2.20.0.txt
+++ b/Documentation/RelNotes/2.20.0.txt
@@ -137,11 +137,6 @@ UI, Workflows & Features
command line, or setting sendemail.suppresscc configuration
variable to "misc-by", can be used to disable this behaviour.
- * Developer builds now uses -Wunused-function compilation option.
-
- * One of our CI tests to run with "unusual/experimental/random"
- settings now also uses commit-graph and midx.
-
* "git mergetool" learned to take the "--[no-]gui" option, just like
"git difftool" does.
@@ -185,6 +180,11 @@ UI, Workflows & Features
Performance, Internal Implementation, Development Support etc.
+ * Developer builds now use -Wunused-function compilation option.
+
+ * One of our CI tests to run with "unusual/experimental/random"
+ settings now also uses commit-graph and midx.
+
* When there are too many packfiles in a repository (which is not
recommended), looking up an object in these would require
consulting many pack .idx files; a new mechanism to have a single
@@ -305,7 +305,7 @@ Performance, Internal Implementation, Development Support etc.
* The overly large Documentation/config.txt file have been split into
million little pieces. This potentially allows each individual piece
- included into the manual page of the command it affects more easily.
+ to be included into the manual page of the command it affects more easily.
* Replace three string-list instances used as look-up tables in "git
fetch" with hashmaps.
@@ -387,6 +387,14 @@ Performance, Internal Implementation, Development Support etc.
two classes to ease code migration process has been proposed and
its support has been added to the Makefile.
+ * The "container" mode of TravisCI is going away. Our .travis.yml
+ file is getting prepared for the transition.
+ (merge 32ee384be8 ss/travis-ci-force-vm-mode later to maint).
+
+ * Our test scripts can now take the '-V' option as a synonym for the
+ '--verbose-log' option.
+ (merge a5f52c6dab sg/test-verbose-log later to maint).
+
Fixes since v2.19
-----------------
@@ -544,14 +552,6 @@ Fixes since v2.19
didn't make much sense. This has been corrected.
(merge 669b1d2aae md/exclude-promisor-objects-fix later to maint).
- * The "container" mode of TravisCI is going away. Our .travis.yml
- file is getting prepared for the transition.
- (merge 32ee384be8 ss/travis-ci-force-vm-mode later to maint).
-
- * Our test scripts can now take the '-V' option as a synonym for the
- '--verbose-log' option.
- (merge a5f52c6dab sg/test-verbose-log later to maint).
-
* A regression in Git 2.12 era made "git fsck" fall into an infinite
loop while processing truncated loose objects.
(merge 18ad13e5b2 jk/detect-truncated-zlib-input later to maint).
@@ -578,7 +578,7 @@ Fixes since v2.19
* "git rev-parse --exclude=* --branches --branches" (i.e. first
saying "add only things that do not match '*' out of all branches"
- and then adding all branches, without any exclusion this time")
+ and then adding all branches, without any exclusion this time)
worked as expected, but "--exclude=* --all --all" did not work the
same way, which has been fixed.
(merge 5221048092 ag/rev-parse-all-exclude-fix later to maint).
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 80793bad8d..dff17b3178 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -550,24 +550,28 @@ Other incompatible flag pairs:
BEHAVIORAL DIFFERENCES
-----------------------
- * empty commits:
+There are some subtle differences how the backends behave.
- am-based rebase will drop any "empty" commits, whether the
- commit started empty (had no changes relative to its parent to
- start with) or ended empty (all changes were already applied
- upstream in other commits).
+Empty commits
+~~~~~~~~~~~~~
+
+The am backend drops any "empty" commits, regardless of whether the
+commit started empty (had no changes relative to its parent to
+start with) or ended empty (all changes were already applied
+upstream in other commits).
- merge-based rebase does the same.
+The merge backend does the same.
- interactive-based rebase will by default drop commits that
- started empty and halt if it hits a commit that ended up empty.
- The `--keep-empty` option exists for interactive rebases to allow
- it to keep commits that started empty.
+The interactive backend drops commits by default that
+started empty and halts if it hits a commit that ended up empty.
+The `--keep-empty` option exists for the interactive backend to allow
+it to keep commits that started empty.
- * directory rename detection:
+Directory rename detection
+~~~~~~~~~~~~~~~~~~~~~~~~~~
- merge-based and interactive-based rebases work fine with
- directory rename detection. am-based rebases sometimes do not.
+The merge and interactive backends work fine with
+directory rename detection. The am backend sometimes does not.
include::merge-strategies.txt[]
diff --git a/builtin/log.c b/builtin/log.c
index 5ac18e2848..e8e51068bd 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1094,9 +1094,18 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
}
if (rev->rdiff1) {
+ /*
+ * Pass minimum required diff-options to range-diff; others
+ * can be added later if deemed desirable.
+ */
+ struct diff_options opts;
+ diff_setup(&opts);
+ opts.file = rev->diffopt.file;
+ opts.use_color = rev->diffopt.use_color;
+ diff_setup_done(&opts);
fprintf_ln(rev->diffopt.file, "%s", rev->rdiff_title);
show_range_diff(rev->rdiff1, rev->rdiff2,
- rev->creation_factor, 1, NULL);
+ rev->creation_factor, 1, &opts);
}
}
diff --git a/log-tree.c b/log-tree.c
index b243779a0b..10680c139e 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -755,14 +755,23 @@ void show_log(struct rev_info *opt)
if (cmit_fmt_is_mail(ctx.fmt) && opt->rdiff1) {
struct diff_queue_struct dq;
+ struct diff_options opts;
memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff));
DIFF_QUEUE_CLEAR(&diff_queued_diff);
next_commentary_block(opt, NULL);
fprintf_ln(opt->diffopt.file, "%s", opt->rdiff_title);
+ /*
+ * Pass minimum required diff-options to range-diff; others
+ * can be added later if deemed desirable.
+ */
+ diff_setup(&opts);
+ opts.file = opt->diffopt.file;
+ opts.use_color = opt->diffopt.use_color;
+ diff_setup_done(&opts);
show_range_diff(opt->rdiff1, opt->rdiff2,
- opt->creation_factor, 1, NULL);
+ opt->creation_factor, 1, &opts);
memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
}
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index e497c1358f..048feaf6dd 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -248,18 +248,24 @@ test_expect_success 'dual-coloring' '
for prev in topic master..topic
do
test_expect_success "format-patch --range-diff=$prev" '
- git format-patch --stdout --cover-letter --range-diff=$prev \
+ git format-patch --cover-letter --range-diff=$prev \
master..unmodified >actual &&
- grep "= 1: .* s/5/A" actual &&
- grep "= 2: .* s/4/A" actual &&
- grep "= 3: .* s/11/B" actual &&
- grep "= 4: .* s/12/B" actual
+ test_when_finished "rm 000?-*" &&
+ test_line_count = 5 actual &&
+ test_i18ngrep "^Range-diff:$" 0000-* &&
+ grep "= 1: .* s/5/A" 0000-* &&
+ grep "= 2: .* s/4/A" 0000-* &&
+ grep "= 3: .* s/11/B" 0000-* &&
+ grep "= 4: .* s/12/B" 0000-*
'
done
test_expect_success 'format-patch --range-diff as commentary' '
- git format-patch --stdout --range-diff=HEAD~1 HEAD~1 >actual &&
- test_i18ngrep "^Range-diff:$" actual
+ git format-patch --range-diff=HEAD~1 HEAD~1 >actual &&
+ test_when_finished "rm 0001-*" &&
+ test_line_count = 1 actual &&
+ test_i18ngrep "^Range-diff:$" 0001-* &&
+ grep "> 1: .* new message" 0001-*
'
test_done