Commit graph

19 commits

Author SHA1 Message Date
Sorah Fukumori
fac2536776
Test_SyncDefaultGems: Fail when editor run (#9365)
When something went wrong and git launches editor, and a editor chosen
was terminal-based, a test run unnoticeably hangs.

As we intend editors not to be ran with --no-edit, GIT_EDITOR should be
defaulted to `false` so let Git command fails when it attempts to start a
editor. This allows catching such unintentional behaviour in test suite.

(Note: Prior to Git v2.32.0, git cherry-pick --no-edit doesn't work for
conflict resolution so currently the test hangs when older Git is in use.
39edfd5cbc
i.e. Ubuntu 20.04, Debian Bullseye doesn't satisfy this prerequisite.)
2023-12-26 21:43:23 +00:00
Nobuyoshi Nakada
7cbc08b388 Follow removed conflict files
After editing a conflict, continue without removed files.
2023-12-15 22:37:38 +09:00
Nobuyoshi Nakada
304194d73e Remove files which are newly added but to be ignored 2023-11-07 10:45:02 +09:00
Nobuyoshi Nakada
94bcae1b2a
Special treat when the first line ends with a dot [ci skip] 2023-10-04 19:27:34 +09:00
Nobuyoshi Nakada
3c11cdbcfe Fix the case of file to be ignored with to be removed
The case of 7fc73ab5f6, which modified
`.gitignore` and `.github/workflows/main.yml`.  Both files need to be
rejected and restored, but since the latter file was not there before,
`git checkout` failed and the former file could not be restored along
with it.  To fix this failure, restore the ignored files one by one.
2023-09-20 13:00:18 +09:00
Nobuyoshi Nakada
afaa164a05 Add a successful sync test case 2023-09-20 13:00:18 +09:00
Nobuyoshi Nakada
88262875fd
Fix git cat-file condition
When multiple files changed in the same directory to be removed, the
first file only was removed from changed set.
2023-09-18 02:23:59 +09:00
Nobuyoshi Nakada
8d219a9bd7
Refactor test_sync_default_gems.rb 2023-09-18 02:11:48 +09:00
Nobuyoshi Nakada
00439dbdb4
sync_default_gems.rb: convert keys of REPOSITORIES to strings
Referencing always after conversion to a symbol, and yielded gem name
is always converted to a string.
2023-08-28 17:52:50 +09:00
Nobuyoshi Nakada
eb221a3734
Prohibit copying to fixtures and dot-direcotry just under test
Do not add directories which would let chkbuild fires accidentally, to
just under `test`.  The "fixtures" directory is often used to place
test stuffs.
2023-08-13 15:30:58 +09:00
Nobuyoshi Nakada
3651f985f0
Exclude files added to the toplevel 2023-08-06 09:26:20 +09:00
Nobuyoshi Nakada
628cc7e12d
Change HOME too when testing sync_default_gems.rb
As well as `GIT_CONFIG_GLOBAL`, which is supported since git 2.32.
2023-07-29 20:02:47 +09:00
Nobuyoshi Nakada
4b91d6abb9
Revert "Test sync_default_gems.rb only when git 2.32 is available"
This reverts commit b0f44cfa5d.
2023-07-29 20:02:13 +09:00
Nobuyoshi Nakada
b0f44cfa5d
Test sync_default_gems.rb only when git 2.32 is available
With older git, as `GIT_CONFIG_GLOBAL` environment variable is not
supported, these tests clobber user's configurations.
2023-07-29 11:49:53 +09:00
Nobuyoshi Nakada
35da0d4a6e
Support older git
The -b flag is available since 2.28, but Ubuntu 20.04 uses 2.25.
2023-04-28 18:29:31 +09:00
Nobuyoshi Nakada
6b05f125bb Skip commits only for tools
Get rid of accidents like 67feb782f9.
2023-03-28 17:17:51 +09:00
Nobuyoshi Nakada
398aaed2f0
Fix the case trailer without newline
cf0b413ef8
2022-12-22 00:34:21 +09:00
Nobuyoshi Nakada
93e87c0217 Fix the case of multiple trailers 2022-11-28 16:30:40 +09:00
Nobuyoshi Nakada
5a171ee4c0 Add tests for sync_default_gems.rb 2022-11-28 16:30:40 +09:00