@@ -185,7 +185,7 @@ func CreateBranch(ctx *context.Context) {
185185
186186	if  ctx .HasError () {
187187		ctx .Flash .Error (ctx .GetErrMsg ())
188- 		ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .BranchNameSubURL ())
188+ 		ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .RefTypeNameSubURL ())
189189		return 
190190	}
191191
@@ -205,25 +205,25 @@ func CreateBranch(ctx *context.Context) {
205205	if  err  !=  nil  {
206206		if  release_service .IsErrProtectedTagName (err ) {
207207			ctx .Flash .Error (ctx .Tr ("repo.release.tag_name_protected" ))
208- 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .BranchNameSubURL ())
208+ 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .RefTypeNameSubURL ())
209209			return 
210210		}
211211
212212		if  release_service .IsErrTagAlreadyExists (err ) {
213213			e  :=  err .(release_service.ErrTagAlreadyExists )
214214			ctx .Flash .Error (ctx .Tr ("repo.branch.tag_collision" , e .TagName ))
215- 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .BranchNameSubURL ())
215+ 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .RefTypeNameSubURL ())
216216			return 
217217		}
218218		if  git_model .IsErrBranchAlreadyExists (err ) ||  git .IsErrPushOutOfDate (err ) {
219219			ctx .Flash .Error (ctx .Tr ("repo.branch.branch_already_exists" , form .NewBranchName ))
220- 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .BranchNameSubURL ())
220+ 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .RefTypeNameSubURL ())
221221			return 
222222		}
223223		if  git_model .IsErrBranchNameConflict (err ) {
224224			e  :=  err .(git_model.ErrBranchNameConflict )
225225			ctx .Flash .Error (ctx .Tr ("repo.branch.branch_name_conflict" , form .NewBranchName , e .BranchName ))
226- 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .BranchNameSubURL ())
226+ 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .RefTypeNameSubURL ())
227227			return 
228228		}
229229		if  git .IsErrPushRejected (err ) {
@@ -242,7 +242,7 @@ func CreateBranch(ctx *context.Context) {
242242				}
243243				ctx .Flash .Error (flashError )
244244			}
245- 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .BranchNameSubURL ())
245+ 			ctx .Redirect (ctx .Repo .RepoLink  +  "/src/"  +  ctx .Repo .RefTypeNameSubURL ())
246246			return 
247247		}
248248
0 commit comments