We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aaf328 commit 2673d96Copy full SHA for 2673d96
src/fast-forward.sh
@@ -248,8 +248,20 @@ LOG=$(mktemp)
248
echo " Branches appear to have diverged at $MERGE_BASE:"
249
echo
250
echo '```shell'
251
+
252
+ # We don't want to displays the commits before the merge
253
+ # base. We need to be careful though: if the merge base
254
+ # is a root (i.e., it has no parents), then $MERGE_BASE^
255
+ # is not a valid reference.
256
+ if test x$(git cat-file -t "$MERGE_BASE^") = xcommit
257
+ then
258
+ EXCLUDE="^$MERGE_BASE^"
259
+ else
260
+ EXCLUDE=
261
+ fi
262
263
git log --pretty=oneline --graph \
- "^$MERGE_BASE^" "$BASE_SHA" "$PR_SHA"
264
+ $EXCLUDE "$BASE_SHA" "$PR_SHA"
265
266
git log --decorate=short -n 1 "$MERGE_BASE"
267
echo '```'
0 commit comments