Re: [PATCH 1/1] pull --rebase=: allow single-letter abbreviations for the type

2018-08-08 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> -else if (!strcmp(value, "preserve")) >> +else if (!strcmp(value, "preserve") || !strcmp(value, "p")) >> return REBASE_PRESERVE; >> -else if (!strcmp(value, "merges")) >> +else if (!strcmp(value, "merges") || !strcmp(value, "m")) >>

Re: [GSoC][PATCH v7 05/26] stash: convert apply to builtin

2018-08-08 Thread Junio C Hamano
Paul-Sebastian Ungureanu writes: > From: Joel Teichroeb > > Add a builtin helper for performing stash commands. Converting > all at once proved hard to review, so starting with just apply > lets conversion get started without the other commands being > finished. > > The helper is being

Re: Help with "fatal: unable to read ...." error during GC?

2018-08-08 Thread Paul Smith
On Wed, 2018-08-08 at 14:24 -0400, Jeff King wrote: > Let's narrow it down first and make sure we're dying where I expect. > Can > you try: > > GIT_TRACE=1 git gc > > and confirm the program running when the fatal error is produced? > > From what you've shown it's going to be git-repack, but

[PATCH v2 2/2] repack: repack promisor objects if -a or -A is set

2018-08-08 Thread Jonathan Tan
Currently, repack does not touch promisor packfiles at all, potentially causing the performance of repositories that have many such packfiles to drop. Therefore, repack all promisor objects if invoked with -a or -A. This is done by an additional invocation of pack-objects on all promisor objects

[PATCH v2 0/2] Repacking of promisor packfiles

