MCPcopy
hub / github.com/rgburke/grv / OnFileSelected

Method OnFileSelected

cmd/grv/diff_view.go:401–414  ·  view source on GitHub ↗

OnFileSelected loads/fetches the diff for the selected file and refreshes the display

(statusType StatusType, filePath string)

Source from the content-addressed store, hash-verified

399
400// OnFileSelected loads/fetches the diff for the selected file and refreshes the display
401func (diffView *DiffView) OnFileSelected(statusType StatusType, filePath string) {
402 log.Debugf("DiffView loading diff for file %v", filePath)
403
404 request := &fileDiffLoadRequest{
405 statusType: statusType,
406 filePath: filePath,
407 }
408
409 diffView.lock.Lock()
410 diffView.lastRequestedDiff = request.diffID()
411 diffView.lock.Unlock()
412
413 diffView.addDiffLoadRequest(request)
414}
415
416// OnStageGroupSelected does nothing
417func (diffView *DiffView) OnStageGroupSelected(statusType StatusType) {

Callers

nothing calls this directly

Calls 4

diffIDMethod · 0.95
addDiffLoadRequestMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected