mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
Implement a cpio emulation in git-merge.sh for Windows.
GNU tar is used as the archiver. It doesn't matter that the archive has a different format because it is only a temporary stash that is consumed by the emulation itself. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
18
git-merge.sh
18
git-merge.sh
@@ -26,6 +26,24 @@ use_strategies=
|
||||
allow_fast_forward=t
|
||||
allow_trivial_merge=t
|
||||
|
||||
# Fix some commands on Windows
|
||||
case $(uname -s) in
|
||||
*MINGW*)
|
||||
# there's no cpio; emulate with tar
|
||||
cpio () {
|
||||
case "$*" in
|
||||
"-0 -o")
|
||||
tar --create --file=- --null --files-from=-
|
||||
;;
|
||||
"-iuv")
|
||||
tar xvf -
|
||||
;;
|
||||
*) die "internal error: unexpected cpio $*";;
|
||||
esac
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
||||
dropsave() {
|
||||
rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" \
|
||||
"$GIT_DIR/MERGE_SAVE" || exit 1
|
||||
|
||||
Reference in New Issue
Block a user