git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: Paul Tan <pyokagan@gmail.com>
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>,
	Stephen Robin <stephen.robin@gmail.com>
Subject: Re: [PATCH 01/14] pull: implement fetch + merge
Date: Mon, 18 May 2015 17:55:57 +0200	[thread overview]
Message-ID: <8fdf250d93dc34505fc77f01b415a43b@www.dscho.org> (raw)
In-Reply-To: <1431961571-20370-2-git-send-email-pyokagan@gmail.com>

Hi Paul,

On 2015-05-18 17:05, Paul Tan wrote:
> Start off the rewrite of git-pull.sh to C by implementing a simple
> git-pull builtin that:
> 
> 1. Parses the command line arguments into [<repo> [<refspecs>...]]
> 
> 2. Runs git-fetch, passing the repo and refspecs to it.
> 
> 3. Runs git-merge FETCH_HEAD.
> 
> Due to missing features, several tests are disabled:
> 
> * Passing flags to git fetch, rebase, merge:
> 
>   * t5521: verbosity flags -v, -s
> 
> * Passing flags to git-merge, git-rebase:
> 
>   * t5150, t5572: Pass --ff, --no-ff, --ff-only to git-merge
> 
>   * t5520, t5521, t7406: Support --rebase, branch.*.rebase and
>     pull.rebase config
> 
>   * t6029, t4013: -s/--strategy
> 
>   * t6037: -X/--strategy-option
> 
>   * t5524: --log
> 
> * Passing flags to git-fetch:
> 
>   * t5521: --dry-run
> 
>   * t5500: --depth
> 
>   * t5521: --force
> 
>   * t5521: --all
> 
>   * t7403: --no-recurse-submodules
> 
> * t7601: pull.ff config sets --ff, --no-ff, --ff-only
> 
> * t5520: branch.*.rebase or pull.rebase sets --rebase, --rebase=preserve
> 
> * t5520: Pulling into void
> 
> * t5520: appropriate user-friendly error messages on no merge candidates
>   case
> 
> * t5520: appropriate user-friendly error messages if index has
>   unresolved entries.
> 
> * t5520: fast-forward working tree if branch head is updated by
>   git-fetch
> 
> * t5520: set reflog action to "pull args..."
> 
> These features will be re-implemented in succeeding patches.
> 
> Signed-off-by: Paul Tan <pyokagan@gmail.com>
> ---
>  Makefile                     |   2 +-
>  builtin.h                    |   1 +
>  builtin/pull.c               |  83 +++++++++++
>  contrib/examples/git-pull.sh | 339 +++++++++++++++++++++++++++++++++++++++++++
>  git-pull.sh                  | 339 -------------------------------------------
>  git.c                        |   1 +
>  t/t4013-diff-various.sh      |   3 +
>  t/t5150-request-pull.sh      |   2 +-
>  t/t5500-fetch-pack.sh        |  10 +-
>  t/t5520-pull.sh              |  68 ++++-----
>  t/t5521-pull-options.sh      |  20 +--
>  t/t5524-pull-msg.sh          |   2 +-
>  t/t5572-pull-submodule.sh    |   4 +
>  t/t6029-merge-subtree.sh     |   6 +-
>  t/t6037-merge-ours-theirs.sh |   2 +-
>  t/t7403-submodule-sync.sh    |   8 +-
>  t/t7406-submodule-update.sh  |   2 +
>  t/t7601-merge-pull-config.sh |   4 +-

This is an excellent way to develop the patch series. For the final patch series, I would like to propose that `git-pull.sh` is replaced by the builtin with the very last patch, though. That way, the builtin can be implemented in the way you did, but without touching the tests. In the final form, the builtin git-pull will be a drop-in replacement for the shell script, and the final patch will just make that switch.

In other words, patch 1/N would leave SCRIPT_SH in the Makefile untouched, and leave out the "pull" line from `git.c`.

Oh, by the way, if you pass the `-M` option to `git format-patch`, the diffstat will report the move rather than an added and a deleted git-pull.sh.

Ciao,
Dscho

  reply	other threads:[~2015-05-18 15:56 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 15:05 [PATCH 00/14] Make git-pull a builtin Paul Tan
2015-05-18 15:05 ` [PATCH 01/14] pull: implement fetch + merge Paul Tan
2015-05-18 15:55   ` Johannes Schindelin [this message]
2015-05-18 15:05 ` [PATCH 02/14] pull: pass verbosity, --progress flags to fetch and merge Paul Tan
2015-05-18 17:41   ` Johannes Schindelin
2015-05-21  9:48     ` Paul Tan
2015-05-21 15:59       ` Johannes Schindelin
2015-05-22 13:38         ` Paul Tan
2015-05-18 15:06 ` [PATCH 03/14] pull: pass git-merge's options to git-merge Paul Tan
2015-05-18 15:06 ` [PATCH 04/14] pull: pass git-fetch's options to git-fetch Paul Tan
2015-05-18 15:06 ` [PATCH 05/14] pull: error on no merge candidates Paul Tan
2015-05-18 18:56   ` Johannes Schindelin
2015-05-18 15:06 ` [PATCH 06/14] pull: support pull.ff config Paul Tan
2015-05-18 19:02   ` Johannes Schindelin
2015-05-21  9:53     ` Paul Tan
2015-05-18 15:06 ` [PATCH 07/14] pull: check if in unresolved merge state Paul Tan
2015-05-18 19:06   ` Johannes Schindelin
2015-05-18 15:06 ` [PATCH 08/14] pull: fast-forward working tree if head is updated Paul Tan
2015-05-18 19:18   ` Johannes Schindelin
2015-05-18 15:06 ` [PATCH 09/14] pull: implement pulling into an unborn branch Paul Tan
2015-05-18 15:06 ` [PATCH 10/14] pull: set reflog message Paul Tan
2015-05-18 19:27   ` Johannes Schindelin
2015-05-18 21:53     ` Junio C Hamano
2015-05-21 10:08       ` Paul Tan
2015-05-18 15:06 ` [PATCH 11/14] pull: teach git pull about --rebase Paul Tan
2015-05-18 23:36   ` Stefan Beller
2015-05-19 13:04   ` Johannes Schindelin
2015-05-31  8:18     ` Paul Tan
2015-06-02 11:26       ` Paul Tan
2015-05-18 15:06 ` [PATCH 12/14] pull: configure --rebase via branch.<name>.rebase or pull.rebase Paul Tan
2015-05-18 23:58   ` Stefan Beller
2015-05-18 15:06 ` [PATCH 13/14] pull --rebase: exit early when the working directory is dirty Paul Tan
2015-05-18 15:06 ` [PATCH 14/14] pull --rebase: error on no merge candidate cases Paul Tan
2015-05-19  0:12   ` Stefan Beller
2015-05-19 13:10     ` Johannes Schindelin
2015-05-19 16:27       ` Junio C Hamano
2015-05-22 13:48         ` Paul Tan
2015-05-22 14:14           ` Johannes Schindelin
2015-05-22 17:12             ` Stefan Beller
2015-05-18 19:21 ` [PATCH 00/14] Make git-pull a builtin Junio C Hamano
2015-05-30  7:29   ` Paul Tan
2015-05-30  8:00     ` Paul Tan
2015-05-18 19:41 ` Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=8fdf250d93dc34505fc77f01b415a43b@www.dscho.org \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pyokagan@gmail.com \
    --cc=sbeller@google.com \
    --cc=stephen.robin@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).