File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 28
28
*/
29
29
class Repository
30
30
{
31
+ const DEFAULT_DESCRIPTION = "Unnamed repository; edit this file 'description' to name the repository. \n" ;
31
32
/**
32
33
* @var string
33
34
*/
@@ -346,12 +347,17 @@ public function getHooks()
346
347
public function getDescription ()
347
348
{
348
349
if (!is_file ($ this ->gitDir .'/description ' )) {
349
- return ' Unnamed repository; edit this file \' description \' to name the repository. ' ;
350
+ return static :: DEFAULT_DESCRIPTION ;
350
351
}
351
352
352
353
return file_get_contents ($ this ->gitDir .'/description ' );
353
354
}
354
355
356
+ public function hasDescription ()
357
+ {
358
+ return static ::DEFAULT_DESCRIPTION !== $ this ->getDescription ();
359
+ }
360
+
355
361
/**
356
362
* This command is a facility command. You can run any command
357
363
* directly on git repository.
You can’t perform that action at this time.
0 commit comments