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

[PATCH 0/2] git subtree: properly handle remote refs

From
JRJérémy Rosen <jeremy.rosen@openwide.fr>
Date
Mar 13, 2013, 16:17 UTC
Message-ID
<1363191452-28804-1-git-send-email-jeremy.rosen@openwide.fr>
One common use-case for git subtree is to use it only on taged commits from the remote project. however the current implementation of gi-subtree can not be used in that way. two orthogonal prevent this
the SHA used as the origin revision can be the SHA of a tag which isn't available locally. This works correctly at merge time but will fail at split time. The first patch uses the ^{} notation to make sure a correct commit SHA is used instead of the SHA given as a parameter
the checks for the correctness of the target ref to pull or add checks that the name matches a local ref (which is incorrect). The second patch use ls-remote to validate the ref name given against the ones in the remote repository
Jérémy Rosen (2):
  git-subtree: make sure the SHA saved as ancestor is a commit
  git-subtree: use ls-remote to check the refspec passed to pull and
    add
 contrib/subtree/git-subtree.sh |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
-- 
1.7.10.4
Next: Jérémy Rosen
Message 1 of 3 in “git subtree: properly handle remote refs”
  1. 0/2 git subtree: properly handle remote refsJérémy Rosen, Mar 13, 2013
  2. 1/2 git-subtree: make sure the SHA saved as ancestor is a commitJérémy Rosen, Mar 13, 2013
  3. 2/2 git-subtree: use ls-remote to check the refspec passed to pull and addJérémy Rosen, Mar 13, 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.