Skip to content

branch: add a --copy to go with --move

Ævar Arnfjörð Bjarmason git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 6 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3config: create a function to format section headersconfig.c+11 -20 replies
2/3branch: add test for -m renaming multiple config sectionst/t3200-branch.sh+41 -00 replies
3/3branch: add a --copy (-c) option to go with --move (-m)Documentation/git-branch.txt builtin/branch.c config.c +6 more+424 -460 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchSahil DuaÆvar Arnfjörð Bjarmason
1/3
2/3Helped-by
3/3Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] branch: add a --copy to go with --move

On Wed, Jul 05 2017, Junio C. Hamano jotted:

Quoted 11 lines

* sd/branch-copy (2017-06-18) 3 commits
- branch: add a --copy (-c) option to go with --move (-m)
- branch: add test for -m renaming multiple config sections
- config: create a function to format section headers

"git branch" learned "-c/-C" to create and switch to a new branch by copying an existing one.

Has a bit of interaction with mh/packed-ref-store and bw/config-h, so perhaps needs to wait for the former to stabilize a bit more and possibly rebasing on them.

Now that bw/config-h has landed in master here's a version that's rebased on that. No changes from v1 except:

- moving the new config header addition from cache.h to config.h, corresponding to what was done in bw/config-h.

- fixing a trivial comment whitespace issue which I see you applied locally.

Even though this modifies some of the same files as mh/packed-ref-store it looks to me like this doesn't conflict with that topic in any meaningful way, but I may be missing something. I can't get a merge between this & gitster/mh/packed-ref-store compiling, but that's due to issues in the latter which seem to be fixed by some subsequent merge/fixup in pu, not something to do with a genuine conflict with this topic.

Hopefully this'll allow this topic to land in 2.14.

Sahil Dua (2):
config: create a function to format section headers
branch: add a --copy (-c) option to go with --move (-m)

Ævar Arnfjörð Bjarmason (1):
branch: add test for -m renaming multiple config sections

 Documentation/git-branch.txt |  14 ++-
 builtin/branch.c             |  67 ++++++++---
 config.c                     | 115 +++++++++++++++----
 config.h                     |   2 +
 refs.c                       |  11 ++
 refs.h                       |   9 +-
 refs/files-backend.c         |  46 ++++++--
 refs/refs-internal.h         |   4 +
 t/t3200-branch.sh            | 256 +++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 476 insertions(+), 48 deletions(-)
Signature · 1 line
2.13.1.611.g7e3b11ae1