Skip to content

git-extras Fixes "cp: 'bin/git-scp' and 'bin/git-rscp' are the same f…#6188

Open
lygstate wants to merge 1 commit intomsys2:masterfrom
lygstate:git-extras-same-file-fixes
Open

git-extras Fixes "cp: 'bin/git-scp' and 'bin/git-rscp' are the same f…#6188
lygstate wants to merge 1 commit intomsys2:masterfrom
lygstate:git-extras-same-file-fixes

Conversation

@lygstate
Copy link
Copy Markdown
Contributor

…ile"

@lygstate lygstate force-pushed the git-extras-same-file-fixes branch from 9319ab3 to bc7a3f1 Compare April 16, 2026 18:55
@ognevny
Copy link
Copy Markdown
Collaborator

ognevny commented Apr 16, 2026

cc @dscho

@lygstate lygstate force-pushed the git-extras-same-file-fixes branch from bc7a3f1 to 0d6a8de Compare April 16, 2026 19:03
@lygstate
Copy link
Copy Markdown
Contributor Author

lygstate commented Apr 16, 2026

What's the default MSYS in CI?
I am using

$ echo $MSYS
winsymlinks:native

locally.

@ognevny
Copy link
Copy Markdown
Collaborator

ognevny commented Apr 16, 2026

by default winsymlinks set to deep copy option, so all symlinks are actually copies of sources

@lygstate lygstate force-pushed the git-extras-same-file-fixes branch from 0d6a8de to 59a5aca Compare April 16, 2026 19:09
@lygstate
Copy link
Copy Markdown
Contributor Author

OK, I switch it to MSYS=winsymlinks:native and now it's fine for bsdtar

Comment thread git-extras/PKGBUILD Outdated
Comment on lines +20 to +22
bsdtar -zxf "${_realname}-${pkgver}.tar.gz" || true

cd "${srcdir}/${_realname}-${pkgver}"
cp bin/git-scp bin/git-rscp
MSYS=winsymlinks:native \
bsdtar -zxf "${_realname}-${pkgver}.tar.gz"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if many people are lucky enough to run MSYS2 on a recent Windows machine in Developer Mode, not all MSYS2 users are that lucky. And those would no longer be able to use this recipe to build.

Maybe it would be better to go the other way round, using MSYS=winsymlinks:deepcopy and keep most of the original code as-is?

Copy link
Copy Markdown
Contributor Author

@lygstate lygstate Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between winsymlinks:native and winsymlinks:nativestrict is this: If the filesystem supports native symlinks and Cygwin fails to create a native symlink for some reason, it will fall back to creating Cygwin default symlinks with winsymlinks:native, while with winsymlinks:nativestrict the symlink(2) system call will immediately fail.
So I think winsymlinks:native is a better opton indeed. According to https://cygwin.com/cygwin-ug-net/using-cygwinenv.html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSYS=winsymlinks:deepcopy have the following error that are hidden.:

git-extras-7.4.0/bin/git-rscp: Can't create 'git-extras-7.4.0/bin/git-rscp': No such file or directory
bsdtar: Error exit delayed from previous errors

…ile"

we can extract with bsdtar properly when MSYS=winsymlinks:native

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
@lygstate lygstate force-pushed the git-extras-same-file-fixes branch from 59a5aca to 585d854 Compare April 18, 2026 02:31
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.

3 participants