git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [DOCBUG] git subtree synopsis needs updating
@ 2012-10-19 13:21 Yann Dirson
  2012-10-20 19:40 ` Herman van Rink
  2013-01-01  2:51 ` greened
  0 siblings, 2 replies; 7+ messages in thread
From: Yann Dirson @ 2012-10-19 13:21 UTC (permalink / raw)
  To: git list


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 <prefix> <commit>
+'git subtree' add   -P <prefix> <repository> <commit>

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 <repository>, also
mentions a <refspec> 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").

-- 
Yann Dirson - Bertin Technologies

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

* Re: [DOCBUG] git subtree synopsis needs updating
  2012-10-19 13:21 [DOCBUG] git subtree synopsis needs updating Yann Dirson
@ 2012-10-20 19:40 ` Herman van Rink
  2012-10-24 14:29   ` Yann Dirson
  2013-01-19  5:48   ` Techlive Zheng
  2013-01-01  2:51 ` greened
  1 sibling, 2 replies; 7+ messages in thread
From: Herman van Rink @ 2012-10-20 19:40 UTC (permalink / raw)
  To: Yann Dirson; +Cc: git list

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 <prefix> <commit>
> +'git subtree' add   -P <prefix> <repository> <commit>
>
> 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 <repository>, also
> mentions a <refspec> 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

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

* Re: [DOCBUG] git subtree synopsis needs updating
  2012-10-20 19:40 ` Herman van Rink
@ 2012-10-24 14:29   ` Yann Dirson
  2013-01-01  1:47     ` greened
  2013-01-19  5:48   ` Techlive Zheng
  1 sibling, 1 reply; 7+ messages in thread
From: Yann Dirson @ 2012-10-24 14:29 UTC (permalink / raw)
  To: Herman van Rink; +Cc: git list

On Sat, 20 Oct 2012 21:40:03 +0200
Herman van Rink <rink@initfour.nl> 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 <prefix> <commit>
> > +'git subtree' add   -P <prefix> <repository> <commit>
> >
> > 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 <repository>, also
> > mentions a <refspec> 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

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

* Re: [DOCBUG] git subtree synopsis needs updating
  2012-10-24 14:29   ` Yann Dirson
@ 2013-01-01  1:47     ` greened
  0 siblings, 0 replies; 7+ messages in thread
From: greened @ 2013-01-01  1:47 UTC (permalink / raw)
  To: Yann Dirson; +Cc: Herman van Rink, git list

Yann Dirson <dirson@bertin.fr> 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

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

* Re: [DOCBUG] git subtree synopsis needs updating
  2012-10-19 13:21 [DOCBUG] git subtree synopsis needs updating Yann Dirson
  2012-10-20 19:40 ` Herman van Rink
@ 2013-01-01  2:51 ` greened
  2013-01-18 14:37   ` Yann Dirson
  1 sibling, 1 reply; 7+ messages in thread
From: greened @ 2013-01-01  2:51 UTC (permalink / raw)
  To: Yann Dirson; +Cc: git list

Yann Dirson <dirson@bertin.fr> 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 <prefix> <commit>
> +'git subtree' add   -P <prefix> <repository> <commit>
>
> 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 <repository>, also
> mentions a <refspec> 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

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

* Re: [DOCBUG] git subtree synopsis needs updating
  2013-01-01  2:51 ` greened
@ 2013-01-18 14:37   ` Yann Dirson
  0 siblings, 0 replies; 7+ messages in thread
From: Yann Dirson @ 2013-01-18 14:37 UTC (permalink / raw)
  To: greened; +Cc: git list

On Mon, 31 Dec 2012 20:51:41 -0600
greened@obbligato.org wrote:

> Yann Dirson <dirson@bertin.fr> 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 <prefix> <commit>
> > +'git subtree' add   -P <prefix> <repository> <commit>
> >
> > 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 <repository> 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

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

* Re: [DOCBUG] git subtree synopsis needs updating
  2012-10-20 19:40 ` Herman van Rink
  2012-10-24 14:29   ` Yann Dirson
@ 2013-01-19  5:48   ` Techlive Zheng
  1 sibling, 0 replies; 7+ messages in thread
From: Techlive Zheng @ 2013-01-19  5:48 UTC (permalink / raw)
  To: Herman van Rink; +Cc: Yann Dirson, git list

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 <prefix> <commit>
> > +'git subtree' add   -P <prefix> <repository> <commit>
> >
> > 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 <repository>, also
> > mentions a <refspec> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-01-19  5:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19 13:21 [DOCBUG] git subtree synopsis needs updating Yann Dirson
2012-10-20 19:40 ` Herman van Rink
2012-10-24 14:29   ` Yann Dirson
2013-01-01  1:47     ` greened
2013-01-19  5:48   ` Techlive Zheng
2013-01-01  2:51 ` greened
2013-01-18 14:37   ` Yann Dirson

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).