All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Boeckel <mathstuf@gmail.com>
To: git@vger.kernel.org
Cc: "Ben Boeckel" <mathstuf@gmail.com>,
	"Martin Ågren" <martin.agren@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Jeff Hostetler" <jeffhost@microsoft.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Taylor Blau" <me@ttaylorr.com>
Subject: [PATCH 0/1] Improve automatic setup of tracking for new branches
Date: Wed, 28 Jul 2021 22:01:24 -0400	[thread overview]
Message-ID: <20210729020125.746206-1-mathstuf@gmail.com> (raw)
In-Reply-To: <20210728135041.501850-1-mathstuf@gmail.com>

Hi,

I recently discovered some of the nicer behaviors of the `--track`
option for local branches (courtesy of `vim-fugitive`'s status
rendering). However, after a few weeks of slowly working `-t
origin/master` into my workflow, I figured that Git could help me out
here.

This patch adds two new configuration variables to initialize the
`branch.<name>.*` settings for tracking remote branches.

I searched the docs (including `Documentation/gitworkflows.txt`), but
didn't see anywhere to describe the fork-based workflow common on forges
(such as GitHub and GitLab) where this felt "at home". I suppose I could
describe the workflow I'm used to, but I think I'll hammer that out as
blog posts before submitting it as documentation.

I suspect there are more tests that should be added.

Thanks,

--Ben

---
v1 -> v2:
  - removed `branch.defaultPushRemote` (`remote.pushDefault` covers this
    case already)
  - improved the commit message with more background and an expanation
    of the intended uses

Ben Boeckel (1):
  config: support a default remote tracking setup upon branch creation

 Documentation/config/branch.txt | 14 ++++++++++++
 branch.c                        | 22 ++++++++++---------
 branch.h                        |  2 ++
 config.c                        | 10 +++++++++
 environment.c                   |  2 ++
 t/t3200-branch.sh               | 39 +++++++++++++++++++++++++++++++++
 6 files changed, 79 insertions(+), 10 deletions(-)


base-commit: eb27b338a3e71c7c4079fbac8aeae3f8fbb5c687
-- 
2.31.1


  parent reply	other threads:[~2021-07-29  2:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 13:50 [PATCH 0/1] Improve automatic setup of tracking for new branches Ben Boeckel
2021-07-28 13:50 ` [PATCH 1/1] config: support setting up a remote tracking branch upon creation Ben Boeckel
2021-07-28 17:48   ` Junio C Hamano
2021-07-28 18:26     ` Ben Boeckel
2021-07-28 18:39       ` Junio C Hamano
2021-07-29  2:01 ` Ben Boeckel [this message]
2021-07-29  2:01   ` [PATCH 1/1] config: support a default remote tracking setup upon branch creation Ben Boeckel
2021-07-30 13:35     ` Philippe Blain
2021-07-30 14:07       ` Ben Boeckel
2021-07-30 17:32       ` Junio C Hamano
2021-08-02 13:02     ` Ævar Arnfjörð Bjarmason
2021-08-02 13:16       ` Ben Boeckel
2021-08-02 15:20         ` Ævar Arnfjörð Bjarmason
2021-07-30  1:04   ` [PATCH 0/1] Improve automatic setup of tracking for new branches Junio C Hamano
2021-07-30  1:33     ` Ben Boeckel
2021-07-30 13:35   ` Philippe Blain
2021-07-30 13:57     ` Ben Boeckel
2021-07-30 16:01       ` Philippe Blain
2021-07-30 17:45         ` Ben Boeckel
2021-08-02 21:17         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210729020125.746206-1-mathstuf@gmail.com \
    --to=mathstuf@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.com \
    --cc=martin.agren@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.