[PATCH v3 00/20] Add `range-diff`, a `tbdiff` lookalike

2018-07-03 Thread Johannes Schindelin via GitGitGadget
The incredibly useful `git-tbdiff` tool to compare patch series (say, to see what changed between two iterations sent to the Git mailing list) is slightly less useful for this developer due to the fact that it requires the `hungarian` and `numpy` Python packages which are for some reason really

[PATCH v3 07/20] range-diff: indent the diffs just like tbdiff

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The main information in the `range-diff` view comes from the list of matching and non-matching commits, the diffs are additional information. Indenting them helps with the reading flow. Signed-off-by: Johannes Schindelin --- builtin/range-diff.c | 10 ++ 1

[PATCH v3 13/20] color: add the meta color GIT_COLOR_REVERSE

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This "color" simply reverts background and foreground. It will be used in the upcoming "dual color" mode of `git range-diff`, where we will reverse colors for the -/+ markers and the fragment headers of the "outer" diff. Signed-off-by: Johannes Schindelin --- color.h

[PATCH v3 19/20] range-diff: left-pad patch numbers

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin As pointed out by Elijah Newren, tbdiff has this neat little alignment trick where it outputs the commit pairs with patch numbers that are padded to the maximal patch number's width: 1: cafedead = 1: acefade first patch [...] 314: beefeada <

[PATCH v3 12/20] range-diff: use color for the commit pairs

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Arguably the most important part of `git range-diff`'s output is the list of commits in the two branches, together with their relationships. For that reason, tbdiff introduced color-coding that is pretty intuitive, especially for unchanged patches (all dim yellow, like

[PATCH v3 17/20] range-diff: add a man page

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The bulk of this patch consists of a heavily butchered version of tbdiff's README written by Thomas Rast and Thomas Gummerer, lifted from https://github.com/trast/tbdiff. Signed-off-by: Johannes Schindelin --- Documentation/git-range-diff.txt | 235

[PATCH v3 18/20] completion: support `git range-diff`

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Tab completion of `git range-diff` is very convenient, especially given that the revision arguments to specify the commit ranges to compare are typically more complex than, say, your grandfather's `git log` arguments. Signed-off-by: Johannes Schindelin squash! WIP

[PATCH v3 20/20] range-diff: make --dual-color the default mode

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin After using this command extensively for the last two months, this developer came to the conclusion that even if the dual color mode still leaves a lot of room for confusion what was actually changed, the non-dual color mode is substantially worse in that regard.

[PATCH v3 09/20] range-diff: adjust the output of the commit pairs

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This change brings `git range-diff` yet another step closer to feature parity with tbdiff: it now shows the oneline, too, and indicates with `=` when the commits have identical diffs. Signed-off-by: Johannes Schindelin --- range-diff.c | 66

[PATCH v3 10/20] range-diff: do not show "function names" in hunk headers

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We are comparing complete, formatted commit messages with patches. There are no function names here, so stop looking for them. Signed-off-by: Johannes Schindelin --- range-diff.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/range-diff.c b/range-diff.c

[PATCH v3 06/20] range-diff: right-trim commit messages

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When comparing commit messages, we need to keep in mind that they are indented by four spaces. That is, empty lines are no longer empty, but have "trailing whitespace". When displaying them in color, that results in those nagging red lines. Let's just right-trim the

[PATCH v3 08/20] range-diff: suppress the diff headers

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When showing the diff between corresponding patches of the two branch versions, we have to make up a fake filename to run the diff machinery. That filename does not carry any meaningful information, hence tbdiff suppresses it. So we should, too. Signed-off-by:

[PATCH v3 16/20] range-diff --dual-color: work around bogus white-space warning

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When displaying a diff of diffs, it is possible that there is an outer `+` before a context line. That happens when the context changed between old and new commit. When that context line starts with a tab (after the space that marks it as context line), our diff

[PATCH v3 05/20] range-diff: also show the diff between patches

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just like tbdiff, we now show the diff between matching patches. This is a "diff of two diffs", so it can be a bit daunting to read for the beginner. An alternative would be to display an interdiff, i.e. the hypothetical diff which is the result of first reverting the

[PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The problem solved by the code introduced in this commit goes like this: given two sets of items, and a cost matrix which says how much it "costs" to assign any given item of the first set to any given item of the second, assign all items (except when the sets have

[PATCH v3 04/20] range-diff: improve the order of the shown commits

2018-07-03 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This patch lets `git range-diff` use the same order as tbdiff. The idea is simple: for left-to-right readers, it is natural to assume that the `git range-diff` is performed between an older vs a newer version of the branch. As such, the user is probably more interested

[PATCH v2 1/1] Makefile: fix the "built from commit" code

2018-06-29 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In ed32b788c06 (version --build-options: report commit, too, if possible, 2017-12-15), we introduced code to let `git version --build-options` report the current commit from which the binaries were built, if any. To prevent erroneous commits from being reported (e.g.

[PATCH v2 0/1] Fix "built from commit" logic

2018-06-29 Thread Johannes Schindelin via GitGitGadget
When I tried recently to build macOS installers via Tim Harper's wonderful project at https://github.com/timcharper/git_osx_installer, it worked (with a couple of quirks), but it reported to be built from a commit that I first could not place. Turns out that the git_osx_installer project

[PATCH 0/1] Makefile: fix the "built from commit" code

2018-06-28 Thread Johannes Schindelin via GitGitGadget
In ed32b788c06 (version --build-options: report commit, too, if possible, 2017-12-15), we introduced code to let `git version --build-options` report the current commit from which the binaries were built, if any. To prevent erroneous commits from being reported (e.g. when unpacking Git's source

[PATCH 1/1] Makefile: fix the "built from commit" code

2018-06-28 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In ed32b788c06 (version --build-options: report commit, too, if possible, 2017-12-15), we introduced code to let `git version --build-options` report the current commit from which the binaries were built, if any. To prevent erroneous commits from being reported (e.g.

[PATCH 2/2] rebase --root: fix amending root commit messages

2018-06-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The code path that triggered that "BUG" really does not want to run without an explicit commit message. In the case where we want to amend a commit message, we have an *implicit* commit message, though: the one of the commit to amend. Therefore, this code path should

[PATCH 1/2] rebase --root: demonstrate a bug while amending root commit messages

2018-06-16 Thread Johannes Schindelin via GitGitGadget
From: Todd Zullinger When splitting a repository, running `git rebase -i --root` to reword the initial commit, Git dies with BUG: sequencer.c:795: root commit without message. Signed-off-by: Todd Zullinger Signed-off-by: Johannes Schindelin --- t/t3404-rebase-interactive.sh | 9

[PATCH 0/2] rebase --root: fix `reword` on a root commit

2018-06-16 Thread Johannes Schindelin via GitGitGadget
From: GitGitGadget Todd Zullinger reported this bug in https://public-inbox.org/git/20180615043111.gs3...@zaya.teonanacatl.net/: when calling git rebase --root and trying to reword the root commit's message, a BUG is reported. This fixes that. IMO the bug fix is trivial enough to qualify

<    1   2   3   4