2017-06-02 48 views
1

我要打印的歷史在此塊第三種方法:git的日誌-L和Java方法參數

public void centerCamera(LongLat longLat, float zoom) { 
     // blah 
    } 

    public void centerCamera(LatLng latLong) { 
     // blah 
    } 

    public void centerCamera(LatLng latLng, float zoom) { 
     // blah 
    } 

我加*.java diff=java.gitattributes,這樣我可以做git log -L :centerCamera:path/to/WMMapView.java賦予的歷史第一種方法。但我想要第三個歷史記錄,那麼如何指定git log的方法參數?像bash: syntax error near unexpected tokenfatal: -L parameter 'centerCamera(LatLng,float)' starting at line 1: no match

回答

0

收到錯誤嘗試

git log -L '/public void centerCamera(LatLng latLng, float zoom)/',/^}/:path/to/WMMapView.java 
+0

感謝,這是相當接近,但我看到歷史的方式更多的方法不僅僅是一個我感興趣的(即使@liam的編輯) – Gabor