[PATCH 1/3] ls-tree: make optional

2018-07-02 Thread Joshua Nelson
use syntax similar to `git-checkout` to make optional for `ls-tree`. if is omitted, default to HEAD. infer arguments as follows: 1. if args start with -- assume to be HEAD 2. if exactly one arg precedes --, treat the argument as 3. if more than one arg precedes --, exit with an error 4

[PATCH 3/3] ls-tree: add unit tests for arguments

2018-07-02 Thread Joshua Nelson
Signed-off-by: Joshua Nelson --- t/t3104-ls-tree-optional-args.sh | 43 1 file changed, 43 insertions(+) create mode 100644 t/t3104-ls-tree-optional-args.sh diff --git t/t3104-ls-tree-optional-args.sh t/t3104-ls-tree-optional-args.sh new file mode 100644 index 0

[PATCH 2/3] ls-tree: update usage info

2018-07-02 Thread Joshua Nelson
show [tree-ish] and [--] as optional --- builtin/ls-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git builtin/ls-tree.c builtin/ls-tree.c index 14102b052..c5649b09c 100644 --- builtin/ls-tree.c +++ builtin/ls-tree.c @@ -26,7 +26,7 @@ static int chomp_prefix; static const ch

Re: [PATCH] Makefile: tweak sed invocation

2018-07-02 Thread Alejandro R . Sedeño
On 2018-06-26 14:35, Junio C Hamano wrote: Having said that, I'm a bit surprised that our build infrastructure and shell scripts still work on tools on SunOS. I used to have access to SunOS/Solaris boxes and tried to be careful not to break them unnecessarily, but these days I don't, so I expect

[PATCH v4] fetch-pack: support negotiation tip whitelist

2018-07-02 Thread Jonathan Tan
During negotiation, fetch-pack eventually reports as "have" lines all commits reachable from all refs. Allow the user to restrict the commits sent in this way by providing a whitelist of tips; only the tips themselves and their ancestors will be sent. Both globs and single objects are supported.

[PATCH] fetch-pack: write shallow, then check connectivity

2018-07-02 Thread Jonathan Tan
When fetching, connectivity is checked after the shallow file is updated. There are 2 issues with this: (1) the connectivity check is only performed up to ancestors of existing refs (which is not thorough enough if we were deepening an existing ref in the first place), and (2) there is no rollback

Re: Feature request : "git fsck" should show the percentage of completeness in step "Checking connectivity:"

2018-07-02 Thread Jeff King
On Sun, Jul 01, 2018 at 06:21:40PM +0200, Toralf Förster wrote: > as "git fsck" does it already for "Checking objects:" > > Is this a valid feature request? It's actually hard to do accurately. We don't know how many objects are reachable until we traverse the graph...which is exactly what the "

Re: [PATCH 3/3] ref-filter: avoid backend filtering with --ignore-case

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 5:12 PM Jeff King wrote: > When for-each-ref is used with --ignore-case, we expect > match_name_as_path() to do a case-insensitive match. But > there's an extra layer of filtering that happens before we > even get there. Since commit cfe004a5a9 (ref-filter: limit > traversal

Re: [PATCH v6 2/8] read-cache: teach make_cache_entry to take object_id

2018-07-02 Thread Stefan Beller
On Mon, Jul 2, 2018 at 12:49 PM Jameson Miller wrote: > > Teach make_cache_entry function to take object_id instead of a SHA-1. This repeats the subject line? Sign off missing.

