Skip to content

Make git-pull a builtin

Paul Tan git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 28 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14pull: implement fetch + mergeMakefile builtin.h builtin/pull.c +15 more+495 -4011 reply
2/14pull: pass verbosity, --progress flags to fetch and mergebuiltin/pull.c t/t5521-pull-options.sh+64 -44 replies
3/14pull: pass git-merge's options to git-mergebuiltin/pull.c t/t4013-diff-various.sh t/t5150-request-pull.sh +4 more+100 -130 replies
4/14pull: pass git-fetch's options to git-fetchbuiltin/pull.c t/t5500-fetch-pack.sh t/t5521-pull-options.sh +1 more+107 -120 replies
5/14pull: error on no merge candidatesbuiltin/pull.c t/t5520-pull.sh+137 -51 reply
6/14pull: support pull.ff configbuiltin/pull.c t/t7601-merge-pull-config.sh+27 -22 replies
7/14pull: check if in unresolved merge stateadvice.c advice.h builtin/pull.c +1 more+19 -11 reply
8/14pull: fast-forward working tree if head is updatedbuiltin/pull.c t/t5520-pull.sh+32 -21 reply
9/14pull: implement pulling into an unborn branchbuiltin/pull.c t/t5520-pull.sh+30 -30 replies
10/14pull: set reflog messagebuiltin/pull.c t/t5520-pull.sh+25 -23 replies
11/14pull: teach git pull about --rebasebuiltin/pull.c t/t5520-pull.sh t/t5521-pull-options.sh +1 more+241 -204 replies
12/14pull: configure --rebase via branch.<name>.rebase or pull.rebasebuiltin/pull.c t/t5520-pull.sh+41 -61 reply
13/14pull --rebase: exit early when the working directory is dirtybuiltin/pull.c t/t5520-pull.sh+79 -40 replies
14/14pull --rebase: error on no merge candidate casesbuiltin/pull.c+25 -176 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by.

PatchStephen Robin
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14Helped-by
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/14] Make git-pull a builtin

This series directly depends on the changes made in jc/merge and pt/pull-tests. The commit messages assume that the behavioral changes proposed in pt/pull-log-n, pt/pull-tags-error-diag, pt/pull-ff-vs-merge-ff, and [1] have been introduced.

git-pull is a commonly executed command to check for new changes in the upstream repository and, if there are, fetch and integrate them into the current branch. Currently it is implemented by the shell script git-pull.sh. However, compared to C, shell scripts have certain deficiencies:

1. Usually have to rely on spawning a lot of processes, which can be slow on systems that do not implement copy-on-write semantics.

2. They introduce a lot of dependencies, especially on non-POSIX systems.

3. They cannot take advantage of git's C API and internal caches.

This series rewrites git-pull.sh into a C builtin, thus improving its performance and portability. It is part of my GSoC project to rewrite git-pull and git-am into builtins[2].

[1] http://thread.gmane.org/gmane.comp.version-control.git/269249
[2] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1

Paul Tan (14):
pull: implement fetch + merge
pull: pass verbosity, --progress flags to fetch and merge
pull: pass git-merge's options to git-merge
pull: pass git-fetch's options to git-fetch
pull: error on no merge candidates
pull: support pull.ff config
pull: check if in unresolved merge state
pull: fast-forward working tree if head is updated
pull: implement pulling into an unborn branch
pull: set reflog message
pull: teach git pull about --rebase
pull: configure --rebase via branch.<name>.rebase or pull.rebase pull --rebase: exit early when the working directory is dirty pull --rebase: error on no merge candidate cases

 Makefile                     |   2 +-
 advice.c                     |   8 +
 advice.h                     |   1 +
 builtin.h                    |   1 +
 builtin/pull.c               | 919 +++++++++++++++++++++++++++++++++++++++++++
 contrib/examples/git-pull.sh | 339 ++++++++++++++++
 git-pull.sh                  | 339 ----------------
 git.c                        |   1 +
 8 files changed, 1270 insertions(+), 340 deletions(-)
 create mode 100644 builtin/pull.c
 create mode 100755 contrib/examples/git-pull.sh
 delete mode 100755 git-pull.sh
Signature · 1 line
2.1.4