-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jk/terse-push' into aw/mirror-push
* jk/terse-push: send-pack: segfault fix on forced push send-pack: require --verbose to show update of tracking refs receive-pack: don't mention successful updates more terse push output
- Loading branch information
Showing
3 changed files
with
109 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
test_description='forced push to replace commit we do not have' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success setup ' | ||
>file1 && git add file1 && test_tick && | ||
git commit -m Initial && | ||
mkdir another && ( | ||
cd another && | ||
git init && | ||
git fetch .. master:master | ||
) && | ||
>file2 && git add file2 && test_tick && | ||
git commit -m Second | ||
' | ||
|
||
test_expect_success 'non forced push should die not segfault' ' | ||
( | ||
cd another && | ||
git push .. master:master | ||
test $? = 1 | ||
) | ||
' | ||
|
||
test_expect_success 'forced push should succeed' ' | ||
( | ||
cd another && | ||
git push .. +master:master | ||
) | ||
' | ||
|
||
test_done |