Merge pull request #2274 from gx1400/dev
Add git LastFetch time to debug view based on FETCH_HEAD modification…
这个提交包含在:
		
						当前提交
						a21bb4de00
					
				
					共有  1 个文件被更改,包括 8 次插入 和 0 次删除
				
			
		|  | @ -169,6 +169,8 @@ | |||
|                $commitDate = trim(exec('git log --pretty="%ci" -n1 HEAD')); | ||||
|                $line = trim(exec('git log -n 1 --pretty=%D HEAD')); | ||||
|                $pieces = explode(', ', $line); | ||||
|                $lastFetch = trim(exec('stat -c %Y .git/FETCH_HEAD')); | ||||
|                $dt = new DateTime("@$lastFetch"); | ||||
|                if (isset($pieces[1])) { | ||||
|                   $remote = substr($pieces[1], 0, strpos($pieces[1], '/')); | ||||
|                   $branch = substr($pieces[1], strpos($pieces[1], '/')+1); | ||||
|  | @ -225,6 +227,12 @@ | |||
|                             <?php } ?>
 | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>Last Fetch</td> | ||||
|                         <td> | ||||
|                               <?php echo $dt->format(\DateTime::RFC850); ?>
 | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 </table> | ||||
|                 </table> | ||||
|             </div> | ||||
|  |  | |||
		正在加载…
	
		在新工单中引用