Fixed git-subrepo and tests if set ff=only#640
Fixed git-subrepo and tests if set ff=only#640spog wants to merge 4 commits intoingydotnet:masterfrom
Conversation
6add0dc to
05034b1
Compare
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
admorgan
left a comment
There was a problem hiding this comment.
I don't feel this is the best option for testing this feature. I believe that it would be sufficient to have a specific test that incorporates the fast forward only instead of setting it for all tests.
|
|
||
| .PHONY: test | ||
| test: | ||
| @echo uname: '$(shell uname)' |
There was a problem hiding this comment.
Why did you feel this would beneficial?
There was a problem hiding this comment.
Hi and thanks for the question. Namely, while i was wrestling with github pipelines for Linux and Macos, i found this additional pipeline output very useful, especially in PR #639. So i thought i should leave it in this PR as well. There is no other value to it otherwise.
| else | ||
|
|
||
| # Real GIT configuration for tests is set here: | ||
| rm -f "${PROJ_DIR}/.gitconfig" |
There was a problem hiding this comment.
I am not ok with removing the .gitconfig from a person's working directory.
There was a problem hiding this comment.
Hi again,
i thought i made sure, that HOME is temporarily set to $PWD in 'test/setup' for the duration of running tests and only when git-subrepo's clone directory (PROJ_DIR) and HOME match, then rewrite tests-defined git configuration in PROJ_DIR.
regards, Samo
That may certainly be true, however i wanted to provide a way to define/set default tests-specific git configuration and which is independent of current user's git config, |
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
There may be a similar cause of failure described in issue 550.