pcottle/learnGitBranching · info · CommandResult
<dynamic describe output: foundTag>
Error message
<dynamic describe output: foundTag>
What it means
Not a real failure: describe returns its result by throwing a CommandResult whose msg is exactly the nearest tag name (foundTag). This is the framework's control-flow mechanism for producing command output, used when the target commit is itself tagged (numAway is empty).
Source
Thrown at src/js/git/index.js:2800
}
// ok keep going
numAway.push(popped.get('id'));
var parents = popped.get('parents');
if (parents && parents.length) {
pQueue = pQueue.concat(parents);
pQueue.sort(this.dateSortFunc);
}
}
if (!foundTag) {
throw new GitError({
msg: intl.todo('Fatal: no tags found upstream')
});
}
if (numAway.length === 0) {
throw new CommandResult({
msg: foundTag
});
}
// then join
throw new CommandResult({
msg: foundTag + '-' + numAway.length + '-g' + startCommit.get('id')
});
};
GitEngine.prototype.renameBranch = function(oldName, newName, force) {
var target = this.resolveID(oldName);
if (!target || target.get('type') !== 'branch') {
throw new GitError({
msg: intl.todo('fatal: not a branch: ' + oldName)
});
}View on GitHub (pinned to 5b09d0ff96)
Solutions
- No fix needed — this is the successful describe output
- Catch CommandResult (not GitError) in calling code to read the message
Defensive patterns
Strategy: try-catch
Try / catch
try { engine.describe(ref); } catch (e) { if (e instanceof CommandResult) { display(e.msg); } else throw e; } Prevention
- Treat CommandResult as output, not failure
- Catch CommandResult separately from GitError
When it happens
Trigger: Running describe on a commit that has a tag directly on it — the walk finds the tag immediately and there are zero commits between, so output is just the tag name.
Common situations: Any git describe on a tagged commit; expected, informational output.
Related errors
- <dynamic describe output: foundTag-N-g<id>>
- commit.getShowEntry()
- fatal: No tags found, cannot describe anything.
- <dynamic branch listing>
- <dynamic tag listing>
AI-assisted analysis of pcottle/learnGitBranching@5b09d0ff96 (2026-08-27).
Data as JSON: /api/errors/9a8ecc428cc145ba.
Report an issue: GitHub.