mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 21:41:03 +00:00
c3781efb28
Use 'git fetch' followed by 'git reset' to update the source tree. This is better than 'git pull' because it can handle a rewritten upstream branch and does not leave local modifications. After fetch, parse FETCH_HEAD to find the merge head that 'git pull' would choose to track the upstream branch. Then reset to the selected head. In the normal fast-forward case the behavior remains unchanged. However, now local modifications and commits will be erased, and upstream rewrites are handled smoothly. This ensures that the upstream branch is tested as expected.
7 lines
135 B
Bash
Executable File
7 lines
135 B
Bash
Executable File
#!/bin/sh
|
|
if test "x$1" = "xpull" -o "x$1" = "xreset"; then
|
|
"@GIT@" "$@" && sleep 1 && touch foo.txt
|
|
else
|
|
exec "@GIT@" "$@"
|
|
fi
|