Re: [DOCBUG] git subtree synopsis needs updating

2013-01-18 Thread Techlive Zheng
On 12-10-20, Herman van Rink wrote:
> On 10/19/2012 03:21 PM, Yann Dirson wrote:
> > As the examples in git-subtree.txt show, the synopsis in the same file 
> > should
> > surely get a patch along the lines of:
> >
> > -'git subtree' add   -P  
> > +'git subtree' add   -P   
> >
> > Failure to specify the repository (by just specifying a local commit) fails 
> > with
> > the cryptic:
> >
> >  warning: read-tree: emptying the index with no arguments is deprecated; 
> > use --empty
> >  fatal: just how do you expect me to merge 0 trees?
> >
> >
> > Furthermore, the doc paragraph for add, aside from mentionning 
> > , also
> > mentions a  which the synopsis does not show either.
> >
> >
> > As a sidenote it someone wants to do some maintainance, using "." as 
> > repository when
> > the branch to subtree-add is already locally available does not work well 
> > either
> > (fails with "could not find ref myremote/myhead").
> >
> 
> The version of subtree in contrib is rather out-dated unfortunately.
You should really submit these patches here for reviewing, David is
actively maintaining this tool here.
> 
> I've collected a bunch of patches in
> https://github.com/helmo/git/tree/subtree-updates
> 
> The documentation issue is also fixed in there.
> 
> -- 
> 
> Met vriendelijke groet / Regards,
> 
> Herman van Rink
> Initfour websolutions
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [DOCBUG] git subtree synopsis needs updating

2013-01-18 Thread Yann Dirson
On Mon, 31 Dec 2012 20:51:41 -0600
gree...@obbligato.org wrote:

> Yann Dirson  writes:
> 
> > As the examples in git-subtree.txt show, the synopsis in the same file 
> > should
> > surely get a patch along the lines of:
> >
> > -'git subtree' add   -P  
> > +'git subtree' add   -P   
> >
> > Failure to specify the repository (by just specifying a local commit) fails 
> > with
> > the cryptic:
> >
> >  warning: read-tree: emptying the index with no arguments is deprecated; 
> > use --empty
> >  fatal: just how do you expect me to merge 0 trees?
> 
> Specifying a local branch works fine, though, as does a raw commit
> hash.  What do you mean by "local commit?"

With no  arg documented, my understanding was that I should first 
"git remote add" and fetch the repo in which the branch to be added as subtree
lived.  This when running "git subtree add", the commit was indeed existing
locally.

> > As a sidenote it someone wants to do some maintainance, using "." as 
> > repository when
> > the branch to subtree-add is already locally available does not work well 
> > either
> > (fails with "could not find ref myremote/myhead").
> 
> Seems to work for me.  Can you give me the command you're using when you
> see the problem?

Hm, can't remember exactly how I reached that.  But when experimenting to
reproduce:

$ contrib/subtree/git-subtree.sh add -P foo . origin/maint
git fetch . origin/maint
>From .
 * remote-tracking branch origin/maint -> FETCH_HEAD
Added dir 'foo'

=> OK

$ contrib/subtree/git-subtree.sh add -P fooo . origin/maint^0
git fetch . origin/maint^0
fatal: Invalid refspec 'origin/maint^0'

=> a commit is advertised, but in fact it seems to require a refspec

-- 
Yann Dirson - Bertin Technologies
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [DOCBUG] git subtree synopsis needs updating

2012-12-31 Thread greened
Yann Dirson  writes:

> As the examples in git-subtree.txt show, the synopsis in the same file should
> surely get a patch along the lines of:
>
> -'git subtree' add   -P  
> +'git subtree' add   -P   
>
> Failure to specify the repository (by just specifying a local commit) fails 
> with
> the cryptic:
>
>  warning: read-tree: emptying the index with no arguments is deprecated; use 
> --empty
>  fatal: just how do you expect me to merge 0 trees?

