File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,12 @@ public function log($format = null) {
640640 * @param string $new
641641 */
642642 public function set_description ($ new ) {
643- file_put_contents ($ this ->repo_path ."/.git/description " , $ new );
643+ if ($ this ->bare ) {
644+ $ path = $ this ->repo_path ;
645+ } else {
646+ $ path = $ this ->repo_path ."/.git " ;
647+ }
648+ file_put_contents ($ path ."/description " , $ new );
644649 }
645650
646651 /**
@@ -649,7 +654,12 @@ public function set_description($new) {
649654 * @return string
650655 */
651656 public function get_description () {
652- return file_get_contents ($ this ->repo_path ."/.git/description " );
657+ if ($ this ->bare ) {
658+ $ path = $ this ->repo_path ;
659+ } else {
660+ $ path = $ this ->repo_path ."/.git " ;
661+ }
662+ return file_get_contents ($ path ."/description " );
653663 }
654664
655665 /**
You can’t perform that action at this time.
0 commit comments