When "git rebase -i --root" creates a new root commit (say, by swapping
in a different commit for the root), it corrupts the commit's "author"
header with trailing garbage:
author A U Thor @1112912773 -0700...@example.com
This is a result of read_author_ident() neglecting to NUL-terminate th
When "git rebase -i --root" creates a new root commit, it corrupts the
"author" header's timezone by repeating the last digit:
author A U Thor @1112912773 -07000
This is due to two bugs.
First, write_author_script() neglects to add the closing quote to the
value of GIT_AUTHOR_DATE when gene
This is a re-roll of [1] which fixes sequencer bugs resulting in commit
object corruption when "rebase -i --root" swaps in a new commit as root.
Unfortunately, those bugs made it into v2.18.0 and have already
corrupted at least one repository (a local project of mine). Patches 3/4
and 4/4 are new.
read_author_ident() is careful to handle errors "gently" when parsing
"rebase-merge/author-script" by printing a suitable warning and
returning NULL; it never die()'s. One possible reason that parsing might
fail is that "rebase-merge/author-script" has been hand-edited in such a
way which corrupts
When "git rebase -i --root" creates a new root commit, it corrupts the
"author" header's timestamp by prepending a "@":
author A U Thor @1112912773 -0700
The commit parser is very strict about the format of the "author"
header, and does not allow a "@" in that position.
The "@" comes from G
On Mon, Jul 30 2018, Han-Wen Nienhuys wrote:
> + if (sideband_use_color < 0) {
> + const char *key = "color.remote";
> + char *value = NULL;
> + if (!git_config_get_string(key, &value))
> + sideband_use_color = git_config_colorbool(key
> diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
> index 4849edc4e..2b7baa95d 100755
> --- a/t/t9800-git-p4-basic.sh
> +++ b/t/t9800-git-p4-basic.sh
> @@ -261,6 +261,35 @@ test_expect_success 'unresolvable host in P4PORT should
> display error' '
> )
> '
>
> +# Test foll
Ich habe einen Wohltätigkeitsfonds für Sie im Wert von € 4,800,000. Diese
Spende ist
für die ersten 5 Personen, die auf diese E-Mail antworten, die als Form von
Wohltätigkeitshäusern zu Ehren meiner verstorbenen Frau gegeben wird, die an
Krebs
gestorben ist. Kontaktieren Sie meinen Anwalt über
Ich habe einen Wohltätigkeitsfonds für Sie im Wert von € 4,800,000. Diese
Spende ist
für die ersten 5 Personen, die auf diese E-Mail antworten, die als Form von
Wohltätigkeitshäusern zu Ehren meiner verstorbenen Frau gegeben wird, die an
Krebs
gestorben ist. Kontaktieren Sie meinen Anwalt über
On 31/07/18 08:33, Eric Sunshine wrote:
When "git rebase -i --root" creates a new root commit, it corrupts the
"author" header's timezone by repeating the last digit:
author A U Thor @1112912773 -07000
This is due to two bugs.
First, write_author_script() neglects to add the closing quot
On 31/07/18 08:33, Eric Sunshine wrote:
When "git rebase -i --root" creates a new root commit, it corrupts the
"author" header's timestamp by prepending a "@":
author A U Thor @1112912773 -0700
The commit parser is very strict about the format of the "author"
header, and does not allow a
On 31/07/18 08:33, Eric Sunshine wrote:
read_author_ident() is careful to handle errors "gently" when parsing
"rebase-merge/author-script" by printing a suitable warning and
returning NULL; it never die()'s. One possible reason that parsing might
fail is that "rebase-merge/author-script" has been
Hi Eric
On 31/07/18 08:33, Eric Sunshine wrote:
This is a re-roll of [1] which fixes sequencer bugs resulting in commit
object corruption when "rebase -i --root" swaps in a new commit as root.
Unfortunately, those bugs made it into v2.18.0 and have already
corrupted at least one repository (a lo
I have just replied to
https://github.com/cr-marcstevens/sha1collisiondetection/pull/42
I checked a gcc compiler on AIX, and I have the defines for vac.
I do not have access yet to SLES or RHEL (or Ubuntu), just a "free
Debian" on my Power6.
* my conclusions|recommendations:
a) AIX is alway
On Tue, Jul 31, 2018 at 5:50 AM Phillip Wood wrote:
> On 31/07/18 08:33, Eric Sunshine wrote:
> > - sq_dequote(in);
> > + if (!sq_dequote(in)) {
> > + warning(_("bad quoting on %s value in '%s'"),
> > + keys[i], rebase_path_au
On Tue, Jul 31, 2018 at 6:01 AM Phillip Wood wrote:
> Now that the author is correct, can we test_cmp() it against its
> expected value to make sure there are no hidden surprises in the name
> and email in the future. (It would be reassuring to test an author with
> "'" in the name as well but tha
On Tue, Jul 31, 2018 at 6:02 AM Phillip Wood wrote:
> On 31/07/18 08:33, Eric Sunshine wrote:
> > + /* validate date since fmt_ident() will die() on bad value */
> > + if (parse_date(val[2], &out)){
> > + warning(_("invalid date format '%s' in '%s'"),
> > +
A small step back...
On 7/30/2018 11:39 AM, Ævar Arnfjörð Bjarmason wrote:
On Sun, Jul 29 2018, Michael wrote:
On 29/07/2018 22:06, brian m. carlson wrote:
On Sun, Jul 29, 2018 at 09:48:43PM +0200, Michael wrote:
On 29/07/2018 21:27, brian m. carlson wrote:
Well, that explains it. I would
On Tue, Jul 31, 2018 at 6:06 AM Phillip Wood wrote:
> On 31/07/18 08:33, Eric Sunshine wrote:
> > Patch 2/4 of this series conflicts with Akinori MUSHA's
> > 'am/sequencer-author-script-fix' which takes a stab at fixing one of the
> > four (or so) bugs fixed by this series (namely, adding a missin
On Mon, Jul 30, 2018 at 11:39 PM Junio C Hamano wrote:
> > + */
> > +void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n)
>
> I'll make this "static" to this file while queuing.
Does that mean the patch is in?
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
R
From: Phillip Wood
The calling code treated NULL as a valid return value, so fix this by
returning and integer and passing in a parameter to receive the author.
Signed-off-by: Phillip Wood
---
sequencer.c | 49 ++---
1 file changed, 26 insertions(+),
From: Phillip Wood
Single quotes should be escaped as \' not \\'. Note that this only
affects authors that contain a single quote and then only external
scripts that read the author script and users whose git is upgraded from
the shell version of rebase -i while rebase was stopped. This is becaus
From: Phillip Wood
These build on Eric's patches. The first patch would be better if it
was integrated into Eric's patches. The second is a rebased version of
my previous patch for fixing quoting in the author script with some
additions by Johannes and rebased on top of Eric's fixes. The special
Hi Eric
On 31/07/18 11:46, Eric Sunshine wrote:
> On Tue, Jul 31, 2018 at 6:06 AM Phillip Wood
> wrote:
>> On 31/07/18 08:33, Eric Sunshine wrote:
>>> Patch 2/4 of this series conflicts with Akinori MUSHA's
>>> 'am/sequencer-author-script-fix' which takes a stab at fixing one of the
>>> four (or
On Tue, Jul 31, 2018 at 6:46 AM Eric Sunshine wrote:
> Anyhow, thanks for reading over the series. I appreciate it even if
> our "sense of priority" doesn't always align (as evidenced by your
> review comments and my responses).
To be clear, the changes you suggest all make sense, and would be
we
As pointed out by SZEDER Gábor, git-rebase.sh wrote to to 'quiet' with
an `echo`:
echo "$GIT_QUIET" > "$state_dir/quiet"
This mean that even if $GIT_QUIET is empty, a newline is written to
quiet. The rewrite of write_basic_state() changed this behaviour, which
could lead to problems. This p
On 7/30/2018 11:39 AM, Ævar Arnfjörð Bjarmason wrote:
> The reason we're in this hole is because we use this
> sha1collisiondetection library to do SHA-1, and the reason we have
> issues with it specifically (not OpenSSL et al) is because its only
> method of detecting endianness is at compile ti
On Mon, Jul 30, 2018 at 05:38:06PM -0400, Eric Sunshine wrote:
> > I wonder if it should look for something like [A-Z][A-Z_]* to catch
> > all of these.
>
> I considered that, but it doesn't handle nested here-docs, which we
> actually have in the test suite. For instance, from t9300-fast-import:
Fix a logic error that's been here since this test was added in
dbfeddb12e ("push: require force for refs under refs/tags/",
2012-11-29).
The intent of this test is to force-create a new tag pointing to
HEAD~, and then assert that pushing it doesn't work without --force.
Instead, the code was not
Remove an invocation of 'git push' that's exactly the same as the one
on the preceding line. This was seemingly added by mistake in
dbfeddb12e ("push: require force for refs under refs/tags/",
2012-11-29) and doesn't affect the result of the test, the second
"push" was a no-op as there was nothing
Improve the tests added in dbfeddb12e ("push: require force for refs
under refs/tags/", 2012-11-29) to assert that the same behavior
applies various other combinations of command-line option and
refspecs.
Supplying either "+" in refspec or "--force" is sufficient to clobber
the reference. With --n
Change "fetch" to treat "+" in refspecs (aka --force) to mean we
should clobber a local tag of the same name.
This changes the long-standing behavior of "fetch" added in
853a3697dc ("[PATCH] Multi-head fetch.", 2005-08-20), before this
change all tag fetches effectively had --force enabled. See th
The test suite only incidentally (and unintentionally) tested for the
current behavior of eager tag clobbering on "fetch". This follow-up to
the previous "push tests: assert re-pushing annotated tags" change
tests for it explicitly.
Signed-off-by: Ævar Arnfjörð Bjarmason
---
t/t5516-fetch-push.s
Change the test that asserts that lightweight tags can only be
clobbered by a force-push to check do the same tests for annotated
tags.
There used to be less exhaustive tests for this with the code added in
40eff17999 ("push: require force for annotated tags", 2012-11-29), but
Junio removed them i
Correct a comment referring to the removal of just the branch to also
refer to the tag. This should have been changed in my
ca3065e7e7 ("fetch tests: add a tag to be deleted to the pruning
tests", 2018-02-09) when the tag deletion was added, but I missed it
at the time.
Signed-off-by: Ævar Arnfjör
There's complex rules governing whether a push is allowed to take
place depending on whether we're pushing to refs/heads/*, refs/tags/*
or refs/not-that/*. See is_branch() in refs.c, and the various
assertions in refs/files-backend.c. (e.g. "trying to write non-commit
object %s to branch '%s'").
T
It should be "is not an empty string" not "is not empty string". This
fixes wording originally introduced in ab9b31386b ("Documentation:
multi-head fetch.", 2005-08-24).
Signed-off-by: Ævar Arnfjörð Bjarmason
---
Documentation/pull-fetch-param.txt | 2 +-
1 file changed, 1 insertion(+), 1 deleti
Calling the test tag "Tag" will make for confusing reading later in
this series when making use of the "git push tag "
feature. Let's call the tag testTag instead.
Changes code initially added in dbfeddb12e ("push: require force for
refs under refs/tags/", 2012-11-29).
Signed-off-by: Ævar Arnfjör
It took me a long time to submit a re-roll for this, but this should
solve all issues noted with v1, see
https://public-inbox.org/git/20180429202100.32353-1-ava...@gmail.com/
for the notes on that.
A range-diff with v1 follows below.
2: a47d861704 ! 1: 77a612e89c push tests: fix logic error i
I think there is an error in the test harness.
On 31 July 2018 at 10:46, SZEDER Gábor wrote:
>> + test_must_fail git-p4 submit --dry-run >errs 2>&1 &&>
>> + ! grep "Would apply" err
It writes to the file "errs" but then looks for the message in "err".
Luke
I hope a I have a "leap forward"
On 7/30/2018 11:39 AM, Ævar Arnfjörð Bjarmason wrote:
> Perhaps it's worth taking a step back here and thinking about whether
> this whole thing is unworkable. It was hard enough to get this to work
> on the combination of Linux, *BSD and Solaris, but I suspect we
At work, we recently updated from a massively old version of git (1.7.10)
to 2.18. There are a few code bases that use subtrees, and they seem to
have completely broke when trying to merge in updates.
I have confirmed that it works correctly in 1.7.10. The 2.18 behavior is
clearly incorrect.
git
On Tue, Jul 31 2018, Michael Felt wrote:
> I hope a I have a "leap forward"
>
>
> On 7/30/2018 11:39 AM, Ævar Arnfjörð Bjarmason wrote:
>> Perhaps it's worth taking a step back here and thinking about whether
>> this whole thing is unworkable. It was hard enough to get this to work
>> on the com
Luke Diamand writes:
> I think there is an error in the test harness.
>
> On 31 July 2018 at 10:46, SZEDER Gábor wrote:
>>> + test_must_fail git-p4 submit --dry-run >errs 2>&1 &&>
>>> + ! grep "Would apply" err
>
> It writes to the file "errs" but then looks for the messa
Han-Wen Nienhuys writes:
> On Mon, Jul 30, 2018 at 11:39 PM Junio C Hamano wrote:
>> > + */
>> > +void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n)
>>
>> I'll make this "static" to this file while queuing.
>
> Does that mean the patch is in?
It depends on your definition
On Mon, Jul 16 2018, Jonathan Tan wrote:
Didn't catch this until this was in next, sorry.
Re-arranged the diff a bit:
> -void fetch_negotiator_init(struct fetch_negotiator *negotiator)
> +void fetch_negotiator_init(struct fetch_negotiator *negotiator,
> +const char *alg
Bisecting around, this might be the commit that introduced the breakage.
https://github.com/git/git/commit/d8febde
I really hope that it hasn't been broken for 5 years and I am just doing
something wrong.
On Tue, Jul 31, 2018 at 10:09 AM George Shammas wrote:
> At work, we recently updated fro
On Tue, Jul 31, 2018 at 09:37:51AM +0200, Ævar Arnfjörð Bjarmason wrote:
>
> On Mon, Jul 30 2018, Han-Wen Nienhuys wrote:
>
>
> > + if (sideband_use_color < 0) {
> > + const char *key = "color.remote";
> > + char *value = NULL;
> > + if (!git_config_get_string(key
Stefan Beller writes:
> It turns out it doesn't quite do that;
> The parsing code takes the old notation into account and translates any
> [V.A]
> r = ...
> into a lower cased "v.a." for ease of comparison. That happens in
> get_base_var, which would call further into get_extended_base_var
Stefan Beller writes:
> On Mon, Jul 30, 2018 at 1:18 PM Junio C Hamano wrote:
>
>> > I already pushed an update to https://github.com/gitgitgadget/git/pull/1.
>>
>> Should I take "pushed to ... GGG" to mean "do not merge what you
>> have to 'next' yet, as there will be an updated series (not
>>
Alban Gruin writes:
> As pointed out by SZEDER Gábor, git-rebase.sh wrote to to 'quiet' with
> an `echo`:
>
> echo "$GIT_QUIET" > "$state_dir/quiet"
>
> This mean that even if $GIT_QUIET is empty, a newline is written to
> quiet. The rewrite of write_basic_state() changed this behaviour, whi
On Mon, Jul 30, 2018 at 8:10 PM Ben Peart wrote:
> I ran "git checkout" on a large repo and averaged the results of 3 runs.
> This clearly demonstrates the benefit of the optimized unpack_trees()
> as even the final "diff-index" is essentially a 3rd call to unpack_trees().
>
> baselinene
On Tue, Jul 31, 2018 at 11:03:17AM -0400, George Shammas wrote:
> Bisecting around, this might be the commit that introduced the breakage.
>
> https://github.com/git/git/commit/d8febde
>
> I really hope that it hasn't been broken for 5 years and I am just doing
> something wrong.
Unfortunately,
George Shammas writes:
> Bisecting around, this might be the commit that introduced the breakage.
>
> https://github.com/git/git/commit/d8febde
Interesting. I've never used the "-s subtree" strategy without
"-Xsubtree=..." to explicitly tell where the thing should go for a
long time, so I am no
While debugging this, I did try -X subtree=src/ however the effect was the
same.
On Tue, Jul 31, 2018 at 11:53 AM Junio C Hamano wrote:
> George Shammas writes:
>
> > Bisecting around, this might be the commit that introduced the breakage.
> >
> > https://github.com/git/git/commit/d8febde
>
> I
Hi Junio,
Le 31/07/2018 à 17:23, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> As pointed out by SZEDER Gábor, git-rebase.sh wrote to to 'quiet' with
>> an `echo`:
>>
>> echo "$GIT_QUIET" > "$state_dir/quiet"
>>
>> This mean that even if $GIT_QUIET is empty, a newline is written to
>>
On 07/30, brian m. carlson wrote:
> On Mon, Jul 30, 2018 at 10:50:51AM -0700, Brandon Williams wrote:
> > On 07/29, brian m. carlson wrote:
> > > The object ID parsing machinery is aware of "@" as a synonym for "HEAD"
> > > and this is documented accordingly in gitrevisions(7). The push
> > > docu
Alban Gruin writes:
>> Hmph, from reading your other message
>>
>>
>> https://public-inbox.org/git/dce8c99b-51e9-4ed1-8ae4-28049cb6e...@gmail.com/
>>
>> I got an impression that a rerolled version is coming anyway. Is
>> this fix so urgent that it needs tobe squashed in in the meantime
>> a
Jeff King writes:
> The problem introduced in that commit is that each iteration through the
> loop advances the tree pointers.
Ah, indeed.
The original used tree_entry_extract() and update_tree_entry()
separately, but the update does tree_entry() on both sides.
> So the assertion in that co
On Mon, Jul 30, 2018 at 10:40 AM, Stefan Beller wrote:
> On Mon, Jul 30, 2018 at 9:00 AM Nguyễn Thái Ngọc Duy
> wrote:
>>
>> One of the things I notice when watching a normal git user face a
>> merge conflicts is the output is very verbose (especially when there
>> are multiple conflicts) and it
On Fri, Jul 27, 2018 at 5:59 AM, Ben Peart wrote:
> Sending this update as Elijah is on vacation. This only updates the test
> case based on feedback from the list.
Thanks! One less thing for me to catch up on. :-)
On Tue, Jul 31, 2018 at 08:53:23AM -0700, Junio C Hamano wrote:
> George Shammas writes:
>
> > Bisecting around, this might be the commit that introduced the breakage.
> >
> > https://github.com/git/git/commit/d8febde
>
> Interesting. I've never used the "-s subtree" strategy without
> "-Xsubt
On Tue, Jul 31, 2018 at 2:41 AM Stefan Beller wrote:
> > Taking a step back, was there anything that prompted these patches?
>
> I am flailing around on how to approach the ref store and the repository:
> * I dislike having to pass a repository 'r' twice. (current situation after
> patch 1. That
I'm testing origin/next on Windows with a few other topics on top.
The first test fails like this. Do you see what is wrong?
Where should I start looking? Is it perhaps that upload-pack
is responding too soon so that fetch does not send 'have c1'?
this is the console output
...(truncated)...
On 7/31/2018 11:31 AM, Duy Nguyen wrote:
On Mon, Jul 30, 2018 at 8:10 PM Ben Peart wrote:
I ran "git checkout" on a large repo and averaged the results of 3 runs.
This clearly demonstrates the benefit of the optimized unpack_trees()
as even the final "diff-index" is essentially a 3rd call
Stefan Beller writes:
>> I wonder though if all those changes to the testsuite shouldn't be
>> merged.
>
> I think Stolee doesn't want this to be merged after rereading
> subject and the commit message.
Yes, I understand that, and for the most part I agree with it. This
commit main purpose is t
From: Ben Peart
Skip merging the commit, updating the index and working directory if and
only if we are creating a new branch via "git checkout -b ."
Any other checkout options will still go through the former code path.
If sparse_checkout is on, require the user to manually opt in to this
opti
This patch series fixes several "recovery" commands that outright fail
or do not fully recover when directory-file conflicts are present.
This includes:
* git read-tree --reset HEAD
* git am --skip
* git am --abort
* git merge --abort (or git reset --merge)
* git reset --hard
Change
Several "recovery" commands outright fail or do not fully recover
when directory-file conflicts are present. This includes:
* git read-tree --reset HEAD
* git am --skip
* git am --abort
* git merge --abort
* git reset --hard
Add testcases documenting these shortcomings.
Signed-off-by:
read_index_unmerged() has two intended purposes:
* return 1 if there are any unmerged entries, 0 otherwise
* drops any higher-stage entries down to stage #0
There are several callers of read_index_unmerged() that check the return
value to see if it is non-zero, all of which then die() if that
Jeff King writes:
> +...
> + } else if (cmp > 0) {
> /* path2 does not appear in one */
> + score += score_missing(two.entry.mode, two.entry.path);
> + update_tree_entry(&two);
> + continue;
> +
Should git notes show up in a range-diff? I happened to have
notes.displayref=refs/notes/amlog
set in my git.git repo, and saw the below in my range-diff:
On Tue, Jul 31, 2018 at 10:12 AM, Elijah Newren wrote:
> 1: 4a1c9c3368 ! 1: 00f94a8b41 t1015: demonstrate directory/file conflict
> re
On Tue, Jul 31, 2018 at 10:17:15AM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > +...
> > + } else if (cmp > 0) {
> > /* path2 does not appear in one */
> > + score += score_missing(two.entry.mode, two.entry.path);
> > +
Junio C Hamano writes:
> As the number of his or her own topics each contributor needs to
> keep track of by definition is the number of all topics I need to
s/is the/is smaller than the/;
Sorry for the noise X-<.
> take care of, I do not want to have to keep track of things myself
> more than
On 7/31/2018 12:50 PM, Ben Peart wrote:
On 7/31/2018 11:31 AM, Duy Nguyen wrote:
In the performance game of whack-a-mole, that call to repair cache-tree
is now looking quite expensive...
Yeah and I think we can whack that mole too. I did some measurement.
Best case possible, we just n
---
config.h | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/config.h b/config.h
index b95bb7649..d39256eb1 100644
--- a/config.h
+++ b/config.h
@@ -178,10 +178,16 @@ struct config_set {
};
extern void git_configset_init(struct config_set *cs);
-extern int git_co
The highlighting is done on the client-side. Supported keywords are
"error", "warning", "hint" and "success".
The colorization is controlled with the config setting "color.remote".
Co-authored-by: Duy Nguyen
Signed-off-by: Han-Wen Nienhuys
---
Documentation/config.txt| 9 +++
hel
squash in Duy's patch
Han-Wen Nienhuys (2):
Document git config getter return value.
Highlight keywords in remote sideband output.
Documentation/config.txt| 9 +++
config.h| 10 ++-
help.c | 1 +
help.h
On Wed, Jul 18, 2018 at 8:22 AM, Derrick Stolee wrote:
> The following test fails because the repo has ambiguous merge-bases, and
> the commit-graph changes the walk order so we select a different one.
> This alters the resulting merge from the expected result.
>
> t6024-recursive-merge.sh, Test 4
Ævar Arnfjörð Bjarmason writes:
> The is often the name of the branch you would want to push, but
> -it can be any arbitrary "SHA-1 expression", such as `master~4` or
> -`HEAD` (see linkgit:gitrevisions[7]).
> +it can be any arbitrary expression to a commit, such as `master~4` or
> +`HEAD` (se
Ævar Arnfjörð Bjarmason writes:
> The test suite only incidentally (and unintentionally) tested for the
> current behavior of eager tag clobbering on "fetch". This follow-up to
> the previous "push tests: assert re-pushing annotated tags" change
> tests for it explicitly.
>
> Signed-off-by: Ævar
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
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
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
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
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
This patch series rewrite the interactive rebase from shell to C.
It is based on ffc6fa0e39 ("Fourth batch for 2.19 cycle", 2018-07-24).
The v4 was based on b7bd9486 ("Third batch for 2.19 cycle", 2018-07-18).
I wanted to make sure my series works well with 'bb/pedantic',
'jk/empty-pick-fix', and
This makes rebase_path_todo(), get_missing_commit_check_level() and the
enum check_level accessible outside sequencer.c, renames check_level to
missing_commit_check_level, and prefixes its value names by
MISSING_COMMIT_ to avoid namespace pollution.
This function and this enum will eventually be m
This removes the modes `--skip-unnecessary-picks`, `--append-todo-help`,
and `--checkout-onto` from rebase--helper.c, the functions of
git-rebase--interactive.sh that were rendered useless by the rewrite of
complete_action(), and append_todo_help_to_file() from
rebase-interactive.c.
skip_unnecessa
This rewrites complete_action() from shell to C.
A new mode is added to rebase--helper (`--complete-action`), as well as
a new flag (`--autosquash`).
Finally, complete_action() is stripped from git-rebase--interactive.sh.
The original complete_action() would return the code 2 when the todo
list
This refactors append_todo_help() to write its message to a buffer
instead of the todo-list. This is needed for the rewrite of
complete_action(), which will come after the next commit.
As rebase--helper still needs the file manipulation part of
append_todo_help(), it is extracted to a temporary f
If the todo list generated by `--make-script` is empty,
complete_action() writes a noop, but if it has only commented-out
commands, it will abort with the message "Nothing to do", and does not
launch the editor. This adds a new test to ensure that
complete_action() behaves this way.
Signed-off-by
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
---
No changes since v4.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a struct object_id, as the rewrite of complete_action()
(to come in the next commit) will need it.
rebase--helper then is modified to fit this change.
Signed-off-by: Alban Gruin
---
No changes since v4.
built
This rewrites write_basic_state() from git-rebase.sh in C. This is the
first step in the conversion of init_basic_state(), hence the mode in
rebase--helper.c is called INIT_BASIC_STATE. init_basic_state() will be
converted in the next commit.
The part of read_strategy_opts() that parses the stat
This rewrites the part of interactive rebase which initializes the
basic state, make the script and complete the action, as a buitin, named
git-rebase--interactive2 for now. Others modes (`--continue`,
`--edit-todo`, etc.) will be rewritten in the next commit.
git-rebase--interactive.sh is modifi
This removes git-rebase--interactive.sh, as its functionnality has been
replaced by git-rebase--interactive2.
git-rebase--interactive2.c is then renamed to git-rebase--interactive.c.
Signed-off-by: Alban Gruin
---
No changes since v4.
.gitignore| 1 -
Makef
This rewrites the submodes of interactive rebase (`--continue`,
`--skip`, `--edit-todo`, and `--show-current-patch`) in C.
git-rebase.sh is then modified to call directly git-rebase--interactive2
instead of git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
No changes since v4.
builtin
This rewrites init_basic_state() from shell to C. The call to
write_basic_state() in cmd_rebase__helper() is replaced by a call to the
new function.
The shell version is then stripped from git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
No changes since v4.
builtin/rebase--helper.c
This rewrites the part of init_revisions_and_shortrevisions() needed by
`--make-script` from shell to C. The new version is called
get_revision_ranges(), and is a static function inside of
rebase--helper.c. As this does not initialize $shortrevision, the
original shell version is not yet stripped
1 - 100 of 154 matches
Mail list logo