git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] git subtree: properly handle remote refs
@ 2013-03-13 16:17 Jérémy Rosen
  2013-03-13 16:17 ` [PATCH 1/2] git-subtree: make sure the SHA saved as ancestor is a commit Jérémy Rosen
  2013-03-13 16:17 ` [PATCH 2/2] git-subtree: use ls-remote to check the refspec passed to pull and add Jérémy Rosen
  0 siblings, 2 replies; 3+ messages in thread
From: Jérémy Rosen @ 2013-03-13 16:17 UTC (permalink / raw)
  To: git; +Cc: greened, pcampbell, gitster, Jérémy Rosen

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-13 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 16:17 [PATCH 0/2] git subtree: properly handle remote refs Jérémy Rosen
2013-03-13 16:17 ` [PATCH 1/2] git-subtree: make sure the SHA saved as ancestor is a commit Jérémy Rosen
2013-03-13 16:17 ` [PATCH 2/2] git-subtree: use ls-remote to check the refspec passed to pull and add Jérémy Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).