git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Rappazzo <rappazzo@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, mhagger@alum.mit.edu, peff@peff.net,
	dturner@twopensource.com, pclouds@gmail.com,
	sunshine@sunshineco.com, Michael Rappazzo <rappazzo@gmail.com>
Subject: [PATCH 0/5] ff-refs: builtin command to fast-forward local refs
Date: Tue, 10 Nov 2015 21:11:20 -0500	[thread overview]
Message-ID: <1447207885-10911-1-git-send-email-rappazzo@gmail.com> (raw)

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`.

Michael Rappazzo (5):
  ff-refs: builtin cmd to check and fast forward local refs to their
    upstream
  ff-refs: update each updatable ref
  ff-refs: add --dry-run and --skip-worktree options
  ff-refs: Add documentation
  ff-refs: Add tests

 .gitignore                    |   1 +
 Documentation/git-ff-refs.txt |  55 +++++++++
 Makefile                      |   1 +
 builtin.h                     |   1 +
 builtin/ff-refs.c             | 272 ++++++++++++++++++++++++++++++++++++++++++
 command-list.txt              |   1 +
 git.c                         |   1 +
 t/t7900-ff-refs.sh            | 164 +++++++++++++++++++++++++
 8 files changed, 496 insertions(+)
 create mode 100644 Documentation/git-ff-refs.txt
 create mode 100644 builtin/ff-refs.c
 create mode 100755 t/t7900-ff-refs.sh

-- 
2.6.2

             reply	other threads:[~2015-11-11  2:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  2:11 Michael Rappazzo [this message]
2015-11-11  2:11 ` [PATCH 1/5] ff-refs: builtin cmd to check and fast forward local refs to their upstream Michael Rappazzo
2015-11-11  2:11 ` [PATCH 2/5] ff-refs: update each updatable ref Michael Rappazzo
2015-11-11  2:11 ` [PATCH 3/5] ff-refs: add --dry-run and --skip-worktree options Michael Rappazzo
2015-11-11  2:11 ` [PATCH 4/5] ff-refs: Add documentation Michael Rappazzo
2015-11-11  2:11 ` [PATCH 5/5] ff-refs: Add tests Michael Rappazzo
2015-11-11 10:41 ` [PATCH 0/5] ff-refs: builtin command to fast-forward local refs Michael J Gruber
2015-11-11 12:32   ` Mike Rappazzo
     [not found]     ` <CANoM8SWxMeDjwy-GwVc+En8D7N8LyzzsBKtX_MbiS4Z49DjD7g@mail.gmail.com>
2015-11-17 15:28       ` Michael J Gruber
2015-11-17 15:36         ` Mike Rappazzo
2015-11-18  9:56           ` Johannes Schindelin
2015-11-24 22:39             ` Jeff King
2015-12-01  0:24               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447207885-10911-1-git-send-email-rappazzo@gmail.com \
    --to=rappazzo@gmail.com \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).