Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Release date: **not yet**
* `git flow feature finish` can now be called without a feature branch
name(prefix) argument and will finish the current branch, if on any.

* `git flow feature diff` now has a `-w` flag for `diff --ignore-all-space`
(thanks Norbert Kiesel).

* `git flow feature pull` now has a `-r` flag, to support `pull --rebase`
semantics (thanks Vedang Manerikar).

Expand Down
11 changes: 8 additions & 3 deletions git-hf-feature
Original file line number Diff line number Diff line change
Expand Up @@ -459,19 +459,24 @@ cmd_finish() {
}

cmd_diff() {
DEFINE_boolean ignore_all_space false 'Ignore changes in amount of whitespace' w
parse_args "$@"

local OPTS=
if flag ignore_all_space; then
OPTS="$OPTS -w"
fi
if [ "$NAME" != "" ]; then
expand_nameprefix_arg
BASE=$(git merge-base "$DEVELOP_BRANCH" "$FEATURE_BRANCH")
git diff "$BASE..$FEATURE_BRANCH"
git diff $OPTS "$BASE..$FEATURE_BRANCH"
else
if ! git_current_branch | grep -q "^$FEATURE_PREFIX"; then
die "Not on a feature branch. Name one explicitly."
fi

BASE=$(git merge-base "$DEVELOP_BRANCH" HEAD)
git diff "$BASE"
git diff $OPTS "$BASE"
fi
}

Expand Down Expand Up @@ -648,4 +653,4 @@ cmd_rename() {
fi
echo "- The local branch '$NEWNAME' has been pushed to $ORIGIN."
echo
}
}