Signed-off-by: Elijah Newren
---
t/t7406-submodule-update.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 24aa732312..815b60cb59 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@
A test making use of test_must_fail was failing like this:
fatal: ambiguous argument '|': unknown revision or path not in the working
tree.
when the intent was to verify that a specific string was not found
in the output of the git diff command, i.e. that grep returned
non-zero. Fix the test
When a git command is on the left side of a pipe, the pipe will swallow
its exit status, preventing us from detecting failures in said commands.
Restructure the tests to put the output in a temporary file to avoid
this problem.
Signed-off-by: Elijah Newren
---
t/t7406-submodule-update.sh | 26
test -e, test -s, etc. do not provide nice error messages when we hit
test failures, so use the test_* helper functions from
test-lib-functions.sh.
Also, add test_path_exists() to test-lib-function.sh while at it, so
that we don't need to worry whether submodule/.git is a file or a
directory. It
We can get rid of some quoted tabs and make a few tests slightly easier
to read and edit by just asking for the names of the files modified,
since that's all these tests were interested in anyway.
Signed-off-by: Elijah Newren
---
t/t7406-submodule-update.sh | 10 +-
1 file changed, 5
line-log.[ch] use left-closed, right-open interval logic. Update
comments and debug output to use square brackets+parentheses notation
to help developers avoid off-by-one errors.
Signed-off-by: Andrei Rybak
---
Applies on top of c0babbe69 (range-set: publish API for re-use by
git-blame -L,
Jeff King writes:
> I think that the for_each_packed_object() interface should visit items
> in pack order.
Yeah, that may make more sense. Any order is more logical than the
object name order (which by definition is random, so useful only
when you want them in a random order), and pack order
"jrnieder" wrote:
> (+cc: some folks interested in git-remote-mediawiki)
Thanks.
In case it still matters, an obvious Acked-by: Matthieu Moy
--
Matthieu Moy
"Johannes Schindelin via GitGitGadget"
writes:
> I stumbled over the one in git-compat-util.h while working on an unrelated
> bug fix, and then got curious whether there are other places where we use
> save instead of safe, too. Turns out we do not, but there was another
> grammar error where a
On Wed, Aug 08, 2018 at 10:30:11AM -0400, Paul Smith wrote:
> I recently upgraded from Git 2.9.2 to 2.18.0 (note, I have no
> particular reason to believe this is related just passing info). I'm
> running on Linux (64bit Ubuntu 18.04.1 but I've compiled Git myself
> from source, I'm not using
On 08/08/18 16:17, Alban Gruin wrote:
Hi Phillip,
Le 07/08/2018 à 16:00, Phillip Wood a écrit :
On 31/07/18 18:59, Alban Gruin wrote:
+
+int edit_todo_list(unsigned flags)
+{
+ struct strbuf buf = STRBUF_INIT;
+ const char *todo_file = rebase_path_todo();
+ FILE *todo;
+
+
(not really a review, this patch just happens to catch my eyes)
On Wed, Aug 8, 2018 at 3:55 PM Pratik Karki wrote:
>
> This commit adds support for `switch-to` which is used to switch to the
> target branch if needed. The equivalent codes found in shell script
> `git-legacy-rebase.sh` is
Eric Sunshine writes:
> What does concern me is that read_env_script() doesn't seem to care
> about such a malformed file; it doesn't do any validation at all.
> Contrast that with read_author_ident() which is pretty strict about
> the content it expects to find in the file. So, it might make
Hi Alban
On 08/08/18 16:16, Alban Gruin wrote:
Hi Phillip,
Le 07/08/2018 à 15:57, Phillip Wood a écrit :
+ if (ret < 0)
+ error_errno(_("could not append help text to '%s'"),
rebase_path_todo());
+
+ fclose(todo);
You should definitely check the return value and
Since, all the conversion of shell script version of `git rebase` is done
as can be seen from the previous patch series, now we can default to the
builtin one. The builtin rebase can now handle every task done by the
original shell script `git rebase`. So, in this patch series, we turn the
builtin
Now that the builtin rebase is feature-complete, we should use it by
default. Let's keep the legacy scripted version around for the time
being; Once the builtin rebase is well-tested enough, we can remove
`git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 2 +-
1 file
On Tue, Aug 07, 2018 at 04:23:04PM -0700, Jonathan Tan wrote:
> > Do we already have an access to the in-core reverse index for the
> > pack at this point in the code?
>
> As far as I can tell, no. These patches construct the list of promisor
> objects in repack.c (which does not use the
Some options are only handled by the git-rebase--interactive backend,
even if run non-interactively. For this awkward situation (run
non-interactively, but use the interactive backend), the shell scripted
version of `git rebase` introduced the concept of an "implied
interactive rebase". All it
When trying to rebase onto a direct descendant of HEAD, we can
take a shortcut and fast-forward instead. This commit makes it so.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
The `git rebase` command, when called without the ``
command-line argument, automatically looks for the upstream
branch configured for the current branch.
With this commit, the builtin rebase learned that trick, too.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 44
While working on the GSoC project to convert the rebase command to a
builtin, the rebase command learned to error out on certain command-line
option combinations that cannot work, such as --whitespace=fix with
--interactive.
This commit converts that code.
Signed-off-by: Pratik Karki
---
This patch pretty much converts all what is remaining from the shell-script
version of `git rebase` to the builtin version. After the conversion of
actions and different options which are important for builtin rebase and have
been organized to make a patch series of their own. There were still
In this commit, we pass `--progress` to the `format-patch` command if
stderr is connected to an interactive terminal, unless we're in quiet
mode.
This `--progress` option will be used in `format-patch` to show progress
reports on stderr as patches are generated.
Signed-off-by: Pratik Karki
---
In the next patch, we will make use of that in the code that
fast-forwards to `onto` whenever possible.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 33 +
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
This commit adds support for `--fork-point` and `--no-fork-point`.
This is converted as-is from `git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
The mode to rebase non-linear branches is now supported by the builtin
rebase, too.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index dfb1e6c25b..0b94d2daaa 100644
---
When running a rebase in non-am mode, it uses the recursive merge to
cherry-pick the commits, and the rebase command allows to configure
the merge strategy to be used in this operation.
This commit adds that support to the builtin rebase.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 57
We need this functionality in the builtin rebase.
Note: to make this function truly reusable, we have to switch the call
get_merges_many_dirty() to get_merges_many() because we want the commit
flags to be reset (otherwise, subsequent get_merge_bases() calls would
obtain incorrect results). This
This option allows to rebase entire histories up to, and including, the
root commit.
The conversion from the shell script is straight-forward, apart from
the fact that we do not have to write an empty tree in C.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 31
This commit introduces the `--allow-empty-message` option to
`builtin/rebase.c`. The motivation behind this option is: if there are
empty messages (which is not allowed in Git by default, but can be
imported from different version control systems), the rebase will fail.
Using
To support `--autostash` we introduce a function `apply_autostash()`
just like in `git-legacy-rebase.sh`.
Rather than refactoring and using the same function that exists in
`sequencer.c`, we go a different route here, to avoid clashes with
the sister GSoC project that turns the interactive rebase
This commit adds support for the `--exec` option which takes a shell
command-line as argument. This argument will be appended as an `exec
` command after each line in the todo list that creates a commit in
the final history. commands.
Note: while the shell script version of `git rebase` assigned
This commit introduces support for `--gpg-sign` option which is used
to GPG-sign commits.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 79ba65fd75..cd9caf4841 100644
---
This commit converts more code from the shell script version to the
builtin rebase. In this instance, we just have to be careful to
keep support for passing multiple `--whitespace` options, as the
shell script version does so, too.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 23
This commit adds support for the `--autosquash` option which is used to
automatically squash the commits marked as `squash` or `fixup` in their
messages. This is converted following `git-legacy-rebase.sh` closely.
This option can also be configured via the Git config setting
rebase.autosquash. To
The `--keep-empty` option can be used to keep the commits that do not
change anything from its parents in the result.
While the scripted version uses `interactive_rebase=implied` to indicate
that the rebase needs to use the `git-rebase--interactive` backend in
non-interactive mode as fallback
This commit adds support for the `--ignore-whitespace` option
of the rebase command. This option is simply passed to the
`--am` backend.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
This option is simply handed down to `git am` by way of setting the
`git_am_opt` variable that is handled by the `git-rebase--am` backend.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
This commit adds support for `--signoff` which is used to add a
`Signed-off-by` trailer to all the rebased commits. The actual
handling is left to the rebase backends.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 17 +
1 file changed, 17 insertions(+)
diff --git
With this commit the builtin rebase supports selecting the "rebase
backends" (or "type") `interactive`, `preserve-merges`, and `merge`.
The `state_dir` was already handled according to the rebase type in a
previous commit.
Note that there is one quirk in the shell script: `--interactive`
I recently upgraded from Git 2.9.2 to 2.18.0 (note, I have no
particular reason to believe this is related just passing info). I'm
running on Linux (64bit Ubuntu 18.04.1 but I've compiled Git myself
from source, I'm not using the distro version).
I have a local repository I've been using for
The `--rerere-autoupdate` option allows rerere to update the index with
resolved conflicts. This commit follows closely the equivalent part of
`git-legacy-rebase.sh`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 25 +
1 file changed, 25 insertions(+)
diff --git
This commit adds support for `--ignore-date` which is passed to `git am`
to easily change the dates of the rebased commits.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 8
1 file changed, 8 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
This patch series completes the support for all rebase options in the
builtin rebase. This converts the remaining command-line options.
The previous patch series taught the builtin rebase to handle different
actions, this patch series will continue adding functionality to
builtin rebase by
Hi Phillip,
Le 07/08/2018 à 16:00, Phillip Wood a écrit :
> On 31/07/18 18:59, Alban Gruin wrote:
>> +
>> +int edit_todo_list(unsigned flags)
>> +{
>> +struct strbuf buf = STRBUF_INIT;
>> +const char *todo_file = rebase_path_todo();
>> +FILE *todo;
>> +
>> +if (strbuf_read_file(,
Hi Phillip,
Le 07/08/2018 à 15:57, Phillip Wood a écrit :
>> +if (ret < 0)
>> +error_errno(_("could not append help text to '%s'"),
>> rebase_path_todo());
>> +
>> +fclose(todo);
>
> You should definitely check the return value and return an error if
> appropriate as fputs()
On Tue, Aug 07, 2018 at 08:58:51PM -0700, Brady Trainor wrote:
> If I am reading the git book or manual (https://git-scm.com/), and zoom
> in, and/or have browser sized to a fraction of the screen, I cannot see
> all the text, and have to horizontally scroll back and forth to read at
> that zoom.
This commit checks for the file `applying` used by `git am` in
`rebase-apply/` and if the file is present it means `git am` is in
progress so it errors out.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/builtin/rebase.c
This commit prevents actions (such as --continue, --skip) from running
when there is no rebase in progress.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e3dd2f511e..1344e071f3 100644
---
While these sub-commands are very different in spirit, their
implementation is almost identical, so we convert them in one go.
And since those are the last sub-commands that needed to be converted,
now we can also turn that `default:` case into a bug (because we should
now handle all the
This commit adds the option `--continue` which is used to resume
rebase after merge conflicts. The code tries to stay as close to
the equivalent shell scripts found in `git-legacy-rebase.sh` as
possible.
When continuing a rebase, the state variables are read from state_dir.
Some of the state
The previous patch series implemented essential options and neccessary
configurations. This patch series teaches all the rebase actions like
`--continue`, `--skip`, `--abort`, et al. to builtin rebase.
These actions are important to operation of `git rebase` hence, are kept
in a patch series of
This commit teaches the builtin rebase the "abort" action, which a user
can call to roll back a rebase that is in progress.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 20
1 file changed, 20 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index
This commit adds the option `--skip` which is used to restart
rebase after skipping the current patch.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 10da4c978b..7a903838b1 100644
With this patch, the builtin rebase handles the `--quit` action which
can be used to abort a rebase without rolling back any changes performed
during the rebase (this is useful when a user forgot that they were in
the middle of a rebase and continued working normally).
Signed-off-by: Pratik Karki
When running a rebase on a detached HEAD, we currently store the string
"detached HEAD" in options.head_name. That is a faithful translation of
the shell script version, and we still kind of need it for the purposes of
the scripted backends.
It is poor style for C, though, where we would really
To run a new rebase, there needs to be a check to assure that no other
rebase is in progress. New rebase operation cannot start until an
ongoing rebase operation completes or is terminated.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 48 +++-
1
This commit adds support for `switch-to` which is used to switch to the
target branch if needed. The equivalent codes found in shell script
`git-legacy-rebase.sh` is converted to builtin `rebase.c`.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 48
In this commit, we add support to fast forward.
Note: we will need the merge base later, therefore the call to
can_fast_forward() really needs to be the first one when testing whether
we can skip the rebase entirely (otherwise, it would make more sense to
skip the possibly expensive operation if,
In this commit, we add support to `--force-rebase` option. The
equivalent part of the shell script found in `git-legacy-rebase.sh` is
converted as faithfully as possible to C.
The --force-rebase option ensures that the rebase does not simply
fast-forward even if it could.
Signed-off-by: Pratik
This patch series provides the bare minimum to run more than the trivial
rebase (i.e. `git rebase `).
Here, I have implemented essential options needed to make this a
builtin rebase. Ofcourse, to accomplish the task of builtin rebase, I had to
do essential optimizations and add certain shield
This commit introduces support for the `-v` and `--stat` options of
rebase.
The --stat option can also be configured via the Git config setting
rebase.stat. To support this, we also add a custom rebase_config()
function in this commit that will be used instead of (and falls back to
calling)
This commit implements support for an --onto argument that is actually a
"symmetric range" i.e. `...`.
The equivalent shell script version of the code offers two different
error messages for the cases where there is no merge base vs more than
one merge base. Though following the similar approach
The `--onto` option is important, as it allows to rebase a range of
commits onto a different base commit (which gave the command its odd
name: "rebase").
This commit introduces options parsing so that different options can
be added in future commits.
Note: As this commit introduces to the
This commit reads the index of the repository for rebase and checks
whether the repository is ready for rebase.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 2d3f1d65fb..afef0b0046
This commit converts the equivalent part of the shell script
`git-legacy-rebase.sh` to run the pre-rebase hook (unless disabled), and
to interrupt the rebase with error if the hook fails.
Signed-off-by: Pratik Karki
---
builtin/rebase.c | 11 +++
1 file changed, 11 insertions(+)
diff
This commit introduces a rebase option `--quiet`. While `--quiet` is
commonly perceived as opposite to `--verbose`, this is not the case for
the rebase command: both `--quiet` and `--verbose` default to `false` if
neither `--quiet` nor `--verbose` is present.
This commit goes further and
On Tue, Aug 7, 2018 at 11:01 PM Junio C Hamano wrote:
>
> Han-Wen Nienhuys writes:
>
> > Fix nits; remove debug printf.
> >
> > Han-Wen Nienhuys (1):
> > sideband: highlight keywords in remote sideband output
> >
> > Documentation/config.txt| 12 +++
> > help.c
Hi Stefan,
On Mon, 23 Jul 2018, Stefan Beller wrote:
> On Sat, Jul 21, 2018 at 3:04 PM Johannes Schindelin via GitGitGadget
> wrote:
>
> > 1: 39272eefc ! 1: f7e70689e linear-assignment: a function to solve
> > least-cost assignment problems
> > @@ -223,9 +223,7 @@
> > +
From: Johannes Schindelin
The words "save" and "safe" are both very wonderful words, each with
their own set of meanings. Let's not confuse them with one another save
on occasion of a pun.
Signed-off-by: Johannes Schindelin
---
git-compat-util.h | 2 +-
1 file changed, 1 insertion(+), 1
I stumbled over the one in git-compat-util.h while working on an unrelated
bug fix, and then got curious whether there are other places where we use
save instead of safe, too. Turns out we do not, but there was another
grammar error where a spurious . interrupted a sentence.
Johannes Schindelin
From: Johannes Schindelin
We should not interrupt. sentences in the middle.
Signed-off-by: Johannes Schindelin
---
remote-curl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/remote-curl.c b/remote-curl.c
index 99b0bedc6..fb28309e8 100644
--- a/remote-curl.c
+++
On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood wrote:
> I've updated these based on Eric's suggestions, hopefully they're good
> to go now. Thanks Eric for you help.
Thanks, I left a few comments on patch 2/2. Aside from the '>' vs.
'>=' issue (over which I lost more than a few minutes cogitating),
On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood wrote:
> Check for a NULL return value from read_author_ident() that indicates
> an error. Previously the NULL author was passed to commit_tree() which
> would then fallback to using the default author when creating the new
> commit. This changed the
On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood wrote:
> Single quotes should be escaped as \' not \\'. The bad quoting breaks
> the interactive version of 'rebase --root' (which is used when there
> is no '--onto' even if the user does not specify --interactive) for
> authors that contain "'" as
Junio thanks for the tip! Your suggestion definitely looks better.
BTW. I apologize for polluting the git mailing list with the recent
email. I am still new to git-send-email.
On Fedora-derived systems, the apache httpd package installs modules
under /usr/lib{,64}/httpd/modules, depending on whether the system is
32- or 64-bit. A symlink from /etc/httpd/modules is created which
points to the proper module path. Use it to support apache on Fedora,
CentOS, and Red Hat
On Tue, Aug 7, 2018 at 9:54 AM Phillip Wood wrote:
> On 07/08/18 11:23, Eric Sunshine wrote:
> > On Tue, Aug 7, 2018 at 5:35 AM Phillip Wood
> > wrote:
> >> + if (n > 0 && s[n] != '\'')
> >> + return 1;
> >
> > To be "technically correct", I think the condition in the 'if'
>
AH00136: Server MUST relinquish startup privileges before accepting connections.
Please ensure mod_unixd or other system security module is loaded.
Signed-off-by: Sebastian Kisela
---
git-instaweb.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-instaweb.sh
On Tue, Aug 7, 2018 at 11:59 PM Brady Trainor wrote:
> If I am reading the git book or manual (https://git-scm.com/), and zoom
> in, and/or have browser sized to a fraction of the screen, I cannot see
> all the text, and have to horizontally scroll back and forth to read at
> that zoom.
>
> Can
Thanks for the submission. A few comments below...
On Wed, Aug 8, 2018 at 2:48 AM Nicholas Guriev wrote:
> This short option saves the number of keys to press for the
> typically git-status command.
> ---
Your sign-off is missing. See Documentation/SubmittingPatches.
It's clear that a short
This short option saves the number of keys to press for the
typically git-status command.
---
I already sent the patch here, but it doesn't seem reached to the
list. So I send the email (now with DKIM) again and apologize if you
get this twice.
builtin/commit.c | 2 +-
1 file changed, 1
101 - 182 of 182 matches
Mail list logo