{"record":{"id":"08a765020cba4570","repo":"pcottle/learnGitBranching","slug":"msg","errorCode":null,"errorMessage":"msg","messagePattern":"msg","errorType":"exception","errorClass":"CommandResult","httpStatus":null,"severity":"info","filePath":"src/js/git/index.js","lineNumber":3117,"sourceCode":"  var lines = [];\n  if (this.getDetachedHead()) {\n    lines.push(intl.str('git-status-detached'));\n  } else {\n    var branchName = this.resolveNameNoPrefix('HEAD');\n    lines.push(intl.str('git-status-onbranch', {branch: branchName}));\n  }\n  lines.push('Changes to be committed:');\n  lines.push('');\n  lines.push(TAB + 'modified: cal/OskiCostume.stl');\n  lines.push('');\n  lines.push(intl.str('git-status-readytocommit'));\n\n  var msg = '';\n  lines.forEach(function (line) {\n    msg += '# ' + line + '\\n';\n  });\n\n  throw new CommandResult({\n    msg: msg\n  });\n};\n\nGitEngine.prototype.logWithout = function(ref, omitBranch) {\n  // slice off the ^branch\n  omitBranch = omitBranch.slice(1);\n  this.log(ref, Graph.getUpstreamSet(this, omitBranch));\n};\n\nGitEngine.prototype.revlist = function(refs) {\n  var range = new RevisionRange(this, refs);\n\n  // now go through and collect ids\n  var bigLogStr = range.formatRevisions(function(c) {\n    return c.id + '\\n';\n  });\n","sourceCodeStart":3099,"sourceCodeEnd":3135,"githubUrl":"https://github.com/pcottle/learnGitBranching/blob/5b09d0ff9678cad164f5a7488a279a44f90d7256/src/js/git/index.js#L3099-L3135","documentation":"Not a failure: the classic (graph-only levels) git status path builds playful '# ...' lines, accumulates them into msg, and returns them via a thrown CommandResult. This mirrors old git status comment-style output.","triggerScenarios":"Running git status in a level without the changes model; the lines are prefixed with '# ' and joined into msg, then thrown as the result (index.js:3112-3118).","commonSituations":"Normal usage in classic levels; expected output.","solutions":["No fix needed","Catch CommandResult to read the status text"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { engine.status(); } catch (e) { if (e instanceof CommandResult) { display(e.msg); } else throw e; }","preventionTips":["Expect '# '-prefixed lines in classic-level status output"],"tags":["git","status","command-result","output"],"backgroundTag":"command-result-output","analyzedSha":"5b09d0ff9678cad164f5a7488a279a44f90d7256","analyzedAt":"2026-08-27T13:53:49.057Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}