Skip to content

Tracking setup improvements: per-remote config, autosetuppush

Paolo Bonzini git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6config: allow false and true values for branch.autosetuprebaseDocumentation/config.txt config.c t/t3200-branch.sh+20 -110 replies
2/6branch: install_branch_config and struct tracking refactoringbranch.c branch.h builtin-clone.c+22 -190 replies
3/6introduce a struct tracking_configbranch.c builtin-branch.c builtin-checkout.c +3 more+39 -160 replies
4/6remote: add per-remote autosetupmerge and autosetuprebase configurationDocumentation/config.txt branch.c builtin-branch.c +4 more+68 -40 replies
5/6move deletion of merge configuration to branch.cbranch.c branch.h builtin-branch.c+14 -50 replies
6/6branch, checkout: introduce autosetuppushDocumentation/config.txt branch.c cache.h +3 more+100 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Tracking setup improvements: per-remote config, autosetuppush

This patch series adds two features that are a step toward providing consistent per-remote configuration of push behavior in addition to merge (tracking) behavior.

In particular, the two features are:

1) per-remote configuration of automatic tracking setup. This leads to some nice refactoring of the code handling autosetup, where the combination of autosetupmerge and autosetuprebase is consolidated in a struct.

2) The ability to automatically setup push refspecs corresponding to local branches tracking a remote. This is false by default, since we also have push.default---and actually, a generalized default of true is probably not a good idea, unlike a per-remote setting. In the future, 'git remote add' might set the per-remote autosetuppush to true if it gets some appropriate command-line argument.

Patch 1 is a somewhat tangential DWIM that I've meant to send for a while. It conflicts with this patch series, so I've included it.

Patches 2 and 3 include the refactorings in preparation for the new remote.*.autosetup configuration, which is then implemented by patch 4.

Patch 5 extracts some code to a function that will become more complicated in patch 6. Patch 6 implements autosetuppush by automatically creating and deleting push refspecs upon branch creation and deletion.

config: allow false and true values for branch.autosetuprebase
branch: install_branch_config and struct tracking refactoring introduce a struct tracking_config
remote: add per-remote autosetupmerge and autosetuprebase configuration move deletion of merge configuration to branch.c
branch, checkout: introduce autosetuppush

 Documentation/config.txt |   36 +++++++++++++++++-
 branch.c                 |   92 +++++++++++++++++++++++++++++++++++++--------
 branch.h                 |    5 ++-
 builtin-branch.c         |   10 +----
 builtin-checkout.c       |    2 +-
 builtin-clone.c          |    4 +-
 cache.h                  |   11 ++++-
 config.c                 |   48 +++++++++++++++++-------
 environment.c            |    7 ++-
 remote.c                 |    3 +
 remote.h                 |    1 +
 t/t3200-branch.sh        |   92 ++++++++++++++++++++++++++++++++++++++++++++-
 12 files changed, 259 insertions(+), 52 deletions(-)