@@ -475,6 +475,19 @@ function dim_retip
git rebase --onto $new_upstream $upstream $branch "$@"
}
+function dim_range_diff
+{
+ local branch
+
+ branch=${1:-@\{1\}}
+
+ if [[ $branch != "" && $(git rev-parse $branch | wc -l) -eq 1 ]] ; then
+ git range-diff $branch...HEAD
+ else
+ git range-diff "$@"
+ fi
+}
+
# update for-linux-next and for-linux-next-fixes branches
function update_linux_next # branch next next-fixes fixes
{
@@ -95,6 +95,14 @@ retip [*branch*] [*git-rebase option* ...]
Rebase the given local branch, current branch by default, onto drm-tip. Options
after the branch will be passed to **git-rebase**.
+range-diff [ *commit-ish* | *git-range-diff options* ]
+------------------------------------------------------
+
+Convenience wrapper around the git range-diff command which automatically
+compares against HEAD if you only specify a commit-ish. In all other cases
+forwards to git range-diff. Defaults to @{1}, which is very useful for reviewing
+rebases.
+
COMMANDS FOR COMMITTERS AND MAINTAINERS
=======================================
range-diff is awesome, but the interface is a bit silly. Add a bunch of shortcuts, inspired by what git diff does. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- dim | 13 +++++++++++++ dim.rst | 8 ++++++++ 2 files changed, 21 insertions(+)