Re: [PATCH 0/5] ff-refs: builtin command to fast-forward local refs

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

 



Michael Rappazzo venit, vidit, dixit 11.11.2015 03:11:
> This patch series is built on (based on) 'next' because it relies on
> worktree.c
> 
> `ff-refs` will update local branches which can be fast-forwarded to their
> upstream tracking branch.  Any branch which has diverged from the upstream
> will be left untouched by this command.  Additionally, there are options
> for '--dry-run' and to '--skip-worktrees'.
> 
> There are two primary update mechanisms for fast-forwarding a branch.
>   - For a checked out branch, emulate `git-merge --ff-only`
>   - For a non-checked out branch, emulate `git update-ref`
> 
> When run on a repo with multiple worktrees (created with git-worktree add),
> git-ff-refs will take that into account when fast-forwarding.  That is, it
> will run in 'merge --ff-only' emulation mode when a branch is checked out
> in a worktree, rather than in 'update-ref' mode.
> 
> The primary benefit of ff-refs will come for those who maintain several
> local branches which track upstream remote branches that update often.  The
> intended usage pattern is to run `git-fetch` followed by `git-ff-refs`.

I'm sorry, but I don't see why this deserves a new command. If refspec
with and without "+" are not enough then maybe "git fetch --all" or "git
remote update" should learn a new "--ff-only" option (ignoring all "+")
like merge has.

As for updating worktrees: This shouldn't be taken too lightly anyways.
But the worktree interface still has some rough edges, and I would hope
that it learns a "foreach" subcommand very much like the submodule
version. That would allow you to

git worktree foreach git merge --ff-only

with a systematic aproach that opens many other opportunities.

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



[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]