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

[PATCH 0/19] git-subtree updates

From
Paul Campbell <pcampbell@kemitix.net>
Date
Mar 9, 2013, 19:19 UTC
Message-ID
<CALeLG_=2WO6jgCbEmF33RCHGpXJnX0dE0Rt==6CX+-7RttALHQ@mail.gmail.com>

The following set of commits are taken from the collection collated by Herman van Rink and offered to the list in May of last year ($gmane/196667).

Where updating a commit to resolve a conflict has cleared the original author of the commit I've noted the original author in the commit message. Thus I've left the From lines in the format-patch output as none of the work here is mine and I don't want to assume another's credit.

I have tried to leave the commit's in a state as close to their original, with only enough modification to allow them to be applied to the current HEAD of master.

The git-subtree tests work (make test), but they don't cover any of the new commands added nor the use of the .gittrees file for storing the subtree metadata.

They provide the following:
In git-subtree.sh:
* OPTS_SPEC
  * pull/push: options for repository and refspec are both optional,
[<repository> [<refspec>]]
  * new sub-command: pull-all
  * new sub-command: push-all
  * new sub-command: list
  * new sub-command: from-submodule
  * new sub-command: prune
  * new sub-command: diff
  * new option for push: --force
* Trailing slash on prefix is removed
* Stores subtree metadata in .gittrees as:
  [subtree "$dir"]
    url = $repository
    path = $dir
    branch = $refspec
* Replaces a non-visible carriage return character with a properly escaped one
* pull and push: reads options from .gitrees if not provided on the command line
* Implementation of diff
  Fetches remote repo as a temporary git-remote then uses
git-diff-tree to compare before removing the temporary git-remote
* Implementation of list as plain wrapper to new functions subtree_list
  Iterates over subtrees listed in .gittrees and prints out their details
* Implementation of from-submodule
  Converts a git-submodule into a git-subtree
* Implementation of prune
  Removes entries from .gittrees where the $dir is missing
* Implementation of pull-all
  Performs a git-subtree pull for each subtree
* Implementation of push-all
  Performs a git-subtree push for each subtree
In git-subtree.txt:
* Adds brief descriptions for commands:
  * pull-all
  * push-all
  * list
  * from-submodule
  * prune
  * diff ("TO BE DOCUMENTED")
* Notes optional -f|--force for push sub-command
* fixes a typo in text for Example 1 (s/incldued/included/)
-- 
Paul [W] Campbell
Message 1 of 1 in “git-subtree updates”
  1. 0/19 git-subtree updatesPaul Campbell, Mar 9, 2013

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.