Re: [PATCH] update-ref: add forward command to safely fast-forward refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Unless I am missing something, this
> does not seem to be adding anything we cannot already do.

Correct. In my case it replaces:

MERGE_BASE=$(git merge-base refs/remotes/origin/master refs/prefetch/remotes/origin/master)
update refs/remotes/origin/master refs/prefetch/remotes/origin/master $MERGE_BASE

I just thought the "forward" form was a little more convenient since it could output it all in one for-each-ref invocation. I mean, I could always open .git/refs/* in vim but that doesn't mean I want to...

Originally I left it as a three argument command but figured it might as well be possible to update to the descendent of any given ref, so I separated <ancestor> from <refname>.
 
> I wonder if
> 
> git fetch . "+refs/prefetch/remotes/origin/*:refs/remotes/origin/*"
> 
> (with or without the '+' prefix, depending) what you are really
> going after, though.

Oh, that's perfect! I didn't consider that it was possible to "fetch" from the local repo. I think the refspec 'refs/prefetch/remotes/origin/*:refs/remotes/origin/*' does what I want — fast-forwarding my remote tracking branches to their latest prefetches.

In that case, if you don't feel the forward feature is useful feel free to drop it.

Thanks,
Ronan




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux