File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ func (repo *Repository) CommitsByFileAndRange(opts CommitsByFileAndRangeOptions)
245245 gitCmd = NewCommand ("rev-list" )
246246 } else {
247247 gitCmd = NewCommand ("--no-pager" , "log" ).
248- AddOptionFormat ("--pretty=format :%%H" ).
248+ AddOptionFormat ("--pretty=tformat :%%H" ).
249249 AddOptionFormat ("--follow" )
250250 }
251251 gitCmd .AddOptionFormat ("--max-count=%d" , setting .Git .CommitsRangeSize ).
@@ -270,7 +270,7 @@ func (repo *Repository) CommitsByFileAndRange(opts CommitsByFileAndRangeOptions)
270270 Stderr : & stderr ,
271271 })
272272
273- if err != nil && ! ( opts . FollowRename && err == io . ErrUnexpectedEOF ) {
273+ if err != nil {
274274 _ = stdoutWriter .CloseWithError (ConcatenateError (err , (& stderr ).String ()))
275275 } else {
276276 _ = stdoutWriter .Close ()
@@ -287,7 +287,7 @@ func (repo *Repository) CommitsByFileAndRange(opts CommitsByFileAndRangeOptions)
287287 shaline := make ([]byte , length + 1 )
288288 for {
289289 n , err := io .ReadFull (stdoutReader , shaline )
290- if ( err != nil && ! ( opts . FollowRename && err == io . ErrUnexpectedEOF )) || n < length {
290+ if err != nil || n < length {
291291 if err == io .EOF {
292292 err = nil
293293 }
You can’t perform that action at this time.
0 commit comments