forked from forgejo/forgejo
Use refname:strip-2 instead of refname:short when syncing tags (#28797)
Fix #28694 Generally, `refname:short` should be equal to `refname:lstrip=2` except `core.warnAmbiguousRefs is used to select the strict abbreviation mode.` ref: https://git-scm.com/docs/git-for-each-ref#Documentation/git-for-each-ref.txt-refname
This commit is contained in:
parent
5374d29aa9
commit
930e38d010
3 changed files with 15 additions and 13 deletions
|
@ -49,9 +49,9 @@ func TestFormat_Flag(t *testing.T) {
|
|||
{
|
||||
name: "multiple fields",
|
||||
|
||||
givenFormat: foreachref.NewFormat("refname:short", "objecttype", "objectname"),
|
||||
givenFormat: foreachref.NewFormat("refname:lstrip=2", "objecttype", "objectname"),
|
||||
|
||||
wantFlag: "refname:short %(refname:short)%00objecttype %(objecttype)%00objectname %(objectname)%00%00",
|
||||
wantFlag: "refname:lstrip=2 %(refname:lstrip=2)%00objecttype %(objecttype)%00objectname %(objectname)%00%00",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue