1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
From: =?UTF-8?q?Samo=20Poga=C4=8Dnik?= <samo_pogacnik@t-2.net>
Date: Sat, 16 Nov 2024 17:47:04 +0100
Forwarded: https://github.com/ingydotnet/git-subrepo/pull/640
Subject: 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
---
lib/git-subrepo | 2 +-
test/branch-rev-list-one-path.t | 2 +-
test/branch-rev-list.t | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/git-subrepo b/lib/git-subrepo
index 6ad6bbb..5e89050 100755
--- a/lib/git-subrepo
+++ b/lib/git-subrepo
@@ -561,7 +561,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
diff --git a/test/branch-rev-list-one-path.t b/test/branch-rev-list-one-path.t
index afa4905..575ea8f 100644
--- a/test/branch-rev-list-one-path.t
+++ b/test/branch-rev-list-one-path.t
@@ -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"
diff --git a/test/branch-rev-list.t b/test/branch-rev-list.t
index 243412c..1f39df4 100644
--- a/test/branch-rev-list.t
+++ b/test/branch-rev-list.t
@@ -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"
--
2.45.2
|