mirror of
https://github.com/MichMich/MagicMirror.git
synced 2026-05-06 04:43:32 +00:00
The regex captured the full fetch output line including the branch name. Before #4115, the command was built as a shell string, so the shell split the arguments correctly. After #4115 switched to `execFile`, the range and branch name were passed as a single argument (`60e0377..332e429 develop`) - which git rejects as ambiguous. The fix replaces the regex with column-based line parsing: find the line for the current branch, take the first column. Falls back to `<branch>..origin/<branch>` when fetch reports no changes (same behavior as before). Also adds unit tests for the new helper and corrects existing test snapshots that encoded the broken behavior. Fixes #4137.