diff options
| author | Harald Nordgren <haraldnordgren@gmail.com> | 2026-02-26 10:33:42 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-26 07:25:48 -0800 |
| commit | 3ea95ac9c5a8ac60702b157153498453afe7ab3b (patch) | |
| tree | 354f55d0ac0393cf8e05de661b55ffc1cbbddd9b /range-diff.c | |
| parent | 04f47265c1cfb8dce2287b5fb36ddfaa86a2ac61 (diff) | |
| download | git-3ea95ac9c5a8ac60702b157153498453afe7ab3b.tar.xz | |
status: add status.compareBranches config for multiple branch comparisons
Add a new configuration variable status.compareBranches that allows
users to specify a space-separated list of branch comparisons in
git status output.
Supported values:
- @{upstream} for the current branch's upstream tracking branch
- @{push} for the current branch's push destination
Any other value is ignored and a warning is shown.
When not configured, the default behavior is equivalent to setting
`status.compareBranches = @{upstream}`, preserving backward
compatibility.
The advice messages shown are context-aware:
- "git pull" advice is shown only when comparing against @{upstream}
- "git push" advice is shown only when comparing against @{push}
- Divergence advice is shown for upstream branch comparisons
This is useful for triangular workflows where the upstream tracking
branch differs from the push destination, allowing users to see their
status relative to both branches at once.
Example configuration:
[status]
compareBranches = @{upstream} @{push}
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'range-diff.c')
0 files changed, 0 insertions, 0 deletions
