Skip to content

Commit

Permalink
Fixed git-subrepo and tests if set ff=only
Browse files Browse the repository at this point in the history
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
  • Loading branch information
spog committed Nov 23, 2024
1 parent 6afa651 commit 05034b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ subrepo:pull() {
fi
else
o "Merge in changes from $refs_subrepo_fetch"
FAIL=false RUN git merge "$refs_subrepo_fetch"
FAIL=false RUN git merge --ff "$refs_subrepo_fetch"
if ! OK; then
say "The \"git merge\" command failed:"
say
Expand Down
2 changes: 1 addition & 1 deletion test/branch-rev-list-one-path.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ subrepo-clone-bar-into-foo
add-new-files bar/file3
add-new-files bar/file4
add-new-files bar/file5
git merge master
git merge --ff master
) >& /dev/null || die

test-exists "$OWNER/foo/bar/file1" "$OWNER/foo/bar/file2" "$OWNER/foo/bar/file3" "$OWNER/foo/bar/file4" "$OWNER/foo/bar/file5"
Expand Down
2 changes: 1 addition & 1 deletion test/branch-rev-list.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ subrepo-clone-bar-into-foo
add-new-files bar/file3
add-new-files bar/file4
add-new-files bar/file5
git merge master
git merge --ff master
) >& /dev/null || die

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

0 comments on commit 05034b1

Please # to comment.