From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Pratik Karki <predatoramigo@gmail.com>
Cc: git@vger.kernel.org, christian.couder@gmail.com,
sbeller@google.com, alban.gruin@gmail.com, gitster@pobox.com
Subject: Re: [GSoC] [PATCH v4 0/4] rebase: rewrite rebase in C
Date: Sun, 8 Jul 2018 23:14:58 +0200 (DST) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1807082311540.75@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20180708180104.17921-1-predatoramigo@gmail.com>
Hi Pratik,
On Sun, 8 Jul 2018, Pratik Karki wrote:
> As a GSoC project, I have been working on the builtin rebase.
>
> The motivation behind the rewrite of rebase i.e. from shell script to C
> are for following reasons:
>
> 1. Writing shell scripts and getting it to production is much faster
> than doing the equivalent in C but lacks in performance and extra
> workarounds are needed for non-POSIX platforms.
>
> 2. Git for Windows is at loss as the installer size increases due to
> addition of extra dependencies for the shell scripts which are usually
> available in POSIX compliant platforms.
>
> This series of patches serves to demonstrate a minimal builtin rebase
> which supports running `git rebase <upstream>` and also serves to ask for
> reviews.
>
> Changes since v3:
>
> - Fix commit message of `rebase: start implementing it as a builtin`.
>
> - Acknowledge Junio's style reviews.
>
> - Acknowledge Johannes Schindelin's review.
The range-diff looks like this (and makes sense to me; you might want to
fix the typo s/retun/return/, but that's all for now):
-- snipsnap --
1: 7baec70f219 ! 1: 42778b20edf rebase: start implementing it as a builtin
@@ -13,6 +13,12 @@
be able to conveniently test new features by configuring
`rebase.useBuiltin`.
+ In the original difftool conversion, if sane_execvp() that attempts to
+ run the legacy scripted version returned with non-negative status, the
+ command silently exited without doing anything with success, but
+ sane_execvp() should not retun with non-negative status in the first
+ place, so we use die() to notice such an abnormal case.
+
We intentionally avoid reading the config directly to avoid
messing up the GIT_* environment variables when we need to fall back to
exec()ing the shell script. The test of builtin rebase can be done by
2: f385f42dc56 ! 2: a28be7308e6 rebase: refactor common shell functions into their own file
@@ -45,6 +45,20 @@
diff --git a/git-legacy-rebase.sh b/git-legacy-rebase.sh
--- a/git-legacy-rebase.sh
+++ b/git-legacy-rebase.sh
+@@
+ LF='
+ '
+ ok_to_skip_pre_rebase=
+-resolvemsg="
+-$(gettext 'Resolve all conflicts manually, mark them as resolved with
+-"git add/rm <conflicted_files>", then run "git rebase --continue".
+-You can instead skip this commit: run "git rebase --skip".
+-To abort and get back to the state before "git rebase", run "git rebase --abort".')
+-"
++
+ squash_onto=
+ unset onto
+ unset restrict_revision
@@
true) gpg_sign_opt=-S ;;
*) gpg_sign_opt= ;;
@@ -128,6 +142,13 @@
+++ b/git-rebase--common.sh
@@
+
++resolvemsg="
++$(gettext 'Resolve all conflicts manually, mark them as resolved with
++"git add/rm <conflicted_files>", then run "git rebase --continue".
++You can instead skip this commit: run "git rebase --skip".
++To abort and get back to the state before "git rebase", run "git rebase --abort".')
++"
++
+write_basic_state () {
+ echo "$head_name" > "$state_dir"/head-name &&
+ echo "$onto" > "$state_dir"/onto &&
3: 147699bd195 = 3: 7591098c4d1 sequencer: refactor the code to detach HEAD to checkout.c
4: bbaa4264caa ! 4: f8429e950a4 builtin/rebase: support running "git rebase <upstream>"
@@ -232,13 +232,14 @@
+ }
+
+ /*
-+ * If the branch to rebase is given, that is the branch we will rebase
-+ * branch_name -- branch/commit being rebased, or HEAD (already detached)
-+ * orig_head -- commit object name of tip of the branch before rebasing
-+ * head_name -- refs/heads/<that-branch> or "detached HEAD"
-+ */
++ * If the branch to rebase is given, that is the branch we will rebase
++ * branch_name -- branch/commit being rebased, or
++ * HEAD (already detached)
++ * orig_head -- commit object name of tip of the branch before rebasing
++ * head_name -- refs/heads/<that-branch> or "detached HEAD"
++ */
+ if (argc > 1)
-+ die ("TODO: handle switch_to");
++ die("TODO: handle switch_to");
+ else {
+ /* Do not need to switch branches, we are already on it. */
+ options.head_name =
next prev parent reply other threads:[~2018-07-08 21:15 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 7:46 [GSoC] [PATCH 0/5] rebase: rewrite rebase in C Pratik Karki
2018-06-28 7:46 ` [PATCH 1/5] Start TODO-rebase.sh Pratik Karki
2018-06-28 9:17 ` Pratik Karki
2018-06-28 7:46 ` [PATCH 2/5] rebase: start implementing it as a builtin Pratik Karki
2018-06-28 8:08 ` Christian Couder
2018-06-28 18:49 ` Stefan Beller
2018-06-28 7:46 ` [PATCH 3/5] rebase: refactor common shell functions into their own file Pratik Karki
2018-06-28 8:02 ` Christian Couder
2018-06-28 19:17 ` Stefan Beller
2018-06-28 7:46 ` [PATCH 4/5] sequencer: refactor the code to detach HEAD to checkout.c Pratik Karki
2018-06-28 8:14 ` Christian Couder
2018-06-28 21:19 ` Stefan Beller
2018-06-28 7:46 ` [PATCH 5/5] builtin/rebase: support running "git rebase <upstream>" Pratik Karki
2018-06-28 21:58 ` Stefan Beller
2018-07-02 9:15 ` [GSoC] [PATCH v2 0/4] rebase: rewrite rebase in C Pratik Karki
2018-07-02 9:15 ` [PATCH v2 1/4] rebase: start implementing it as a builtin Pratik Karki
2018-07-03 21:09 ` Junio C Hamano
2018-07-02 9:15 ` [PATCH v2 2/4] rebase: refactor common shell functions into their own file Pratik Karki
2018-07-03 21:13 ` Junio C Hamano
2018-07-02 9:15 ` [PATCH v2 3/4] sequencer: refactor the code to detach HEAD to checkout.c Pratik Karki
2018-07-03 21:26 ` Junio C Hamano
2018-07-02 9:15 ` [PATCH v2 4/4] builtin/rebase: support running "git rebase <upstream>" Pratik Karki
2018-07-03 21:42 ` Junio C Hamano
2018-07-06 12:08 ` [GSoC] [PATCH v3 0/4] rebase: rewrite rebase in C Pratik Karki
2018-07-06 12:08 ` [PATCH v3 1/4] rebase: start implementing it as a builtin Pratik Karki
2018-07-06 21:09 ` Junio C Hamano
2018-07-06 12:08 ` [PATCH v3 2/4] rebase: refactor common shell functions into their own file Pratik Karki
2018-07-06 12:36 ` Johannes Schindelin
2018-07-06 12:08 ` [PATCH v3 3/4] sequencer: refactor the code to detach HEAD to checkout.c Pratik Karki
2018-07-06 12:08 ` [PATCH v3 4/4] builtin/rebase: support running "git rebase <upstream>" Pratik Karki
2018-07-06 21:30 ` Junio C Hamano
2018-07-07 6:45 ` Christian Couder
2018-07-07 11:59 ` Johannes Schindelin
2018-07-07 16:24 ` Junio C Hamano
2018-07-17 21:49 ` Beat Bolli
2018-07-17 21:55 ` Beat Bolli
2018-07-08 18:01 ` [GSoC] [PATCH v4 0/4] rebase: rewrite rebase in C Pratik Karki
2018-07-08 18:01 ` [PATCH v4 1/4] rebase: start implementing it as a builtin Pratik Karki
2018-07-09 7:59 ` Andrei Rybak
2018-07-09 8:36 ` Eric Sunshine
2018-07-09 17:18 ` Pratik Karki
2018-07-22 9:14 ` Duy Nguyen
2018-07-08 18:01 ` [PATCH v4 2/4] rebase: refactor common shell functions into their own file Pratik Karki
2018-07-08 18:01 ` [PATCH v4 3/4] sequencer: refactor the code to detach HEAD to checkout.c Pratik Karki
2018-07-08 21:31 ` Johannes Schindelin
2018-07-09 17:23 ` Pratik Karki
2018-07-09 16:42 ` Junio C Hamano
2018-07-09 17:20 ` Pratik Karki
2018-07-08 18:01 ` [PATCH v4 4/4] builtin/rebase: support running "git rebase <upstream>" Pratik Karki
2018-07-08 21:44 ` Johannes Schindelin
2018-07-08 21:14 ` Johannes Schindelin [this message]
2018-07-30 16:29 ` [GSoC] [PATCH v5 0/3] rebase: rewrite rebase in C Pratik Karki
2018-07-30 16:29 ` [PATCH v5 1/3] rebase: start implementing it as a builtin Pratik Karki
2018-07-30 16:29 ` [PATCH v5 2/3] rebase: refactor common shell functions into their own file Pratik Karki
2018-07-30 16:29 ` [PATCH v5 3/3] builtin/rebase: support running "git rebase <upstream>" Pratik Karki
2018-08-01 0:17 ` [GSoC] [PATCH v5 0/3] rebase: rewrite rebase in C Pratik Karki
2018-08-06 19:31 ` [GSoC] [PATCH v6 " Pratik Karki
2018-08-06 19:31 ` [GSoC] [PATCH v6 1/3] rebase: start implementing it as a builtin Pratik Karki
2018-08-06 19:31 ` [GSoC] [PATCH v6 2/3] rebase: refactor common shell functions into their own file Pratik Karki
2018-08-06 19:31 ` [GSoC] [PATCH v6 3/3] builtin/rebase: support running "git rebase <upstream>" Pratik Karki
2018-08-16 21:43 ` 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
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=nycvar.QRO.7.76.6.1807082311540.75@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=alban.gruin@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=predatoramigo@gmail.com \
--cc=sbeller@google.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).