svn commit: r337157 - in head: . tools/tools/git

Ben Widawsky bwidawsk at freebsd.org
Sun Aug 5 01:28:17 UTC 2018


On 18-08-04 19:36:11, Warner Losh wrote:
> 
> 
> On Sat, Aug 4, 2018, 7:11 PM Eitan Adler <lists at eitanadler.com> wrote:
> 
>     On Sat, 4 Aug 2018 at 10:16, Warner Losh <imp at bsdimp.com> wrote:
>     >
>     >
>     >
>     > On Sat, Aug 4, 2018, 6:08 PM Eitan Adler <lists at eitanadler.com> wrote:
>     >>
>     >> On Thu, 2 Aug 2018 at 11:28, Ben Widawsky <bwidawsk at freebsd.org> wrote:
>     >> > +git_checkout()
>     >> > +{
>     >> > +       # Delete master
>     >> > +       ${GIT} branch -D master
>     >> > +
>     >> > +       # Make master really be trunk
>     >> > +       ${GIT} checkout -b master trunk
>     >>
>     >> Can't this be git branch --force master trunk ?
>     >
>     >
>     > No. That won't work. We do not want to change the location of master.
>     This will reset it to trunk, which is nearly always wrong.
> 
>     See this:
> 
>     ${GIT} branch -D master
>     ${GIT} checkout -b master trunk
> 
>     For clarity I'd expect something closer to:
> 
>     git branch --force master trunk
>     git checkout master
> 
>     The end result is the same, but IMHO this is clearer in intent.
> 
> 
> Oh, that... yes, you may be right. There is another script that it would be
> wrong in, but not this one...
> 
> Warner
> 

LGTM. Thanks. To me, --force is a little more advanced usage, but I agree this
is a more direct approach. Would one of you mind updating the wiki so that the
two sources match (maybe also have the wiki point to this script)? I am
currently unable to register for a wiki account.

I've added you both as reviewers:
https://reviews.freebsd.org/D16593


More information about the svn-src-all mailing list