git@vger.kernel.org

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 2:27 PM Stefan Beller wrote: > On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote: > > This series fixes several buggy tests which went undetected due to > > broken &&-chains in subshells, modernizes some tests to take advantage > > of test functions (test_might_fail(), tes

Re: [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 2:14 PM Stefan Beller wrote: > On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine wrote: > > test_expect_success 'grep from a subdirectory to search wider area (2)' ' > > mkdir -p s && > > ( > > - cd s || exit 1 > > - ( git grep xxyyzz

[PATCH 3/3] ref-filter: avoid backend filtering with --ignore-case

2018-07-02 Thread Jeff King
When for-each-ref is used with --ignore-case, we expect match_name_as_path() to do a case-insensitive match. But there's an extra layer of filtering that happens before we even get there. Since commit cfe004a5a9 (ref-filter: limit traversal to prefix, 2017-05-22), we feed the prefix to the ref back

[PATCH 2/3] for-each-ref: consistently pass WM_IGNORECASE flag

2018-07-02 Thread Jeff King
From: Aleksandr Makarov The match_name_as_path() function learned to set WM_IGNORECASE in the "flags" field when the user passed --ignore-case. But it forgot to actually pass the flags to wildmatch()! As a result, the --ignore-case feature has been broken since it was added in 3bb16a8bf2 (tag, b

[PATCH 1/3] t6300: add a test for --ignore-case

2018-07-02 Thread Jeff King
The --ignore-case option was added by 3bb16a8bf2 (tag, branch, for-each-ref: add --ignore-case for sorting and filtering, 2016-12-04), but it was never tested. And indeed, it does not work due to multiple bugs (which will be fixed in subsequent patches). Signed-off-by: Jeff King --- t/t6300-for-

[PATCH 0/3] un-break for-each-ref --ignore-case

2018-07-02 Thread Jeff King
This is a follow-up to this patch last September: https://public-inbox.org/git/79c946a2-532e-1c9b-7bf2-1f1ccbff7...@gmail.com/ The patch was the right thing to do, but: 1. It needed a commit message. 2. It needed a signoff. 3. It needed a test, which then showed that there was _another_ b

Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually

2018-07-02 Thread Eric Sunshine
On Mon, Jul 2, 2018 at 1:44 PM Stefan Beller wrote: > > diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh > > test_expect_success 'diff --no-index with binary creation' ' > > echo Q | q_to_nul >binary && > > - (: hide error code from diff, which just indicates differences

[GSoC] GSoC with git, week 9

2018-07-02 Thread Alban Gruin
Hi, I just published a blog post about last week: https://blog.pa1ch.fr/posts/2018/07/02/en/gsoc2018-week-9.html Cheers, Alban

Re: [PATCH 08/23] commit-graph.c: mark more strings for translation

2018-07-02 Thread Derrick Stolee
On 6/30/2018 5:08 AM, Nguyễn Thái Ngọc Duy wrote: Signed-off-by: Nguyễn Thái Ngọc Duy --- commit-graph.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index b63a1fc85e..c8d521923c 100644 --- a/commit-graph.c +++ b/co

[PATCH v2 1/2] grep.c: extract show_line_header()

2018-07-02 Thread Taylor Blau
The grep code invokes show_line() to display the contents of a matched or context line in its output. Part of this execution is to print a line header that includes information such as the kind, the line- and column-number and etc. of that match. To prepare for the addition of an option to print o

[PATCH v2 2/2] grep.c: teach 'git grep --only-matching'

2018-07-02 Thread Taylor Blau
Teach 'git grep --only-matching', a new option to only print the matching part(s) of a line. For instance, a line containing the following (taken from README.md:27): (`man gitcvs-migration` or `git help cvs-migration` if git is Is printed as follows: $ git grep -no -e git -- README.md | gre

[PATCH v2 0/2] teach --only-matching to 'git-grep(1)'

2018-07-02 Thread Taylor Blau
Hi, Attached is the second re-roll of my series to teach 'git grep --only-matching'. Since last time, not much has changed. The change I did include is summarized below, and an inter-diff is attached as always. - Initialize both match_color and line_color to NULL, thereby silencing a compil

Re: Feature request : "git fsck" should show the percentage of completeness in step "Checking connectivity:"

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 9:22 AM Toralf Förster wrote: > > as "git fsck" does it already for "Checking objects:" > > Is this a valid feature request? Yes it is. However it is most likely to have the feature incorporated if it comes in form of a patch. So clone one of the git.git repositories found

Re: [PATCH] git-gui: use commit message template

2018-07-02 Thread Stefan Beller
+cc Pat, in the hope of an answer. See https://public-inbox.org/git/xmqqd0z61xsv@gitster-ct.c.googlers.com/ on the state of git-gui and its lack of maintenance. Maybe Junio will pickup this patch. On Mon, Jul 2, 2018 at 11:35 AM Martin Schön wrote: > > Use the file described by commit.templa

[PATCH v6 4/8] mem-pool: only search head block for available space

2018-07-02 Thread Jameson Miller
Instead of searching all memory blocks for available space to fulfill a memory request, only search the head block. If the head block does not have space, assume that previous block would most likely not be able to fulfill request either. This could potentially lead to more memory fragmentation, bu

[PATCH v6 8/8] block alloc: add validations around cache_entry lifecyle

2018-07-02 Thread Jameson Miller
Add an option (controlled by an environment variable) perform extra validations on mem_pool allocated cache entries. When set: 1) Invalidate cache_entry memory when discarding cache_entry. 2) When discarding index_state struct, verify that all cache_entries were allocated from expected m

[PATCH v6 1/8] read-cache: teach refresh_cache_entry to take istate

2018-07-02 Thread Jameson Miller
Refactor refresh_cache_entry() to work on a specific index, instead of implicitly using the_index. This is in preparation for making the make_cache_entry function apply to a specific index. Signed-off-by: Jameson Miller --- cache.h | 2 +- merge-recursive.c | 2 +- read-cache.c |

[PATCH v6 0/8] Allocate cache entries from mem_pool

2018-07-02 Thread Jameson Miller
Changes since v5: - Updated commit messages for: 7581156e8a read-cache: teach refresh_cache_entry to take istate 2c962aa0cd block alloc: add lifecycle APIs for cache_entry structs - Use oidcpy function instead of hashcpy function ### Interdiff (v5..v6): diff --git a/read-cache.c b/re

[PATCH v6 3/8] block alloc: add lifecycle APIs for cache_entry structs

2018-07-02 Thread Jameson Miller
It has been observed that the time spent loading an index with a large number of entries is partly dominated by malloc() calls. This change is in preparation for using memory pools to reduce the number of malloc() calls made to allocate cahce entries when loading an index. Add an API to allocate a

[PATCH v6 7/8] block alloc: allocate cache entries from mem_pool

2018-07-02 Thread Jameson Miller
When reading large indexes from disk, a portion of the time is dominated in malloc() calls. This can be mitigated by allocating a large block of memory and manage it ourselves via memory pools. This change moves the cache entry allocation to be on top of memory pools. Design: The index_state str

[PATCH v6 5/8] mem-pool: add life cycle management functions

2018-07-02 Thread Jameson Miller
Add initialization and discard functions to mem_pool type. As the memory allocated by mem_pool can now be freed, we also track the large allocations. If the there are existing mp_blocks in the mem_poo's linked list of mp_blocksl, then the mp_block for a large allocation is inserted behind the head

[PATCH v6 2/8] read-cache: teach make_cache_entry to take object_id

2018-07-02 Thread Jameson Miller
Teach make_cache_entry function to take object_id instead of a SHA-1. --- apply.c| 2 +- builtin/checkout.c | 2 +- builtin/difftool.c | 4 ++-- builtin/reset.c| 2 +- cache.h| 7 ++- merge-recursive.c | 2 +- read-cache.c | 8 +--- resolve-undo.c | 2

[PATCH v6 6/8] mem-pool: fill out functionality

2018-07-02 Thread Jameson Miller
Add functions for: - combining two memory pools - determining if a memory address is within the range managed by a memory pool These functions will be used by future commits. Signed-off-by: Jameson Miller --- mem-pool.c | 42 ++ mem-pool.h

Dear Good Friend Contact Money Gram ,,For Your Fund,,

2018-07-02 Thread infodavid fisher
Dear Good Friend Contact Money Gram ,,For Your Fund,, It's my pleasure to inform you that after our Board of Directors meeting this morning with H.E. Mr. Alpha Condé The AU Chairman we have concluded to release your Overdue payment worth $1.6 Million USD through Money Gram Service. Please find th

Re: [PATCH v4 9/9] diff.c: add white space mode to move detection that allows indent changes

2018-07-02 Thread Stefan Beller
On Mon, Jul 2, 2018 at 10:36 AM Brandon Williams wrote: > > On 06/28, Stefan Beller wrote: > > The option of --color-moved has proven to be useful as observed on the > > mailing list. However when refactoring sometimes the indentation changes, > > for example when partitioning a functions into sma

[PATCH] git-gui: use commit message template

2018-07-02 Thread Martin Schön
Use the file described by commit.template (if set) to show the commit message template, just like other GUIs. Signed-off-by: Martin Sch??n --- git-gui.sh | 9 + lib/commit.tcl | 1 + 2 files changed, 10 insertions(+) diff --git a/git-gui.sh b/git-gui.sh index 5bc21b8..6fc598d 100755

Re: [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine wrote: > > This test manually checks the exit code of git-grep for a particular > value. In doing so, it intentionally breaks the &&-chain. Modernize the > test by taking advantage of test_expect_code() and a normal &&-chain. > > Signed-off-by: Eric Sun

RE: [PATCH v5 6/8] mem-pool: fill out functionality

2018-07-02 Thread Jameson Miller
> > +void mem_pool_combine(struct mem_pool *dst, struct mem_pool *src) { > > + struct mp_block *p; > > + > > + /* Append the blocks from src to dst */ > > + if (dst->mp_block && src->mp_block) { > > + /* > > +* src and dst have blocks, append > > +* blocks fr

git@vger.kernel.org

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote: > > This series fixes several buggy tests which went undetected due to > broken &&-chains in subshells, modernizes some tests to take advantage > of test functions (test_might_fail(), test_write_lines(), etc.), and > fixes a lot of broken &&-chai

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Jeff King
On Mon, Jul 02, 2018 at 04:09:32PM +0200, Lars Schneider wrote: > Brian had a good argument [1] for an even more flexible system > proposed by Peff: > > > 1) We allow users to define custom encoding mappings in their Git config. > Example: > > git config --global core.encoding.myenc UTF-16

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Jeff King
On Sun, Jul 01, 2018 at 05:56:58PM +, brian m. carlson wrote: > On Thu, Jun 28, 2018 at 01:27:07PM -0400, Jeff King wrote: > > Yeah, that was along the lines that I was thinking. I wonder if anybody > > would ever need two such auto-encodings, though. Probably not. But > > another way to think

Re: [PATCH 02/25] t: use test_write_lines() instead of series of 'echo' commands

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote: > > These tests employ a noisy subshell (with missing &&-chain) to feed > input into Git commands or files: > > (echo a; echo b; echo c) | git some-command ... > > Simplify by taking advantage of test_write_lines(): > > test_write_lines a

Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually

2018-07-02 Thread Stefan Beller
> diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh > index 0a8af76aab..6579c81216 100755 > --- a/t/t4012-diff-binary.sh > +++ b/t/t4012-diff-binary.sh > @@ -102,10 +102,8 @@ test_expect_success 'apply binary patch' ' > > test_expect_success 'diff --no-index with binary creation' ' >

Re: [PATCH v4 9/9] diff.c: add white space mode to move detection that allows indent changes

2018-07-02 Thread Brandon Williams
On 06/28, Stefan Beller wrote: > The option of --color-moved has proven to be useful as observed on the > mailing list. However when refactoring sometimes the indentation changes, > for example when partitioning a functions into smaller helper functions > the code usually mostly moved around except

Re: [PATCH] xdiff: reduce indent heuristic overhead

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 8:57 AM Michael Haggerty wrote: > > On 06/29/2018 10:28 PM, Stefan Beller wrote: > > [...] > > Adds some threshold to avoid expensive cases, like: > > > > ``` > > #!python > > open('a', 'w').write(" \n" * 100) > > open('b', 'w').write(" \n" * 101)

Re: [PATCH v4 7/9] diff.c: decouple white space treatment from move detection algorithm

2018-07-02 Thread Brandon Williams
On 06/28, Stefan Beller wrote: > In the original implementation of the move detection logic the choice for > ignoring white space changes is the same for the move detection as it is > for the regular diff. Some cases came up where different treatment would > have been nice. > > Allow the user to

Re: [PATCH v4 6/9] diff.c: add a blocks mode for moved code detection

2018-07-02 Thread Brandon Williams
On 06/28, Stefan Beller wrote: > The new "blocks" mode provides a middle ground between plain and zebra. > It is as intuitive (few colors) as plain, but still has the requirement > for a minimum of lines/characters to count a block as moved. > > Suggested-by: Ævar Arnfjörð Bjarmason > (https://p

Re: [PATCH 00/12] Kill the_index part2, header file cleanup

2018-07-02 Thread Brandon Williams
On 06/30, Nguyễn Thái Ngọc Duy wrote: > Like part 1 this is also boring. I wanted to drop these 'extern' > everywhere actually, so before I touched any header file in this > series, I did a clean up first. This is the result (and to reduce diff > noise later) I've scanned through the series and it

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Lars Schneider
> -Lars Schneider wrote: - > To: Jeff King > From: Lars Schneider > Date: 06/28/2018 18:21 > Cc: "brian m. carlson" , Steve Groeger > , git@vger.kernel.org > Subject: Re: Use of new .gitattributes working-tree-encoding attribute across > different platform types > > >> On Jun 28, 201

[PATCH 1/3] t6042: add testcase covering rename/add/delete conflict type

2018-07-02 Thread Elijah Newren
If a file is renamed on one side of history, and the other side of history both deletes the original file and adds a new unrelated file in the way of the rename, then we have what I call a rename/add/delete conflict. Add a testcase covering this scenario. Reported-by: Robert Dailey Signed-off-by

[PATCH 0/3] Add missing rename-related corner cases for merging

2018-07-02 Thread Elijah Newren
In merging, every rename acts as a two-piece lego in terms of conflicts. We have long realized that the other branch can (1) delete the source side of a rename, giving a rename/delete conflict, or (2) add a file in the way of the rename destination, giving a rename/add conflict, or (3) have a renam

[PATCH 2/3] t6042: add testcase covering rename/rename(2to1)/delete/delete conflict

2018-07-02 Thread Elijah Newren
If either side of a rename/rename(2to1) conflict is itself also involved in a rename/delete conflict, then the conflict is a little more complex; we can even have what I'd call a rename/rename(2to1)/delete/delete conflict. (In some ways, this is similar to a rename/rename(1to2)/add/add conflict, a

[PATCH 3/3] t6042: add testcase covering long chains of rename conflicts

2018-07-02 Thread Elijah Newren
Each rename is a lego: the source side could be connected to a delete or another rename, and the destination side could be connected to a rename or a conflicting add. Previous tests combined these to get e.g. rename/rename(1to2)/add/add, rename/rename(2to1)/delete/delete, and rename/add/delete. B

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Steve Groeger
Lars, I think this proposed solution may resolve my issue. Thanks Steve Groeger Java Runtimes Development IBM Hursley IBM United Kingdom Ltd Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groe...@uk.ibm.c

[GSoC][PATCH v2 4/7] rebase-interactive: rewrite the edit-todo functionality in C

2018-07-02 Thread Alban Gruin
This rewrites the edit-todo functionality from shell to C. To achieve that, a new command mode, `edit-todo`, is added, and the `write-edit-todo` flag is removed, as the shell script does not need to write the edit todo help message to the todo list anymore. The shell version is then stripped in f

[GSoC][PATCH v2 3/7] editor: add a function to launch the sequence editor

2018-07-02 Thread Alban Gruin
As part of the rewrite of interactive rebase, the sequencer will need to open the sequence editor to allow the user to edit the todo list. Instead of duplicating the existing launch_editor() function, this refactors it to a new function, launch_specified_editor(), which takes the editor as a parame

[GSoC][PATCH v2 5/7] sequencer: add a new function to silence a command, except if it fails.

2018-07-02 Thread Alban Gruin
This adds a new function, run_command_silent_on_success(), to redirect the stdout and stderr of a command to a strbuf, and then to run that command. This strbuf is printed only if the command fails. It is functionnaly similar to output() from git-rebase.sh. run_git_commit() is then refactored to u

[GSoC][PATCH v2 7/7] rebase -i: rewrite checkout_onto() in C

2018-07-02 Thread Alban Gruin
This rewrites checkout_onto() from shell to C. A new command (“checkout-onto”) is added to rebase--helper.c. The shell version is then stripped. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 7 ++- git-rebase--interactive.sh | 25 - sequencer.c

[GSoC][PATCH v2 6/7] rebase -i: rewrite setup_reflog_action() in C

2018-07-02 Thread Alban Gruin
This rewrites (the misnamed) setup_reflog_action() from shell to C. The new version is called prepare_branch_to_be_rebased(). A new command is added to rebase--helper.c, “checkout-base”, as well as a new flag, “verbose”, to avoid silencing the output of the checkout operation called by checkout_ba

[GSoC][PATCH v2 2/7] rebase--interactive: rewrite append_todo_help() in C

2018-07-02 Thread Alban Gruin
This rewrites append_todo_help() from shell to C. It also incorporates some parts of initiate_action() and complete_action() that also write help texts to the todo file. This also introduces the source file rebase-interactive.c. This file will contain functions necessary for interactive rebase tha

[GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-02 Thread Alban Gruin
This makes rebase_path_todo(), get_missing_commit_check_level() and the enum check_level accessible outside sequencer.c. check_level is renamed missing_commit_check_level, and its value names are prefixed by MISSING_COMMIT_ to avoid namespace pollution. This will be needed for the rewrite of appe

[GSoC][PATCH v2 0/7] rebase -i: rewrite some parts in C

2018-07-02 Thread Alban Gruin
This patch series rewrites some parts of interactive rebase from shell to C: - append_todo_help(). The C version covers a bit more than the shell version. - The edit-todo functionnality. - The reflog operations. The v1 of this series is an aggregate made by Junio of my patch series about

Re: [GSoC][PATCH v5 0/3] rebase -i: rewrite reflog operations in C

2018-07-02 Thread Alban Gruin
Hi Junio, Le 29/06/2018 à 20:23, Junio C Hamano a écrit : > Junio C Hamano writes: > >> Let's aggregate these topics into a single topic, and perhaps call >> it ag/rebase-i-in-c or something like that. Pretending as if they >> are separately replaceable does not make much sense, as you are not

[PATCH v2 4/4] builtin/rebase: support running "git rebase "

2018-07-02 Thread Pratik Karki
This patch gives life to the skeleton added in the previous patch. This patch makes real operation happen i.e. by using `git -c rebase.usebuiltin=true rebase `. With this patch, the basic operation of rebase can be done. The current version of the builtin rebase does not, however, make full use of

[PATCH v2 3/4] sequencer: refactor the code to detach HEAD to checkout.c

2018-07-02 Thread Pratik Karki
The motivation behind this commit is to extract the core part of do_reset() from sequencer.c and move it to a new detach_head_to() function in checkout.c. Here the index only gets locked after performing the first part of `do_reset()` rather than before which essentially derives the `oid` from the

[GSoC] [PATCH v2 0/4] rebase: rewrite rebase in C

2018-07-02 Thread Pratik Karki
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 ex

[PATCH v2 2/4] rebase: refactor common shell functions into their own file

2018-07-02 Thread Pratik Karki
The function present in `git-legacy-rebase.sh` are used by backends so, this refactor tries to extract the functions out so that, the `git-legacy-rebase.sh` can be retired easily as the `git-rebase--common.sh` will provide the functions for now. The motivation behind this is to call the backend fu

[PATCH v2 1/4] rebase: start implementing it as a builtin

2018-07-02 Thread Pratik Karki
This commit imitates the strategy that was used to convert the difftool to a builtin, see be8a90e (difftool: add a skeleton for the upcoming builtin, 2017-01-17) for details: This commit renames the shell script `git-rebase.sh` to `git-legacy-rebase.sh` and hands off to it by default. The current