Skip to content

Commit 05034b1

Browse files
committed
Fixed git-subrepo and tests if set ff=only
Some tests failed, when ff_only is set in users git configuration; like: ... test/branch-rev-list-one-path.t .... Died at line 23 in main of test/branch-rev-list-one-path.t test/branch-rev-list-one-path.t .... No subtests run test/branch-rev-list.t ............. Died at line 26 in main of test/branch-rev-list.t test/branch-rev-list.t ............. No subtests run ... and git configuration is set like: $ git config --global pull.ff only $ git config --global merge.ff only
1 parent 6afa651 commit 05034b1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/git-subrepo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ subrepo:pull() {
574574
fi
575575
else
576576
o "Merge in changes from $refs_subrepo_fetch"
577-
FAIL=false RUN git merge "$refs_subrepo_fetch"
577+
FAIL=false RUN git merge --ff "$refs_subrepo_fetch"
578578
if ! OK; then
579579
say "The \"git merge\" command failed:"
580580
say

test/branch-rev-list-one-path.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ subrepo-clone-bar-into-foo
1919
add-new-files bar/file3
2020
add-new-files bar/file4
2121
add-new-files bar/file5
22-
git merge master
22+
git merge --ff master
2323
) >& /dev/null || die
2424

2525
test-exists "$OWNER/foo/bar/file1" "$OWNER/foo/bar/file2" "$OWNER/foo/bar/file3" "$OWNER/foo/bar/file4" "$OWNER/foo/bar/file5"

test/branch-rev-list.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ subrepo-clone-bar-into-foo
2222
add-new-files bar/file3
2323
add-new-files bar/file4
2424
add-new-files bar/file5
25-
git merge master
25+
git merge --ff master
2626
) >& /dev/null || die
2727

2828
test-exists "$OWNER/foo/bar/file1" "$OWNER/foo/bar/file2" "$OWNER/foo/bar/file3" "$OWNER/foo/bar/file4" "$OWNER/foo/bar/file5"

0 commit comments

Comments
 (0)