git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 5, 2017, 23:14 UTC
Message-ID
<20170705231454.15666-1-avarab@gmail.com>
In-Reply-To
<xmqqeftuh5q7.fsf@gitster.mtv.corp.google.com>
On Wed, Jul 05 2017, Junio C. Hamano jotted:
Show 11 quoted 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(-)
-- 
2.13.1.611.g7e3b11ae1
Previous: Stefan BellerNext: Ævar Arnfjörð Bjarmason
Message 5 of 14 in “What's cooking in git.git (Jul 2017, #01; Wed, 5)”
  1. Junio C HamanoJul 5, 2017
  2. Stefan BellerJul 5, 2017
  3. Junio C HamanoJul 7, 2017
  4. Stefan BellerJul 10, 2017
  5. 0/3 branch: add a --copy to go with --moveÆvar Arnfjörð Bjarmason, Jul 5, 2017
  6. 1/3 config: create a function to format section headersÆvar Arnfjörð Bjarmason, Jul 5, 2017
  7. 2/3 branch: add test for -m renaming multiple config sectionsÆvar Arnfjörð Bjarmason, Jul 5, 2017
  8. 3/3 branch: add a --copy (-c) option to go with --move (-m)Ævar Arnfjörð Bjarmason, Jul 5, 2017
  9. Junio C HamanoJul 6, 2017
  10. 4/3 branch: fix "copy" to never touch HEADJunio C Hamano, Sep 22, 2017
  11. Brandon WilliamsSep 22, 2017
  12. Ævar Arnfjörð BjarmasonSep 26, 2017
  13. Junio C HamanoSep 27, 2017
  14. Ævar Arnfjörð BjarmasonSep 29, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.