Skip to content

Conversation

akinomyoga
Copy link
Collaborator

The description is in the commit message 3657334.

@akinomyoga akinomyoga force-pushed the update-deprecated-links branch from 6f1ce19 to 3bbd5d7 Compare February 23, 2023 17:10
@akinomyoga akinomyoga force-pushed the update-deprecated-links branch from 3bbd5d7 to e8b3b17 Compare February 23, 2023 17:44
The pre-commit script `update-deprecated-links` creates dangling links
to untracked files (such as the text editor's backup files, the
manually backed up files, some files that will be added later, etc.).
These dangling links would block creating the commit.

In this patch, we check if the target path is tracked by git or not
before creating the symbolic link.

We also would not try to remove untracked files or regular files in
`test/deprecated/completions/`.  We would only remove tracked links.
The test scripts have had the shebang #!/bin/bash, but Bash is not
necessarily located at /bin/bash.  For example, it does not located
there in FreeBSD and MINIX.  As we require /bin/bash in the shebang of
the pre-commit scripts, any attempts to commit changes in such a
system would be blocked by the pre-commit hook.

In this patch, we update the shebang to `#!/usr/bin/env bash`, which
is a widely used workaround for this issue.

Note: I have not changed the shebang of
`test/docker/*/install-packages.sh` as these seem to be always called
in a GNU/Linux container, where /bin/bash exists.
@akinomyoga akinomyoga force-pushed the update-deprecated-links branch from e8b3b17 to 820b613 Compare February 24, 2023 00:02
@akinomyoga akinomyoga merged commit ceb89d4 into scop:master Feb 24, 2023
@akinomyoga akinomyoga deleted the update-deprecated-links branch February 24, 2023 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants