summaryrefslogtreecommitdiffstats
path: root/shunit/shunit2_test_helpers
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-05-06 03:31:13 -0400
committerMatt Hunter <m@lfurio.us>2026-05-08 03:53:48 -0400
commitc336acfc57bd408dcb93379a171270612c3f1cd3 (patch)
tree07c393c2e25f02a3c2c1ad2bc252c41a669427f8 /shunit/shunit2_test_helpers
parent5f7de1d0b89d9d5cc6f437061a62e38721077667 (diff)
downloadgit-sonar-c336acfc57bd408dcb93379a171270612c3f1cd3.tar.gz
git-sonar-c336acfc57bd408dcb93379a171270612c3f1cd3.zip
Revert status output to a single prompt element
Output for changes staged/unstaged/unmerged/untracked are combined to a single prompt element %{status}, like it was prior to the recent rewrite (though it used to be called 'changes'). The main reason for this is to address script performance. The sed calls in prepare_element start to add up, and having fewer of them helps improve runtimes. The ability to customize the prompt via a flexible format string is a really nice feature that I'd like to keep, so I'm reducing the number of substitutable elements in an effort to balance performance. Reverting this specific change is one of the easier decisions to make in that regard. Furthermore, the actual element_status implementation is updated to rely on fewer external calls, additionally aiding performance. Now that the output is controlled by a single element, the arrangement of the different change stages is no longer fine-tunable via the prompt format string. A fixed order is produced: staged, unmerged, unstaged, untracked - exactly as it was before the recent rewrite. Within the output, these stages are separated by a "status separator" string (as before), however this separator is now exposed to the user as a configurable environment variable. Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions