Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Drew Crawford d...@drewcrawfordapps.com writes: I noticed today that if you leave off the branch name from git subtree like so: $ git subtree add --prefix somewhere -m adding CDH as subtree path/to/repo warning: read-tree: emptying the index with no arguments is deprecated; use --empty

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Drew Crawford d...@drewcrawfordapps.com writes: Ideally it would be better to emit an error-message from a script higher up the calling chain that would be more descriptive about the problem (such as suggesting no branch is specified).-- I'm looking at implementing this but I need a bit of

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Drew Crawford d...@drewcrawfordapps.com writes: Ideally it would be better to emit an error-message from a script higher up the calling chain that would be more descriptive about the problem (such as suggesting no branch is specified).-- Ok, I used git rev-parse --verify and I have this

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread Junio C Hamano
gree...@obbligato.org writes: git-subtree add accepts either a refspec or a path to a repository and a refspec. With one positional option, git-subtree add simply assumes it's a refspec. Is there an easy way to check whether a string is a proper refspec? Even better would be a way to

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Junio C Hamano gits...@pobox.com writes: With one positional option, git-subtree add simply assumes it's a refspec. Is there an easy way to check whether a string is a proper refspec? Even better would be a way to check if a string is a path to a git repository. Do you literally mean a

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread Junio C Hamano
gree...@obbligato.org writes: Junio C Hamano gits...@pobox.com writes: With one positional option, git-subtree add simply assumes it's a refspec. Is there an easy way to check whether a string is a proper refspec? Even better would be a way to check if a string is a path to a git