@@ -730,11 +730,6 @@ func (repo *Repository) DescriptionHTML() template.HTML {
730
730
return template .HTML (markup .Sanitize (string (desc )))
731
731
}
732
732
733
- // LocalCopyPath returns the local repository copy path for the given repo.
734
- func (repo * Repository ) LocalCopyPath () string {
735
- return path .Join (LocalCopyPath (), com .ToStr (repo .ID ))
736
- }
737
-
738
733
// PatchPath returns corresponding patch file path of repository by given issue ID.
739
734
func (repo * Repository ) PatchPath (index int64 ) (string , error ) {
740
735
return repo .patchPath (x , index )
@@ -1516,7 +1511,6 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error
1516
1511
if err = os .Rename (RepoPath (owner .Name , repo .Name ), RepoPath (newOwner .Name , repo .Name )); err != nil {
1517
1512
return fmt .Errorf ("rename repository directory: %v" , err )
1518
1513
}
1519
- removeAllWithNotice (sess , "Delete repository local copy" , repo .LocalCopyPath ())
1520
1514
1521
1515
// Rename remote wiki repository to new path and delete local copy.
1522
1516
wikiPath := UncycloPath (owner .Name , repo .Name )
@@ -1566,14 +1560,6 @@ func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error)
1566
1560
return fmt .Errorf ("rename repository directory: %v" , err )
1567
1561
}
1568
1562
1569
- localPath := repo .LocalCopyPath ()
1570
- if com .IsExist (localPath ) {
1571
- _ , err := git .NewCommand ("remote" , "set-url" , "origin" , newRepoPath ).RunInDir (localPath )
1572
- if err != nil {
1573
- return fmt .Errorf ("git remote set-url origin %s: %v" , newRepoPath , err )
1574
- }
1575
- }
1576
-
1577
1563
wikiPath := repo .UncycloPath ()
1578
1564
if com .IsExist (wikiPath ) {
1579
1565
if err = os .Rename (wikiPath , UncycloPath (u .Name , newRepoName )); err != nil {
0 commit comments