- file_put_contents(
- $new->gitDir . '/description',
- 'Fork of ' . $originalUrl
- );
+
+ $new->getVc()
+ ->getCommand('config')
+ ->addArgument('remote.origin.title')
+ ->addArgument($title)
+ ->execute();
+ if ($originalUrl != $cloneUrl) {
+ $new->getVc()
+ ->getCommand('config')
+ ->addArgument('remote.origin.homepage')
+ ->addArgument($originalUrl)
+ ->execute();
+ }
+
+ if ($title === null) {
+ $title = 'Fork of ' . $originalUrl;
+ }
+ file_put_contents($new->gitDir . '/description', $title);
+