Specifying a local branch works fine, though, as does a raw commit
hash.  What do you mean by "local commit?"

I have updated the documentation and will submit it tonight or tomorrow.

Any invalid refspec should be caught early and a more useful message
will be displayed.

> Furthermore, the doc paragraph for add, aside from mentionning , 
> also
> mentions a  which the synopsis does not show either.

Fixed.

> As a sidenote it someone wants to do some maintainance, using "." as 
> repository when
> the branch to subtree-add is already locally available does not work well 
> either
> (fails with "could not find ref myremote/myhead").

Seems to work for me.  Can you give me the command you're using when you
see the problem?

Thanks for the report!

  -David
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [DOCBUG] git subtree synopsis needs updating

2012-12-31 Thread greened
Yann Dirson  writes:

> Ah, it's nice to see subtree updates.  Any plans to get them merged anytime 
> soon ?

As soon as there is one patch per feature that applies cleanly to
contrib/ and testcases use the native git test facility.

These patches should be submitted to the mailing list for review.

-David

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [DOCBUG] git subtree synopsis needs updating

2012-10-24 Thread Yann Dirson
On Sat, 20 Oct 2012 21:40:03 +0200
Herman van Rink  wrote:

> On 10/19/2012 03:21 PM, Yann Dirson wrote:
> > As the examples in git-subtree.txt show, the synopsis in the same file 
> > should
> > surely get a patch along the lines of:
> >
> > -'git subtree' add   -P  
> > +'git subtree' add   -P   
> >
> > Failure to specify the repository (by just specifying a local commit) fails 
> > with
> > the cryptic:
> >
> >  warning: read-tree: emptying the index with no arguments is deprecated; 
> > use --empty
> >  fatal: just how do you expect me to merge 0 trees?
> >
> >
> > Furthermore, the doc paragraph for add, aside from mentionning 
> > , also
> > mentions a  which the synopsis does not show either.
> >
> >
> > As a sidenote it someone wants to do some maintainance, using "." as 
> > repository when
> > the branch to subtree-add is already locally available does not work well 
> > either
> > (fails with "could not find ref myremote/myhead").
> >
> 
> The version of subtree in contrib is rather out-dated unfortunately.
> 
> I've collected a bunch of patches in
> https://github.com/helmo/git/tree/subtree-updates

Ah, it's nice to see subtree updates.  Any plans to get them merged anytime 
soon ?

I guess you may want to rebase the patches from 
https://github.com/helmo/git-subtree,
the subtree-updates patch looks like a "subtree merge --squash" result, and is 
not really
suitable for reviewing on the list.

> The documentation issue is also fixed in there.
> 


-- 
Yann Dirson - Bertin Technologies
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [DOCBUG] git subtree synopsis needs updating

2012-10-20 Thread Herman van Rink
On 10/19/2012 03:21 PM, Yann Dirson wrote:
> As the examples in git-subtree.txt show, the synopsis in the same file should
> surely get a patch along the lines of:
>
> -'git subtree' add   -P  
> +'git subtree' add   -P   
>
> Failure to specify the repository (by just specifying a local commit) fails 
> with
> the cryptic:
>
>  warning: read-tree: emptying the index with no arguments is deprecated; use 
> --empty
>  fatal: just how do you expect me to merge 0 trees?
>
>
> Furthermore, the doc paragraph for add, aside from mentionning , 
> also
> mentions a  which the synopsis does not show either.
>
>
> As a sidenote it someone wants to do some maintainance, using "." as 
> repository when
> the branch to subtree-add is already locally available does not work well 
> either
> (fails with "could not find ref myremote/myhead").
>

The version of subtree in contrib is rather out-dated unfortunately.

I've collected a bunch of patches in
https://github.com/helmo/git/tree/subtree-updates

The documentation issue is also fixed in there.

-- 

Met vriendelijke groet / Regards,

Herman van Rink
Initfour websolutions

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html