2018-08-08 Thread Jonathan Tan
Changes from v1: - add NEEDSWORK stating that input to pack-objects could be removed - run pack-objects to repack promisor objects only if there is at least one of them - this exposed a possible bug where the later part of cmd_repack() requires a correct packed_git (this was mostly noticed

[PATCH v2 1/2] repack: refactor setup of pack-objects cmd

2018-08-08 Thread Jonathan Tan
A subsequent patch will teach repack to run pack-objects with some same and some different arguments if repacking of promisor objects is required. Refactor the setup of the pack-objects cmd so that setting up the arguments common to both is done in a function. Signed-off-by: Jonathan Tan ---

[RFC PATCH] packfile: iterate packed objects in pack order

2018-08-08 Thread Jonathan Tan
Many invocations of for_each_object_in_pack() and for_each_packed_object() (which invokes the former) subsequently check at least the type of the packed object, necessitating accessing the packfile itself. For locality reasons, it is thus better to iterate in pack order, instead of index order.

Re: [PATCH 1/1] verify-tag/verify-commit should exit unsuccessfully when signature is not trusted

2018-08-08 Thread brian m. carlson
On Wed, Aug 08, 2018 at 07:04:56PM -0400, Jeff King wrote: > On Sat, Aug 04, 2018 at 10:43:46AM +0200, Karel Kočí wrote: > > I have a solution for my problem (calling git verify-* twice and grep). > > That is > > not the point of this email nor this contribution. The point is that > > although >

Re: [PATCH 1/1] verify-tag/verify-commit should exit unsuccessfully when signature is not trusted

2018-08-08 Thread Junio C Hamano
"brian m. carlson" writes: >> FWIW, I'm on board with returning non-zero in any case where gpg would. > > I think that's probably the best solution overall. FWIW, I am not married to the current behaviour. I would not be surprised if it mostly came by accident and not designed. > There's a

Re: [PATCH] git-update-index.txt: reword possibly confusing example

2018-08-08 Thread Junio C Hamano
Elijah Newren writes: > The following phrase could be interpreted multiple ways: > "To pretend you have a file with mode and sha1 at path" > > In particular, I can think of two: > 1. Pretend we have some new file, which happens to have a given mode > and sha1 > 2. Pretend one of the

Re: [PATCH 1/2] submodule: create helper to build paths to submodule gitdirs

2018-08-08 Thread Stefan Beller
On Wed, Aug 8, 2018 at 3:33 PM Brandon Williams wrote: > > Introduce a helper function "submodule_name_to_gitdir()" (and the > submodule--helper subcommand "gitdir") which constructs a path to a > submodule's gitdir, located in the provided repository's "modules" > directory. Makes sense. > >

Re: [PATCH 0/5] chainlint: improve robustness against "unusual" shell coding

2018-08-08 Thread Junio C Hamano
Jeff King writes: > I had two minor comments on the first patch. I'll admit my eyes glazed > over looking at the rest of them, and to make any kind of intelligent > review I'd need to spend an hour understanding how the sed script works. > Which frankly, I'm not sure is worth it. Didn't I make

Re: [PATCH v2] clone: report duplicate entries on case-insensitive filesystems

2018-08-08 Thread Jeff Hostetler
On 8/7/2018 3:31 PM, Junio C Hamano wrote: Nguyễn Thái Ngọc Duy writes: One nice thing about this is we don't need platform specific code for detecting the duplicate entries. I think ce_match_stat() works even on Windows. And it's now equally expensive on all platforms :D

Re: [PATCH] update-index: there no longer is `apply --index-info`

2018-08-08 Thread Jeff King
On Wed, Aug 08, 2018 at 02:35:18PM -0700, Junio C Hamano wrote: > Back when we removed `git apply --index-info` in 2007, we forgot to > adjust the documentation for update-index that reads its output. > > Let's reorder the description of three formats to present the other > two formats that are

Re: What's cooking in git.git (Aug 2018, #02; Mon, 6)

2018-08-08 Thread Junio C Hamano
Junio C Hamano writes: > Hmph, it came from this message (most headers omitted) > > To: =?iso-8859-1?Q?=C6var_Arnfj=F6r=F0?= Bjarmason > Message-ID: <20180804085247.ge55...@aiede.svl.corp.google.com> > Content-Type: text/plain; charset=iso-8859-1 > Content-Disposition:

[PATCH 07/10] submodule: move global changed_submodule_names into fetch submodule struct

2018-08-08 Thread Stefan Beller
The `changed_submodule_names` are only used for fetching, so let's make it part of the struct that is passed around for fetching submodules. Signed-off-by: Stefan Beller --- submodule.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff

[PATCH 08/10] submodule.c: do not copy around submodule list

2018-08-08 Thread Stefan Beller
'calculate_changed_submodule_paths' uses a local list to compute the changed submodules, and then produces the result by copying appropriate items into the result list. Instead use the result list directly and prune items afterwards using string_list_remove_empty_items. As a side effect, we'll

[PATCH 03/10] sha1-array: provide oid_array_remove_if

2018-08-08 Thread Stefan Beller
Signed-off-by: Stefan Beller --- sha1-array.c | 39 +++ sha1-array.h | 3 +++ 2 files changed, 42 insertions(+) diff --git a/sha1-array.c b/sha1-array.c index 265941fbf40..10eb08b425e 100644 --- a/sha1-array.c +++ b/sha1-array.c @@ -77,3 +77,42 @@ int

[PATCH 06/10] submodule.c: sort changed_submodule_names before searching it

2018-08-08 Thread Stefan Beller
Instead of sorting it after we created an unsorted list, we could insert correctly into the list. As the unsorted append is in order of cache entry names, this is already sorted if names were equal to paths for submodules. As submodule names are often the same as their path, the input is sorted

[PATCH 05/10] submodule.c: fix indentation

2018-08-08 Thread Stefan Beller
The submodule subsystem is really bad at staying within 80 characters. Fix it while we are here. Signed-off-by: Stefan Beller --- submodule.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index 5b4e5227d90..bceeba13217 100644 ---

[PATCH 04/10] submodule.c: convert submodule_move_head new argument to object id

2018-08-08 Thread Stefan Beller
All callers use oid_to_hex to convert the desired oid to a string before calling submodule_move_head. Defer the conversion to the submodule_move_head as it will turn out to be useful in a bit. Signed-off-by: Stefan Beller --- entry.c| 6 +++--- submodule.c| 12 ++--

[RFC PATCH 00/10] fetch: make sure submodule oids are fetched

2018-08-08 Thread Stefan Beller
Currently when git-fetch is asked to recurse into submodules, it dispatches a plain "git-fetch -C " (and some submodule related options such as prefix and recusing strategy, but) without any information of the remote or the tip that should be fetched. This works surprisingly well in some

[PATCH 10/10] fetch: retry fetching submodules if sha1 were not fetched

2018-08-08 Thread Stefan Beller
Currently when git-fetch is asked to recurse into submodules, it dispatches a plain "git-fetch -C " (and some submodule related options such as prefix and recusing strategy, but) without any information of the remote or the tip that should be fetched. This works surprisingly well in some

[PATCH 09/10] submodule: fetch in submodules git directory instead of in worktree

2018-08-08 Thread Stefan Beller
This patch started as a refactoring to make 'get_next_submodule' more readable, but upon doing so, I realized that git-fetch actually doesn't need to be run in the worktree. So let's run it in the git dir instead. That should pave the way towards fetching submodules that are currently not checked

[PATCH 01/10] string_list: print_string_list to use trace_printf

2018-08-08 Thread Stefan Beller
It is a debugging aid, so it should print to the debugging channel. Signed-off-by: Stefan Beller --- string-list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/string-list.c b/string-list.c index 771c4550980..9f651bb4294 100644 --- a/string-list.c +++ b/string-list.c

[PATCH 02/10] string-list.h: add string_list_pop function.

2018-08-08 Thread Stefan Beller
A string list can be used as a stack, but should we? A later patch shows how useful this will be. Signed-off-by: Stefan Beller --- string-list.c | 8 string-list.h | 6 ++ 2 files changed, 14 insertions(+) diff --git a/string-list.c b/string-list.c index 9f651bb4294..ea80afc8a0c

Re: abstracting commit signing/verify to support other signing schemes

2018-08-08 Thread Jeff King
On Mon, Aug 06, 2018 at 08:24:25PM +, Tacitus Aedifex wrote: > the older patch set suggested the idea of using PEM strings to match up the > signature payload with a certain signing tool. i can't tell if they mean > the 'pre-ecapsulation boundary' (e.g. '-BEGIN FOO-') or if they mean

[PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-08 Thread Stefan Beller
A user reported a submodule issue regarding a section mix-up, but it could be boiled down to the following test case: $ git init test && cd test $ git config foo."Bar".key test $ git config foo."bar".key test $ tail -n 3 .git/config [foo "Bar"] key = test key = test

[PATCH 1/3] t1300: document current behavior of setting options

2018-08-08 Thread Stefan Beller
This documents current behavior of the config machinery, when changing the value of some settings. This patch just serves to provide a baseline for the follow up that will fix some issues with the current behavior. Signed-off-by: Stefan Beller --- t/t1300-config.sh | 86

[PATCH 3/3] git-config: document accidental multi-line setting in deprecated syntax

2018-08-08 Thread Stefan Beller
The bug was noticed when writing the previous patch; a fix for this bug is not easy though: If we choose to ignore the case of the subsection (and revert most of the code of the previous patch, just keeping s/strncasecmp/strcmp/), then we'd introduce new sections using the new syntax, such that

[PATCH 0/3] Resending sb/config-write-fix

2018-08-08 Thread Stefan Beller
This is a resend of sb/config-write-fix, with a slightly better commit message and a renamed variable. Thanks, Stefan Stefan Beller (3): t1300: document current behavior of setting options config: fix case sensitive subsection names on writing git-config: document accidental multi-line

[PATCH] update-index: there no longer is `apply --index-info`

2018-08-08 Thread Junio C Hamano
Back when we removed `git apply --index-info` in 2007, we forgot to adjust the documentation for update-index that reads its output. Let's reorder the description of three formats to present the other two formats that are still generated by git commands before this format, and stop mentioning

Re: [PATCH 0/5] chainlint: improve robustness against "unusual" shell coding

2018-08-08 Thread Jeff King
On Tue, Aug 07, 2018 at 04:21:30AM -0400, Eric Sunshine wrote: > This series improves chainlint's robustness when faced with the sort of > unusual shell coding in contrib/subtree/t7900 which triggered a > false-positive, as reported by Jonathan[1]. Jonathan has already > rewritten[2] that code to

Re: [PATCH 04/11] builtin rebase: support --quiet

2018-08-08 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Aug 8, 2018 at 6:51 AM Pratik Karki wrote: >> >> 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

Re: [PATCH 1/1] pull --rebase=: allow single-letter abbreviations for the type

2018-08-08 Thread Junio C Hamano
Junio C Hamano writes: > Ævar Arnfjörð Bjarmason writes: > >>> - else if (!strcmp(value, "preserve")) >>> + else if (!strcmp(value, "preserve") || !strcmp(value, "p")) >>> return REBASE_PRESERVE; >>> - else if (!strcmp(value, "merges")) >>> + else if (!strcmp(value,

Re: [RFC PATCH] packfile: iterate packed objects in pack order

2018-08-08 Thread Jeff King
On Wed, Aug 08, 2018 at 04:12:10PM -0700, Jonathan Tan wrote: > Many invocations of for_each_object_in_pack() and > for_each_packed_object() (which invokes the former) subsequently check > at least the type of the packed object, necessitating accessing the > packfile itself. For locality reasons,

Re: [PATCH v2 0/4] Speed up unpack_trees()

2018-08-08 Thread Ben Peart
On 8/1/2018 12:38 PM, Duy Nguyen wrote: On Tue, Jul 31, 2018 at 01:31:31PM -0400, Ben Peart wrote: 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

Re: [PATCH v2] clone: report duplicate entries on case-insensitive filesystems

2018-08-08 Thread Jeff King
On Wed, Aug 08, 2018 at 03:48:04PM -0400, Jeff Hostetler wrote: > > ce_match_stat() may not be a very good measure to see if two paths > > refer to the same file, though. After a fresh checkout, I would not > > be surprised if two completely unrelated paths have the same size > > and have same

Re: [PATCH 1/1] verify-tag/verify-commit should exit unsuccessfully when signature is not trusted

2018-08-08 Thread Jeff King
On Sat, Aug 04, 2018 at 10:43:46AM +0200, Karel Kočí wrote: > > I think the only sensible thing is to err on the conservative side, and > > return non-zero if we saw _any_ invalid signature. > > > > I will note, though, that just checking the exit code of `verify-tag` > > isn't really that

Re: [PATCH v2] clone: report duplicate entries on case-insensitive filesystems

2018-08-08 Thread Junio C Hamano
Jeff King writes: > I think we really want to avoid doing that normalization ourselves if we > can. There are just too many filesystem-specific rules. Exactly; not having to learn these rules is the major (if not whole) point of the "let checkout notice the collision and then deal with it"

Re: [PATCH 0/3] Resending sb/config-write-fix

2018-08-08 Thread Junio C Hamano
Stefan Beller writes: > This is a resend of sb/config-write-fix, with a slightly > better commit message and a renamed variable. > > Thanks, > Stefan Thanks. Let's declare victory and mark it to be merged to 'next'.

[PATCH] git-update-index.txt: reword possibly confusing example

2018-08-08 Thread Elijah Newren
The following phrase could be interpreted multiple ways: "To pretend you have a file with mode and sha1 at path" In particular, I can think of two: 1. Pretend we have some new file, which happens to have a given mode and sha1 2. Pretend one of the files we are already tracking has a

[PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-08 Thread Brandon Williams
Commit 0383bbb901 (submodule-config: verify submodule names as paths, 2018-04-30) introduced some checks to ensure that submodule names don't include directory traversal components (e.g. "../"). This addresses the vulnerability identified in 0383bbb901 but the root cause is that we use submodule

[PATCH 1/2] submodule: create helper to build paths to submodule gitdirs

2018-08-08 Thread Brandon Williams
Introduce a helper function "submodule_name_to_gitdir()" (and the submodule--helper subcommand "gitdir") which constructs a path to a submodule's gitdir, located in the provided repository's "modules" directory. This consolidates the logic needed to build up a path into a repository's "modules"

[PATCH 0/2] munge submodule names

2018-08-08 Thread Brandon Williams
Here's a more polished series taking into account some of the feedback on the RFC. As Junio pointed out URL encoding makes the directories much more human readable, but I'm open to other ideas if we don't think URL encoding is the right thing to do. Brandon Williams (2): submodule: create

Re: [PATCH 1/5] chainlint: match arbitrary here-docs tags rather than hard-coded names

2018-08-08 Thread Jeff King
On Tue, Aug 07, 2018 at 04:21:31AM -0400, Eric Sunshine wrote: > diff --git a/t/chainlint.sed b/t/chainlint.sed > index 5f0882cb38..bd76c5d181 100644 > --- a/t/chainlint.sed > +++ b/t/chainlint.sed > @@ -61,6 +61,22 @@ > # "else", and "fi" in if-then-else likewise must not end with "&&", thus >

Re: [PATCH 1/2] submodule: create helper to build paths to submodule gitdirs

2018-08-08 Thread Brandon Williams
On 08/08, Stefan Beller wrote: > On Wed, Aug 8, 2018 at 3:33 PM Brandon Williams wrote: > > > > Introduce a helper function "submodule_name_to_gitdir()" (and the > > submodule--helper subcommand "gitdir") which constructs a path to a > > submodule's gitdir, located in the provided repository's

Re: [PATCH 1/1] verify-tag/verify-commit should exit unsuccessfully when signature is not trusted

2018-08-08 Thread brian m. carlson
On Wed, Aug 08, 2018 at 05:59:43PM -0700, Junio C Hamano wrote: > "brian m. carlson" writes: > > >> FWIW, I'm on board with returning non-zero in any case where gpg would. > > > > I think that's probably the best solution overall. > > FWIW, I am not married to the current behaviour. I would

Re: Help with "fatal: unable to read ...." error during GC?

2018-08-08 Thread Paul Smith
On Wed, 2018-08-08 at 14:24 -0400, Jeff King wrote: > If so, can you try running it under gdb and getting a stack trace? > Something like: > > gdb git > [and then inside gdb...] > set args pack-objects --all --reflog --indexed-objects foobreak die > run > bt > > That might give us

Re: [PATCH 1/5] chainlint: match arbitrary here-docs tags rather than hard-coded names

2018-08-08 Thread Eric Sunshine
On Wed, Aug 8, 2018 at 6:50 PM Jeff King wrote: > On Tue, Aug 07, 2018 at 04:21:31AM -0400, Eric Sunshine wrote: > > +# Swallowing here-docs with arbitrary tags requires a bit of finesse. When > > a > > +# line such as "cat > front > > +# of the

Re: Page content is wider than view window

2018-08-08 Thread Eric Sunshine
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

[PATCH 04/11] builtin rebase: support --quiet

2018-08-08 Thread Pratik Karki
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

[PATCH 03/11] builtin rebase: handle the pre-rebase hook (and add --no-verify)

2018-08-08 Thread Pratik Karki
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

[PATCH 05/11] builtin rebase: support the `verbose` and `diffstat` options

2018-08-08 Thread Pratik Karki
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)

[PATCH 02/11] builtin rebase: support `git rebase --onto A...B`

2018-08-08 Thread Pratik Karki
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

[PATCH 01/11] builtin rebase: support --onto

2018-08-08 Thread Pratik Karki
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

[PATCH 06/11] builtin rebase: require a clean worktree

2018-08-08 Thread Pratik Karki
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

[GSoC] [PATCH 00/11] A minimal builtin rebase

2018-08-08 Thread Pratik Karki
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

[PATCH 11/11] builtin rebase: support `git rebase `

2018-08-08 Thread Pratik Karki
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

[PATCH 07/11] builtin rebase: try to fast forward when possible

2018-08-08 Thread Pratik Karki
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,

[PATCH 08/11] builtin rebase: support --force-rebase

2018-08-08 Thread Pratik Karki
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

[PATCH 10/11] builtin rebase: only store fully-qualified refs in `options.head_name`

2018-08-08 Thread 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

[PATCH 09/11] builtin rebase: start a new rebase only if none is in progress

2018-08-08 Thread Pratik Karki
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

[PATCH 1/2] git-instaweb: support Fedora/Red Hat apache module path

2018-08-08 Thread Sebastian Kisela
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

Re: [PATCH v4 1/2] sequencer: handle errors from read_author_ident()

2018-08-08 Thread Eric Sunshine
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

Re: [PATCH v4 0/2] fix author-script quoting

2018-08-08 Thread Eric Sunshine
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),

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-08 Thread Eric Sunshine
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' >

[PATCH 1/2] git-instaweb: support Fedora/Red Hat apache module path

2018-08-08 Thread Sebastian Kisela
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.

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-08 Thread Eric Sunshine
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

[PATCH] status: -i shorthand for --ignored command line option

2018-08-08 Thread Nicholas Guriev
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

Re: [PATCH] status: -i shorthand for --ignored command line option

2018-08-08 Thread Eric Sunshine
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

[PATCH] git-instaweb.sh: Generate unixd module loading

2018-08-08 Thread Sebastian Kisela
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

[PATCH 03/18] builtin rebase: support --rerere-autoupdate

2018-08-08 Thread Pratik Karki
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

[PATCH 08/18] builtin rebase: support `--autosquash`

2018-08-08 Thread Pratik Karki
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

[PATCH 07/18] builtin rebase: support `keep-empty` option

2018-08-08 Thread Pratik Karki
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

[PATCH 05/18] builtin rebase: support `ignore-whitespace` option

2018-08-08 Thread Pratik Karki
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

[PATCH 04/18] builtin rebase: support --committer-date-is-author-date

2018-08-08 Thread Pratik Karki
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

[PATCH 02/18] builtin rebase: support --signoff

2018-08-08 Thread Pratik Karki
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

[GSoC] [PATCH 00/18] builtin rebase options

2018-08-08 Thread Pratik Karki
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

[PATCH 13/18] builtin rebase: support `--allow-empty-message` option

2018-08-08 Thread Pratik Karki
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

[PATCH 11/18] builtin rebase: support `--autostash` option

2018-08-08 Thread Pratik Karki
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

[PATCH 12/18] builtin rebase: support `--exec`

2018-08-08 Thread Pratik Karki
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

[PATCH 09/18] builtin rebase: support `--gpg-sign` option

2018-08-08 Thread Pratik Karki
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 ---

[PATCH 01/18] builtin rebase: allow selecting the rebase "backend"

2018-08-08 Thread Pratik Karki
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`

Help with "fatal: unable to read ...." error during GC?

2018-08-08 Thread Paul Smith
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

[PATCH 10/18] builtin rebase: support `-C` and `--whitespace=`

2018-08-08 Thread Pratik Karki
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

[PATCH 06/18] builtin rebase: support `ignore-date` option

2018-08-08 Thread Pratik Karki
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

[PATCH 1/1] rebase: default to using the builtin rebase

2018-08-08 Thread Pratik Karki
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

[GSoC] [PATCH 0/1] default to builtin rebase

2018-08-08 Thread Pratik Karki
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

Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C

2018-08-08 Thread Phillip Wood
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

Re: [PATCH v4 2/2] sequencer: fix quoting in write_author_script

2018-08-08 Thread Junio C Hamano
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

[PATCH 1/7] builtin rebase: support --continue

2018-08-08 Thread Pratik Karki
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

[PATCH 5/7] builtin rebase: support --edit-todo and --show-current-patch

2018-08-08 Thread Pratik Karki
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

[GSoC] [PATCH 0/7] builtin rebase actions

2018-08-08 Thread Pratik Karki
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

[PATCH 4/7] builtin rebase: support --quit

2018-08-08 Thread Pratik Karki
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

[PATCH 3/7] builtin rebase: support --abort

2018-08-08 Thread Pratik Karki
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

[PATCH 2/7] builtin rebase: support --skip

2018-08-08 Thread Pratik Karki
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

[PATCH 7/7] builtin rebase: stop if `git am` is in progress

2018-08-08 Thread Pratik Karki
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

[PATCH 6/7] builtin rebase: actions require a rebase in progress

2018-08-08 Thread Pratik Karki
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 ---

Re: Page content is wider than view window

2018-08-08 Thread Jeff King
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.

  1   2   >