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

[PATCH v3 0/2] update all per-worktree HEADs when renaming a branch

From
Kazuki Yamaguchi <k@rhe.jp>
Date
Mar 27, 2016, 14:37 UTC
Message-ID
<cover.1459087958.git.k@rhe.jp>
In-Reply-To
<1458553816-29091-1-git-send-email-k@rhe.jp>
Changes from v2:
- The flags REF_COMMON_DIR and RESOLVE_REF_COMMON_DIR are removed.
- create_symref_common_dir() is removed and instead adds narrower
  purpose function, set_worktree_head_symref().

[1/2] Adds a new function set_worktree_head_symref(). This takes git_dir as the first argument, and updates {git_dir}/HEAD.

The new function uses hold_lock_file_for_update() directly, instead of through lock_ref_sha1_basic() which the old [v2 3/5] used.

[2/2] (from [v2 4/5]) Uses the new set_worktree_head_symref(), and the update_worktrees_head_symref() function was renamed to replace_each_worktree_head_symref(), to avoid confusion with set_worktree_head_symref() added by [1/2].

Thanks,
Kazuki Yamaguchi (2):
  refs: add a new function set_worktree_head_symref
  branch -m: update all per-worktree HEADs
 branch.c             | 23 +++++++++++++++++++++++
 branch.h             |  7 +++++++
 builtin/branch.c     |  3 +--
 refs.h               |  8 ++++++++
 refs/files-backend.c | 35 +++++++++++++++++++++++++++++++++++
 t/t3200-branch.sh    | 23 ++++++++++++++++++++++-
 6 files changed, 96 insertions(+), 3 deletions(-)
-- 
2.8.0.rc4.21.g05df949
Next: Kazuki Yamaguchi
Message 1 of 8 in “update all per-worktree HEADs when renaming a branch”
  1. 0/2 update all per-worktree HEADs when renaming a branchKazuki Yamaguchi, Mar 27, 2016
  2. 1/2 refs: add a new function set_worktree_head_symrefKazuki Yamaguchi, Mar 27, 2016
  3. Junio C HamanoMar 28, 2016
  4. David TurnerMar 29, 2016
  5. Eric SunshineApr 7, 2016
  6. Kazuki YamaguchiApr 8, 2016
  7. Eric SunshineApr 8, 2016
  8. 2/2 branch -m: update all per-worktree HEADsKazuki Yamaguchi, Mar 27, 2016

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.