{"record":{"id":"460796a698796bae","repo":"pcottle/learnGitBranching","slug":"dynamic-describe-output-foundtag-n-g-id","errorCode":null,"errorMessage":"<dynamic describe output: foundTag-N-g<id>>","messagePattern":"<dynamic describe output: foundTag-N-g<id>>","errorType":"validation","errorClass":"CommandResult","httpStatus":null,"severity":"info","filePath":"src/js/git/index.js","lineNumber":2806,"sourceCode":"      pQueue = pQueue.concat(parents);\n      pQueue.sort(this.dateSortFunc);\n    }\n  }\n\n  if (!foundTag) {\n    throw new GitError({\n      msg: intl.todo('Fatal: no tags found upstream')\n    });\n  }\n\n  if (numAway.length === 0) {\n    throw new CommandResult({\n      msg: foundTag\n    });\n  }\n\n  // then join\n  throw new CommandResult({\n    msg: foundTag + '-' + numAway.length + '-g' + startCommit.get('id')\n  });\n};\n\nGitEngine.prototype.renameBranch = function(oldName, newName, force) {\n  var target = this.resolveID(oldName);\n\n  if (!target || target.get('type') !== 'branch') {\n    throw new GitError({\n      msg: intl.todo('fatal: not a branch: ' + oldName)\n    });\n  }\n\n  if (target.getIsRemote()) {\n    throw new GitError({\n      msg: intl.str('git-error-remote-branch')\n    });\n  }","sourceCodeStart":2788,"sourceCodeEnd":2824,"githubUrl":"https://github.com/pcottle/learnGitBranching/blob/5b09d0ff9678cad164f5a7488a279a44f90d7256/src/js/git/index.js#L2788-L2824","documentation":"Not a real failure: this is the successful describe output when the commit is N commits ahead of the nearest tag, formatted as foundTag-N-g<abbrev-id> (matching git's describe format). It is delivered by throwing a CommandResult.","triggerScenarios":"Running describe on a commit that is 1+ commits downstream of the nearest tag; numAway.length supplies N and the commit id supplies the g<id> suffix.","commonSituations":"Normal git describe usage after tagging an earlier commit; expected output.","solutions":["No fix needed — informational output","Parse the tag-N-gid format if you need the tag name and distance programmatically"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { engine.describe(ref); } catch (e) { if (e instanceof CommandResult) { var m = e.msg.match(/^(.*)-(\\d+)-g([0-9a-f]+)$/); if (m) { /* tag, distance, sha */ } } else throw e; }","preventionTips":["Parse the tag-N-gid format when you need structured describe data"],"tags":["git","describe","command-result","output-format"],"backgroundTag":"command-result-output","analyzedSha":"5b09d0ff9678cad164f5a7488a279a44f90d7256","analyzedAt":"2026-08-27T13:53:49.057Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}