File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -57,21 +57,22 @@ public virtual BuiltInFeatures Features
5757 /// </summary>
5858 public virtual string LibGit2CommitSha
5959 {
60- get
61- {
62- return ReadContentFromResource ( assembly , "libgit2_hash.txt" ) . Substring ( 0 , 7 ) ;
63- }
60+ get { return RetrieveAbbrevShaFrom ( "libgit2_hash.txt" ) ; }
6461 }
6562
6663 /// <summary>
6764 /// Returns the SHA hash for the LibGit2Sharp library.
6865 /// </summary>
6966 public virtual string LibGit2SharpCommitSha
7067 {
71- get
72- {
73- return ReadContentFromResource ( assembly , "libgit2sharp_hash.txt" ) . Substring ( 0 , 7 ) ;
74- }
68+ get { return RetrieveAbbrevShaFrom ( "libgit2sharp_hash.txt" ) ; }
69+ }
70+
71+ private string RetrieveAbbrevShaFrom ( string name )
72+ {
73+ string sha = ReadContentFromResource ( assembly , name ) ?? "unknown" ;
74+
75+ return sha . Substring ( 0 , 7 ) ;
7576 }
7677
7778 /// <summary>
You can’t perform that action at this time.
0 commit comments