Refactor getpatch/getdiff functions and remove unnecessary fallback (#32817)
Extract from #32786 `git diff a..b` is equal to `git diff a b` which is different from `git diff a...b`. For pull request, we should always --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
6d5aa9218e
commit
b8b690feb9
3 changed files with 24 additions and 67 deletions
|
@ -28,7 +28,7 @@ func TestGetFormatPatch(t *testing.T) {
|
|||
defer repo.Close()
|
||||
|
||||
rd := &bytes.Buffer{}
|
||||
err = repo.GetPatch("8d92fc95^", "8d92fc95", rd)
|
||||
err = repo.GetPatch("8d92fc95^...8d92fc95", rd)
|
||||
if err != nil {
|
||||
assert.NoError(t, err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue