Skip to content

Preserve file permissions#83

Merged
fabpot merged 2 commits into
splitsh:masterfrom
mharacewiat:preserve-file-permissions
Nov 30, 2025
Merged

Preserve file permissions#83
fabpot merged 2 commits into
splitsh:masterfrom
mharacewiat:preserve-file-permissions

Conversation

@mharacewiat
Copy link
Copy Markdown
Contributor

@mharacewiat mharacewiat commented Aug 28, 2025

Description

Fixes issues with file permissions on root directory when using paths with exclude directories.

Reproducer

Given a repository with foo folder to be splitted. It contains script.sh executable file.

git ls-tree -r --format='%(objectmode) - %(path)' split_origin | grep foo/script.sh
100755 - foo/script.sh

Experiment with splitting.

splitsh-lite \
    --prefix foo/ \
    --target refs/heads/split_target_simple \
    --origin refs/heads/split_origin

splitsh-lite \
    --commit XYZ \
    --prefix foo/ \
    --target refs/heads/split_target_simple_with_commit \
    --origin refs/heads/split_origin

splitsh-lite \
    --prefix foo/::not-important:also-not-important \
    --target refs/heads/split_target_with_excluded_folders \
    --origin refs/heads/split_origin

splitsh-lite \
    --commit XYZ \
    --prefix foo/::not-important:also-not-important \
    --target refs/heads/split_target_with_excluded_folders_and_commit \
    --origin refs/heads/split_origin

Validate.

git ls-tree -r --format='%(objectmode) - %(path)' split_target_simple | grep script.sh
100755 - script.sh

git ls-tree -r --format='%(objectmode) - %(path)' split_target_simple_with_commit | grep script.sh
100755 - script.sh

git ls-tree -r --format='%(objectmode) - %(path)' split_target_with_excluded_folders | grep script.sh
100644 - script.sh

git ls-tree -r --format='%(objectmode) - %(path)' split_target_with_excluded_folders_and_commit | grep script.sh
100644 - script.sh

@fabpot fabpot merged commit 36e0e74 into splitsh:master Nov 30, 2025
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