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]

 



On Wed, Nov 18, 2015 at 10:56:02AM +0100, Johannes Schindelin wrote:

> > For me I use this command more as a post-fetch:
> > 
> > git fetch --all --prune && git-ff-refs
> > 
> > I imagine that the big difference is in the number of branches that I
> > maintain, and perhaps in the way that I use gitk to visualize them.  I
> > would be happy to add another option to git-fetch for --ff-refs as an
> > alternative if that would feel better than a full-on builtin.
> 
> I would much prefer, say, `git fetch --all --prune
> --fast-forward-tracking-branches` (with maybe `-T` as short option for
> `--fast-forward-tracking-branches` and/or a shorter `--ff-tracking`) to a
> new builtin.

FWIW, that makes a lot more sense to me, as it would presumably touch
only branches which track whatever we just updated, and not other random
refs.

I have to admit that I'm a little wary of something like ff-refs meeting
all needs, though. I have custom scripts that match my workflow and tell
me when a branch could be updated. I could replace part of them with
"ff-refs --dry-run", but that is really not much code. Basically:

  git for-each-ref --format='%(refname) %(upstream)' refs/heads |
  while read ref upstream; do
    git merge-base --is-ancestor $ref $upstream &&
      echo "$ref can fast-forward"
  done

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