File tree 1 file changed +16
-1
lines changed
components/ws-daemon/pkg/internal/session
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -248,8 +248,23 @@ func (s *Workspace) SetGitStatus(status *csapi.GitStatus) error {
248
248
249
249
// UpdateGitStatus attempts to update the LastGitStatus from the workspace's local working copy.
250
250
func (s * Workspace ) UpdateGitStatus (ctx context.Context ) (res * csapi.GitStatus , err error ) {
251
- loc := filepath .Join (s .Location , s .CheckoutLocation )
251
+ loc := s .Location
252
+ if loc == "" {
253
+ // FWB workspaces don't have `Location` set, but rather ServiceLocDaemon and ServiceLocNode.
254
+ // We'd can't easily produce the Git status, because in this context `mark` isn't mounted, and `upper`
255
+ // only contains the full git working copy if the content was just initialised.
256
+ // Something like
257
+ // loc = filepath.Join(s.ServiceLocDaemon, "mark", "workspace")
258
+ // does not work.
259
+ //
260
+ // TODO(cw): figure out a way to get ahold of the Git status.
261
+ log .WithField ("loc" , loc ).WithFields (s .OWI ()).Debug ("not updating Git status of FWB workspace" )
262
+ return
263
+ }
264
+
265
+ loc = filepath .Join (loc , s .CheckoutLocation )
252
266
if ! git .IsWorkingCopy (loc ) {
267
+ log .WithField ("loc" , loc ).WithFields (s .OWI ()).Debug ("did not find a Git working copy - not updating Git status" )
253
268
return nil , nil
254
269
}
255
270
You can’t perform that action at this time.
0 commit comments