git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] checkout: introduce "--to-branch" option
@ 2021-12-10  6:22 ZheNing Hu via GitGitGadget
  2021-12-10  6:22 ` [PATCH 1/2] checkout: handling branch_info memory leak ZheNing Hu via GitGitGadget
  2021-12-10  6:22 ` [PATCH 2/2] checkout: introduce "--to-branch" option ZheNing Hu via GitGitGadget
  0 siblings, 2 replies; 16+ messages in thread
From: ZheNing Hu via GitGitGadget @ 2021-12-10  6:22 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Christian Couder, Hariom Verma, brian m. carlson,
	Nguyễn Thái Ngọc Duy,
	Ævar Arnfjörð Bjarmason, Eric Sunshine,
	ZheNing Hu

Sometimes people expect to checkout to a commit (or a commit which tag
reference to) and develop on its corresponding branch. This may take some
steps:

$ git checkout v1.1
$ git log  # search for the branch dev1
$ git checkout dev1


collapse the above steps into one step:

$ git checkout --to-branch v1.1
Switched to branch 'refs/heads/dev1'


This will help users switch to the unqiue branch quickly.

Thanks.

ZheNing Hu (2):
  checkout: handling branch_info memory leak
  checkout: introduce "--to-branch" option

 Documentation/git-checkout.txt |  8 +++-
 builtin/checkout.c             | 49 +++++++++++++++++++-
 t/t2018-checkout-branch.sh     | 85 ++++++++++++++++++++++++++++++++++
 t/t9902-completion.sh          |  1 +
 4 files changed, 140 insertions(+), 3 deletions(-)


base-commit: abe6bb3905392d5eb6b01fa6e54d7e784e0522aa
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1095%2Fadlternative%2Fcheckout-w-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1095/adlternative/checkout-w-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1095
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-12-13 21:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10  6:22 [PATCH 0/2] checkout: introduce "--to-branch" option ZheNing Hu via GitGitGadget
2021-12-10  6:22 ` [PATCH 1/2] checkout: handling branch_info memory leak ZheNing Hu via GitGitGadget
2021-12-10  7:13   ` Ævar Arnfjörð Bjarmason
2021-12-10  6:22 ` [PATCH 2/2] checkout: introduce "--to-branch" option ZheNing Hu via GitGitGadget
2021-12-10  8:34   ` Christian Couder
2021-12-11  6:34     ` ZheNing Hu
2021-12-10  8:59   ` Ævar Arnfjörð Bjarmason
2021-12-11  7:11     ` ZheNing Hu
2021-12-10 11:51   ` Bagas Sanjaya
2021-12-11  7:12     ` ZheNing Hu
2021-12-10 22:14   ` Junio C Hamano
2021-12-11  7:51     ` ZheNing Hu
2021-12-12 18:46       ` Junio C Hamano
2021-12-13 19:55         ` Ævar Arnfjörð Bjarmason
2021-12-13 21:36           ` Junio C Hamano
2021-12-13 21:52             ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).