Re: [PATCH 18/20] builtin/am: convert to struct object_id

2016-08-29 Thread Paul Tan
Hi Brian, On Mon, Aug 29, 2016 at 7:27 AM, brian m. carlson wrote: > Signed-off-by: brian m. carlson > --- > builtin/am.c | 138 > +-- > 1 file changed, 69 insertions(+), 69 deletions(-) I looked through this patch, and the conversion lo

Re: Suspected Bug in git install procedure [ git-daemon-run (version 1:2.9.3-1) ]

2016-08-29 Thread Jean-Marc B. van Schendel
Thanks for the reply... Indeed there was a problem with the runit package (2.1.2-5), which _should_ have created /etc/system/ as a link to (in my case) /etc/runit/runsvdir/current ... Upgrading to runit 2.1.2-6 clears this off. Regards --jmbvs Jean-Marc B. van Schendel email: jeanmarc.vanschen...

[PATCH 00/22] Prepare the sequencer for the upcoming rebase -i patches

2016-08-29 Thread Johannes Schindelin
This patch series marks the '4' in the countdown to speed up rebase -i by implementing large parts in C. It is based on the `libify-sequencer` patch series that I submitted last week. The patches in this series merely prepare the sequencer code for the next patch series that actually teaches the

[PATCH 01/22] sequencer: use static initializers for replay_opts

2016-08-29 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- builtin/revert.c | 6 ++ sequencer.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/builtin/revert.c b/builtin/revert.c index 4e69380..7365559 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -178,10 +178,9 @@ static vo

[PATCH 03/22] sequencer: avoid unnecessary indirection

2016-08-29 Thread Johannes Schindelin
We really do not need the *pointer to a* pointer to the options in the read_populate_opts() function. Signed-off-by: Johannes Schindelin --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index 4d2b4e3..14ef79b 100644 --- a/sequenc

[PATCH 06/22] sequencer: release memory that was allocated when reading options

2016-08-29 Thread Johannes Schindelin
The sequencer reads options from disk and stores them in its struct for use during sequencer's operations. With this patch, the memory is released afterwards, plugging a memory leak. Signed-off-by: Johannes Schindelin --- sequencer.c | 13 ++--- 1 file changed, 10 insertions(+), 3 delet

[PATCH 09/22] sequencer: completely revamp the "todo" script parsing

2016-08-29 Thread Johannes Schindelin
When we came up with the "sequencer" idea, we really wanted to have kind of a plumbing equivalent of the interactive rebase. Hence the choice of words: the "todo" script, a "pick", etc. However, when it came time to implement the entire shebang, somehow this idea got lost and the sequencer was use

[PATCH 04/22] sequencer: future-proof remove_sequencer_state()

2016-08-29 Thread Johannes Schindelin
In a couple of commits, we will teach the sequencer to handle the nitty gritty of the interactive rebase, which keeps its state in a different directory. Signed-off-by: Johannes Schindelin --- sequencer.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git

[PATCH 05/22] sequencer: allow the sequencer to take custody of malloc()ed data

2016-08-29 Thread Johannes Schindelin
The sequencer is our attempt to lib-ify cherry-pick. Yet it behaves like a one-shot command when it reads its configuration: memory is allocated and released only when the command exits. This is kind of okay for git-cherry-pick, which *is* a one-shot command. All the work to make the sequencer its

[PATCH 08/22] sequencer: remove overzealous assumption

2016-08-29 Thread Johannes Schindelin
The sequencer was introduced to make the cherry-pick and revert functionality available as library function, with the original idea being to extend the sequencer to also implement the rebase -i functionality. The test to ensure that all of the commands in the script are identical to the overall op

[PATCH 10/22] sequencer: avoid completely different messages for different actions

2016-08-29 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- sequencer.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index cbdce6d..1b65202 100644 --- a/sequencer.c +++ b/sequencer.c @@ -232,11 +232,8 @@ static int error_dirty_index(struct replay_opts *opts)

[PATCH 02/22] sequencer: use memoized sequencer directory path

2016-08-29 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- builtin/commit.c | 2 +- sequencer.c | 11 ++- sequencer.h | 5 + 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 77e3dc8..0221190 100644 --- a/builtin/commit.c +++ b/builtin/c

[PATCH 07/22] sequencer: future-proof read_populate_todo()

2016-08-29 Thread Johannes Schindelin
Over the next commits, we will work on improving the sequencer to the point where it can process the edit script of an interactive rebase. To that end, we will need to teach the sequencer to read interactive rebase's todo file. In preparation, we consolidate all places where that todo file is neede

[PATCH 15/22] sequencer: introduce a helper to read files written by scripts

2016-08-29 Thread Johannes Schindelin
As we are slowly teaching the sequencer to perform the hard work for the interactive rebase, we need to read files that were written by shell scripts. These files typically contain a single line and are invariably ended by a line feed (and possibly a carriage return before that). Let's use a helpe

[PATCH 17/22] sequencer: allow editing the commit message on a case-by-case basis

2016-08-29 Thread Johannes Schindelin
In the upcoming commits, we will implement more and more of rebase -i's functionality. One particular feature of the commands to come is that some of them allow editing the commit message while others don't, i.e. we cannot define in the replay_opts whether the commit message should be edited or not

[PATCH 21/22] sequencer: left-trim the lines read from the script

2016-08-29 Thread Johannes Schindelin
Interactive rebase's scripts may be indented; We need to handle this case, too, now that we prepare the sequencer to process interactive rebases. Signed-off-by: Johannes Schindelin --- sequencer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sequencer.c b/sequencer.c index 0614b90..5ef

[PATCH 13/22] sequencer: remember the onelines when parsing the todo file

2016-08-29 Thread Johannes Schindelin
The `git-rebase-todo` file contains a list of commands. Most of those commands have the form The is displayed primarily for the user's convenience, as rebase -i really interprets only the part. However, there are *some* places in interactive rebase where the is used to display mess

[PATCH 12/22] sequencer: refactor the code to obtain a short commit name

2016-08-29 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- sequencer.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sequencer.c b/sequencer.c index ba1fd05..06759d4 100644 --- a/sequencer.c +++ b/sequencer.c @@ -157,13 +157,18 @@ struct commit_message { const char *messa

[PATCH 19/22] sequencer: support cleaning up commit messages

2016-08-29 Thread Johannes Schindelin
The sequencer_commit() function already knows how to amend commits, and with this new option, it can also clean up commit messages (i.e. strip out commented lines). This is needed to implement rebase -i's 'fixup' and 'squash' commands as sequencer commands. Signed-off-by: Johannes Schindelin ---

[PATCH 14/22] sequencer: prepare for rebase -i's commit functionality

2016-08-29 Thread Johannes Schindelin
In interactive rebases, we commit a little bit differently than the sequencer did so far: we heed the "author-script", the "message" and the "amend" files in the .git/rebase-merge/ subdirectory. Likewise, we may want to edit the commit message *even* when providing a file containing the suggested

[PATCH 18/22] sequencer: support amending commits

2016-08-29 Thread Johannes Schindelin
This teaches the sequencer_commit() function to take an argument that will allow us to implement "todo" commands that need to amend the commit messages ("fixup", "squash" and "reword"). Signed-off-by: Johannes Schindelin --- sequencer.c | 6 -- sequencer.h | 2 +- 2 files changed, 5 insertio

[PATCH 20/22] sequencer: remember do_recursive_merge()'s return value

2016-08-29 Thread Johannes Schindelin
The return value of do_recursive_merge() may be positive (indicating merge conflicts), se let's OR later error conditions so as not to overwrite them with 0. This is not yet a problem, but preparing for the patches to come: we will teach the sequencer to do rebase -i's job. Signed-off-by: Johanne

[PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-08-29 Thread Johannes Schindelin
The rebase command sports a `--gpg-sign` option that is heeded by the interactive rebase. This patch teaches the sequencer that trick, as part of the bigger effort to make the sequencer the work horse of the interactive rebase. Signed-off-by: Johannes Schindelin --- sequencer.c | 48 +++

[PATCH 22/22] sequencer: refactor write_message()

2016-08-29 Thread Johannes Schindelin
The write_message() function safely writes an strbuf to a file. Sometimes this is inconvenient, though: the text to be written may not be stored in a strbuf, or the strbuf should not be released after writing. Let's allow for such use cases by refactoring write_message() to allow for a convenience

[PATCH 11/22] sequencer: get rid of the subcommand field

2016-08-29 Thread Johannes Schindelin
The subcommands are used exactly once, at the very beginning of sequencer_pick_revisions(), to determine what to do. This is an unnecessary level of indirection: we can simply call the correct function to begin with. So let's do that. While at it, ensure that the subcommands return an error code s

improve status message

2016-08-29 Thread KES
Hi When we do git pull -v --rebase We got this: remote: Counting objects: 7, done. remote: Compressing objects: 100% (7/7), done. remote: Total 7 (delta 5), reused 0 (delta 0) Unpacking objects: 100% (7/7), done. >From ssh://slab/alexclear/ontico 2b541e2..2c17d76 master -> origin/master C

Re: [PATCH 01/22] sequencer: use static initializers for replay_opts

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 10:03 +0200, Johannes Schindelin wrote: > +#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, > NULL, 0, 0, NULL } This looked off to me, as it replaces memset(..., 0, ...) so is not 100% equivalent. But the changed functions both set opts.action an

Re: [PATCH 04/22] sequencer: future-proof remove_sequencer_state()

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 10:04 +0200, Johannes Schindelin wrote: > +   if (read_and_refresh_cache(opts)) > +   return -1; > + This doesn't seem to be related to the get_dir changes? D.

Re: [PATCH 12/22] sequencer: refactor the code to obtain a short commit name

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 10:05 +0200, Johannes Schindelin wrote: I fail to see the point of this patch, would you mind enlightening me? D.

Re: [PATCH v6 05/13] pkt-line: add packet_write_gently()

2016-08-29 Thread Lars Schneider
> On 26 Aug 2016, at 19:15, Junio C Hamano wrote: > > Lars Schneider writes: > >>> Do you anticipate future need of non-gently variant of this >>> function? If so, perhaps a helper that takes a boolean "am I >>> working for the gently variant?" may help share more code. >> >> With helper you

Re: [PATCH v6 06/13] pkt-line: add functions to read/write flush terminated packet streams

2016-08-29 Thread Lars Schneider
> On 26 Aug 2016, at 19:21, Junio C Hamano wrote: > > Lars Schneider writes: > >> OK, what function names would be more clear from your point of view? >> >> write_packetized_stream_from_fd() >> write_packetized_stream_from_buf() >> read_packetized_stream_to_buf() > > Would > >write_pack

Re: [PATCH 15/22] sequencer: introduce a helper to read files written by scripts

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 10:06 +0200, Johannes Schindelin wrote: > +   if (strbuf_read_file(buf, path, 0) < 0) { > +   warning_errno("could not read '%s'", path); > +   return 0; > +   } > + > +   if (buf->len > orig_len && buf->buf[buf->len - 1] == '\n') { > +  

Re: improve 'git pull' status message

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 11:11, KES pisze: > > When we do git pull -v --rebase > > We got this: > remote: Counting objects: 7, done. > remote: Compressing objects: 100% (7/7), done. > remote: Total 7 (delta 5), reused 0 (delta 0) > Unpacking objects: 100% (7/7), done. > From ssh://slab/alexclear/ontic

Re: [PATCH 20/22] sequencer: remember do_recursive_merge()'s return value

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 10:06 +0200, Johannes Schindelin wrote: > The return value of do_recursive_merge() may be positive (indicating merge > conflicts), se let's OR later error conditions so as not to overwrite them > with 0. s/se/so/? D.

Re: [PATCH 00/22] Prepare the sequencer for the upcoming rebase -i patches

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 10:03 +0200, Johannes Schindelin wrote: > Therefore I would be most grateful for every in-depth review. Tried to do that, but could come up only with a few nits. I think the approach is sensible. D.

Re: [PATCH v6 09/13] convert: modernize tests

2016-08-29 Thread Lars Schneider
> On 26 Aug 2016, at 22:03, Junio C Hamano wrote: > > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> Use `test_config` to set the config, check that files are empty with >> `test_must_be_empty`, compare files with `test_cmp`, and remove spaces >> after ">" and "<". > > All

Re: Reducing CPU load on git server

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 07:47, Jeff King pisze: > On Sun, Aug 28, 2016 at 12:42:52PM -0700, W. David Jarvis wrote: > >> The actual replication process works as follows: >> >> 1. The primary git server receives a push and sends a webhook with the >> details of the push (repo, ref, sha, some metadata) t

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-29 Thread Johannes Schindelin
Hi Kuba, On Sun, 28 Aug 2016, Jakub Narębski wrote: > W dniu 25.08.2016 o 15:21, Johannes Schindelin pisze: > > On Mon, 22 Aug 2016, Jakub Narębski wrote: > >> W dniu 22.08.2016 o 15:18, Johannes Schindelin pisze: > >> > >>> So unfortunately this thread has devolved. Which is sad. Because all > >

Re: [PATCH 01/20] cache: convert struct cache_entry to use struct object_id

2016-08-29 Thread Johannes Schindelin
Hi Brian, On Sun, 28 Aug 2016, brian m. carlson wrote: > Convert struct cache_entry to use struct object_id by applying the > following semantic patch and the object_id transforms from contrib: > > @@ > struct cache_entry E1; > @@ > - E1.sha1 > + E1.oid.hash > > @@ > struct cache_entry *E1; > @

Re: [PATCH 01/22] sequencer: use static initializers for replay_opts

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > On ma, 2016-08-29 at 10:03 +0200, Johannes Schindelin wrote: > > > +#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, > > NULL, NULL, 0, 0, NULL } > > This looked off to me, as it replaces memset(..., 0, ...) so i

Re: [PATCH 04/22] sequencer: future-proof remove_sequencer_state()

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > On ma, 2016-08-29 at 10:04 +0200, Johannes Schindelin wrote: > > > +   if (read_and_refresh_cache(opts)) > > +   return -1; > > + > > This doesn't seem to be related to the get_dir changes? Good eyes. Let me investiga

Re: [PATCH 12/22] sequencer: refactor the code to obtain a short commit name

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > On ma, 2016-08-29 at 10:05 +0200, Johannes Schindelin wrote: > > > > I fail to see the point of this patch, would you mind enlightening me? Two reasons: 1) by refactoring it into a function, the code is more DRY (with all the advant

Re: [PATCH 15/22] sequencer: introduce a helper to read files written by scripts

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > On ma, 2016-08-29 at 10:06 +0200, Johannes Schindelin wrote: > > +   if (strbuf_read_file(buf, path, 0) < 0) { > > +   warning_errno("could not read '%s'", path); > > +   return 0; > > +   } > > + > > +   

Re: [PATCH 20/22] sequencer: remember do_recursive_merge()'s return value

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > On ma, 2016-08-29 at 10:06 +0200, Johannes Schindelin wrote: > > > The return value of do_recursive_merge() may be positive (indicating merge > > conflicts), se let's OR later error conditions so as not to overwrite them > > with 0. >

Re: [PATCH 00/22] Prepare the sequencer for the upcoming rebase -i patches

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > On ma, 2016-08-29 at 10:03 +0200, Johannes Schindelin wrote: > > > Therefore I would be most grateful for every in-depth review. > > Tried to do that, but could come up only with a few nits. I think the > approach is sensible. Thank y

Re: [PATCH 04/22] sequencer: future-proof remove_sequencer_state()

2016-08-29 Thread Johannes Schindelin
Hi Dennis, On Mon, 29 Aug 2016, Johannes Schindelin wrote: > On Mon, 29 Aug 2016, Dennis Kaarsemaker wrote: > > > On ma, 2016-08-29 at 10:04 +0200, Johannes Schindelin wrote: > > > > > +   if (read_and_refresh_cache(opts)) > > > +   return -1; > > > + > > > > This doesn't seem

Re: [PATCH] Documentation/SubmittingPatches: add quotes to advised commit reference

2016-08-29 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 27.08.2016 00:42: > Stefan Beller writes: > >> Junio finds it is easier to read text when the commit subject is quoted. >> >> Signed-off-by: Stefan Beller >> --- >> Documentation/SubmittingPatches | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >>

Re: [PATCH 08/20] streaming: make stream_blob_to_fd take struct object_id

2016-08-29 Thread Johannes Schindelin
Hi Brian, On Sun, 28 Aug 2016, brian m. carlson wrote: > Since all of its callers have been updated, modify stream_blob_to_fd to > take a struct object_id. > > Signed-off-by: brian m. carlson I reviewed the patches until here, and they all look very good to me. Will continue to review after c

Re: [PATCH 07/15] sequencer: lib'ify read_populate_opts()

2016-08-29 Thread Johannes Schindelin
Hi Junio, On Fri, 26 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > -static void read_populate_opts(struct replay_opts **opts_ptr) > > +static int read_populate_opts(struct replay_opts **opts) > > { > > if (!file_exists(git_path_opts_file())) > > - return; >

Re: [PATCH 12/15] sequencer: lib'ify save_opts()

2016-08-29 Thread Johannes Schindelin
Hi Junio, On Fri, 26 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > static int pick_commits(struct commit_list *todo_list, struct replay_opts > > *opts) > > @@ -1128,9 +1130,9 @@ int sequencer_pick_revisions(struct replay_opts *opts) > > return -1; > > if

Re: [PATCH v5 09/12] doc: revisions - define `reachable`

2016-08-29 Thread Philip Oakley
From: "Jakub Narębski" Sent: Sunday, August 28, 2016 2:01 PM W dniu 12.08.2016 o 09:07, Philip Oakley pisze: [...] History traversing commands such as `git log` operate on a set -of commits, not just a single commit. To these commands, -specifying a single revision with the notation describe

[PATCH v2] t/Makefile: add a rule to re-run previously-failed tests

2016-08-29 Thread Johannes Schindelin
While developing patch series, it is a good practice to run the test suite from time to time, just to make sure that obvious bugs are caught early. With complex patch series, it is common to run `make -j15 -k test`, i.e. run the tests in parallel and *not* stop at the first failing test but conti

Re: [PATCH 01/20] cache: convert struct cache_entry to use struct object_id

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 01:27, brian m. carlson pisze: > Convert struct cache_entry to use struct object_id by applying the > following semantic patch and the object_id transforms from contrib: > > @@ > struct cache_entry E1; > @@ > - E1.sha1 > + E1.oid.hash > > @@ > struct cache_entry *E1; > @@ > -

Re: [PATCH v5 09/12] doc: revisions - define `reachable`

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 15:21, Philip Oakley pisze: > From: "Jakub Narębski" > Sent: Sunday, August 28, 2016 2:01 PM >> W dniu 12.08.2016 o 09:07, Philip Oakley pisze: [...] >>> +For these commands, >>> +specifying a single revision, using the notation described in the >>> +previous section, means th

Re: [PATCH 01/20] cache: convert struct cache_entry to use struct object_id

2016-08-29 Thread Johannes Schindelin
Hi Kuba, On Mon, 29 Aug 2016, Jakub Narębski wrote: > W dniu 29.08.2016 o 01:27, brian m. carlson pisze: > > > Convert struct cache_entry to use struct object_id by applying the > > following semantic patch and the object_id transforms from contrib: > > > > @@ > > struct cache_entry E1; > > @@

Re: [PATCH v6 00/13] Git filter protocol

2016-08-29 Thread Lars Schneider
> On 25 Aug 2016, at 13:07, larsxschnei...@gmail.com wrote: > > From: Lars Schneider > > The goal of this series is to avoid launching a new clean/smudge filter > process for each file that is filtered. > > A short summary about v1 to v5 can be found here: > https://git.github.io/rev_news/2016

Re: [PATCH v14 07/27] bisect--helper: `bisect_reset` shell function in C

2016-08-29 Thread Junio C Hamano
Pranit Bauva writes: >> with the original >> >> case $# in >> 0) reset to the branch ;; >> 1) reset to the commit ;; >> *) give usage and die ;; >> esac >> >> and took the difference and reacted "ah, excess parameters are not >> diagnosed in this function". >> >> Your calle

Re: [PATCH v14 12/27] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-08-29 Thread Junio C Hamano
Pranit Bauva writes: >>> +static int bisect_terms(struct bisect_terms *terms, const char **argv, int >>> argc) >>> +{ >>> + int i; >>> + >>> + if (get_terms(terms)) { >>> + fprintf(stderr, _("no terms defined\n")); >>> + return -1; >>> + } >>> + if (argc =

Re: [PATCH v14 08/27] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-08-29 Thread Junio C Hamano
Pranit Bauva writes: > Hey Junio, > > On Thu, Aug 25, 2016 at 3:43 AM, Junio C Hamano wrote: >> Pranit Bauva writes: >> >>> +static int is_expected_rev(const char *expected_hex) >>> +{ >>> + struct strbuf actual_hex = STRBUF_INIT; >>> + int res = 0; >>> + if (strbuf_read_file(&actua

Re: Reducing CPU load on git server

2016-08-29 Thread Jeff King
On Mon, Aug 29, 2016 at 12:46:27PM +0200, Jakub Narębski wrote: > > So your load is probably really spiky, as you get thundering herds of > > fetchers after every push (the spikes may have a long flatline at the > > top, as it takes time to process the whole herd). > > One solution I have heard a

[PATCH v4 2/3] diff-highlight: add failing test for handling --graph output.

2016-08-29 Thread Brian Henderson
--- contrib/diff-highlight/t/t9400-diff-highlight.sh | 60 1 file changed, 60 insertions(+) diff --git a/contrib/diff-highlight/t/t9400-diff-highlight.sh b/contrib/diff-highlight/t/t9400-diff-highlight.sh index 7c303f7..54e11fe 100755 --- a/contrib/diff-highlight/t/t9400

[PATCH v4 0/3] diff-highlight: add support for --graph option

2016-08-29 Thread Brian Henderson
How does this look? Drawing the graph helped me a lot in figuring out what I was actually testing. thanks! Brian Henderson (3): diff-highlight: add some tests. diff-highlight: add failing test for handling --graph output. diff-highlight: add support for --graph output. contrib/diff-highl

[PATCH v4 1/3] diff-highlight: add some tests.

2016-08-29 Thread Brian Henderson
--- contrib/diff-highlight/Makefile | 5 + contrib/diff-highlight/t/Makefile| 22 +++ contrib/diff-highlight/t/t9400-diff-highlight.sh | 163 +++ 3 files changed, 190 insertions(+) create mode 100644 contrib/diff-highlight/Makefile create m

[PATCH v4 3/3] diff-highlight: add support for --graph output.

2016-08-29 Thread Brian Henderson
--- contrib/diff-highlight/diff-highlight| 19 +-- contrib/diff-highlight/t/t9400-diff-highlight.sh | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight index ffefc31..928

Re: [PATCH 01/22] sequencer: use static initializers for replay_opts

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 11:19, Dennis Kaarsemaker pisze: > On ma, 2016-08-29 at 10:03 +0200, Johannes Schindelin wrote: > >> +#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, >> NULL, NULL, 0, 0, NULL } > > This looked off to me, as it replaces memset(..., 0, ...) so is not > 1

Re: [PATCH v6 10/13] convert: generate large test files only once

2016-08-29 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh > index 7b45136..34c8eb9 100755 > --- a/t/t0021-conversion.sh > +++ b/t/t0021-conversion.sh > @@ -4,6 +4,15 @@ test_description='blob conversion via gitattributes' > > . ./test-lib.sh > > +if test_ha

Re: [PATCH v6 10/13] convert: generate large test files only once

2016-08-29 Thread Junio C Hamano
Lars Schneider writes: >> On 25 Aug 2016, at 21:17, Stefan Beller wrote: >> >>> On Thu, Aug 25, 2016 at 4:07 AM, wrote: >>> From: Lars Schneider >>> >>> Generate more interesting large test files >> >> How are the large test files more interesting? >> (interesting in the notion of covering

[PATCH v1] pack-protocol: fix maximum pkt-line size

2016-08-29 Thread larsxschneider
From: Lars Schneider According to LARGE_PACKET_MAX in pkt-line.h the maximal length of a pkt-line packet is 65520 bytes. The pkt-line header takes 4 bytes and therefore the pkt-line data component must not exceed 65516 bytes. Signed-off-by: Lars Schneider --- This patch was part of my "Git fil

Re: [PATCH v6 13/13] read-cache: make sure file handles are not inherited by child processes

2016-08-29 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > Consider the case of a file that requires filtering and is present in > branch A but not in branch B. If A is the current HEAD and we checkout B > then the following happens: > > 1. ce_compare_data() opens the file > 2. index_fd() dete

Re: [PATCH v6 00/13] Git filter protocol

2016-08-29 Thread Junio C Hamano
Lars Schneider writes: >> On 25 Aug 2016, at 13:07, larsxschnei...@gmail.com wrote: >> >> From: Lars Schneider >> >> The goal of this series is to avoid launching a new clean/smudge filter >> process for each file that is filtered. >> >> A short summary about v1 to v5 can be found here: >> ht

Re: [PATCH] Documentation/SubmittingPatches: add quotes to advised commit reference

2016-08-29 Thread Junio C Hamano
Jakub Narębski writes: > W dniu 27.08.2016 o 00:42, Junio C Hamano pisze: >> Stefan Beller writes: > >> -- >8 -- >> From: Beat Bolli > > ??? The primary value the change adds is to make readers aware of the gitk feature. That comes from the primary author. Not something I added, Stefan adde

Re: Crash when using git blame on untracked file

2016-08-29 Thread Junio C Hamano
Thomas Gummerer writes: > Subject: [PATCH] blame: fix segfault on untracked files > > Since 3b75ee9 ("blame: allow to blame paths freshly added to the index", > 2016-07-16) git blame also looks at the index to determine if there is a > file that was freshly added to the index. > > cache_name_pos

Re: [PATCH 1/2] gitk: align the commit summary format to the documentation

2016-08-29 Thread Jeff King
On Mon, Aug 29, 2016 at 11:17:19AM -0700, Junio C Hamano wrote: > > While it may be easier to read due to the extra mark-up, the resulting > > text where such a quotation appears does not flow well, IMO. A commit > > message text that references another commit reads more fluently > > without the q

Re: [PATCH 1/2] gitk: align the commit summary format to the documentation

2016-08-29 Thread Junio C Hamano
Johannes Sixt writes: > Am 26.08.2016 um 20:24 schrieb Junio C Hamano: >> Beat Bolli writes: >>> In 175d38c ("SubmittingPatches: document how to reference previous commits", >>> 2016-07-28) the format for referring to older commits was specified. >> >> is easier to read when pasted into a senten

Re: [PATCH v6 13/13] read-cache: make sure file handles are not inherited by child processes

2016-08-29 Thread Lars Schneider
> On 29 Aug 2016, at 20:05, Junio C Hamano wrote: > > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> Consider the case of a file that requires filtering and is present in >> branch A but not in branch B. If A is the current HEAD and we checkout B >> then the following happen

Re: [PATCH v13 00/14] libify apply and use lib in am, part 3

2016-08-29 Thread Junio C Hamano
Christian Couder writes: > Highlevel view of the patches in the series > ~~~ > > This is "part 3" of the full patch series. I am resending only the > last 14 patches of the full series as "part 3", because I don't want > to resend the first 27 patches of v1

Re: Reducing CPU load on git server

2016-08-29 Thread W. David Jarvis
> So your load is probably really spiky, as you get thundering herds of > fetchers after every push (the spikes may have a long flatline at the > top, as it takes time to process the whole herd). It is quite spiky, yes. At the moment, however, the replication fleet is relatively small (at the mome

Re: [PATCH v5 09/12] doc: revisions - define `reachable`

2016-08-29 Thread Philip Oakley
From: "Jakub Narębski" W dniu 29.08.2016 o 15:21, Philip Oakley pisze: From: "Jakub Narębski" Sent: Sunday, August 28, 2016 2:01 PM W dniu 12.08.2016 o 09:07, Philip Oakley pisze: [...] +For these commands, +specifying a single revision, using the notation described in the +previous sectio

Re: [PATCH v6 13/13] read-cache: make sure file handles are not inherited by child processes

2016-08-29 Thread Junio C Hamano
Lars Schneider writes: > I see. Thanks for the explanation. I expect the updated log message to explain the issue correctly then. >> And even on POSIX systems, if you are doing a long-running helper >> any open file descriptor in the parent process when the long-running >> helper is spawned wil

Re: Notation for current branch?

2016-08-29 Thread Junio C Hamano
Jacob Keller writes: >> What's wrong with simply using 'HEAD' for scripting? > > When you want to display the current branch to the user, e.g. when > scripting a shell prompt or similar use Wait. Even if a hypothetical version of Git understood @@ as "the current branch", how would you use that

[PATCH v2] blame: fix segfault on untracked files

2016-08-29 Thread Thomas Gummerer
Since 3b75ee9 ("blame: allow to blame paths freshly added to the index", 2016-07-16) git blame also looks at the index to determine if there is a file that was freshly added to the index. cache_name_pos returns -pos - 1 in case there is no match is found, or if the name matches, but the entry has

Re: [PATCH v13 00/14] libify apply and use lib in am, part 3

2016-08-29 Thread Junio C Hamano
Junio C Hamano writes: > Christian Couder writes: > >> Highlevel view of the patches in the series >> ~~~ >> >> This is "part 3" of the full patch series. I am resending only the >> last 14 patches of the full series as "part 3", because I don't want >> to

Re: Notation for current branch?

2016-08-29 Thread Jacob Keller
On Mon, Aug 29, 2016 at 12:49 PM, Junio C Hamano wrote: > Jacob Keller writes: > >>> What's wrong with simply using 'HEAD' for scripting? >> >> When you want to display the current branch to the user, e.g. when >> scripting a shell prompt or similar use > > Wait. Even if a hypothetical version o

Re: [PATCH 02/22] sequencer: use memoized sequencer directory path

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 10:04, Johannes Schindelin pisze: > Signed-off-by: Johannes Schindelin > --- > builtin/commit.c | 2 +- > sequencer.c | 11 ++- > sequencer.h | 5 + > 3 files changed, 8 insertions(+), 10 deletions(-) Just a sidenote: it would be probably easier to rea

Re: [PATCH] p3400: make test script executable

2016-08-29 Thread Junio C Hamano
René Scharfe writes: > Signed-off-by: Rene Scharfe > --- > This script was added by v2.10.0-rc0~3^2. Thanks. Will merge to 'master'. > > t/perf/p3400-rebase.sh | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > mode change 100644 => 100755 t/perf/p3400-rebase.sh > > diff --git a/t/per

Re: git submodules implementation question

2016-08-29 Thread Junio C Hamano
Uma Srinivasan writes: > git_dir = read_gitfile(buf.buf); > if (!git_dir) > > git_dir = buf.buf; > > Can anyone explain to me why we are replacing a failed reading of a > git file with the original sub directory name? A top-level superproject can have a submodule bound at its "di

Re: Reducing CPU load on git server

2016-08-29 Thread Ævar Arnfjörð Bjarmason
On Sun, Aug 28, 2016 at 9:42 PM, W. David Jarvis wrote: > I've run into a problem that I'm looking for some help with. Let me > describe the situation, and then some thoughts. Just a few points that you may not have considered, and I didn't see mentioned in this thread: * Consider having that q

Re: [PATCH 03/22] sequencer: avoid unnecessary indirection

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 10:04, Johannes Schindelin pisze: > We really do not need the *pointer to a* pointer to the options in > the read_populate_opts() function. Right. > Signed-off-by: Johannes Schindelin > --- > sequencer.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > di

Re: [PATCH v2 03/14] sequencer: lib'ify write_message()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > Instead of dying there, let the caller high up in the callchain > notice the error and handle it (by dying, still). > > The only caller of write_message(), do_pick_commit() already checks > the return value and passes it on to its callers, so its caller must > be alr

Re: [PATCH 20/22] sequencer: remember do_recursive_merge()'s return value

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: > diff --git a/sequencer.c b/sequencer.c > index 5ec956f..0614b90 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -623,7 +623,7 @@ static int do_pick_commit(enum todo_command command, > struct commit *commit, > const char *base_label

Re: [PATCH v2 05/14] sequencer: lib'ify do_pick_commit()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > Instead of dying there, let the caller high up in the callchain notice > the error and handle it (by dying, still). > > The only two callers of do_pick_commit(), pick_commits() and > single_pick() already check the return value and pass it on to their > callers, so t

Re: [PATCH v2 08/14] sequencer: lib'ify read_and_refresh_cache()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > Instead of dying there, let the caller high up in the callchain > notice the error and handle it (by dying, still). > > There are two call sites of read_and_refresh_cache(), one of which is > pick_commits(), whose callers were already prepared to do the right > thing

Re: [PATCH v2 10/14] sequencer: lib'ify read_populate_opts()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > Instead of dying there, let the caller high up in the callchain notice > the error and handle it (by dying, still). > > The only caller of read_populate_opts(), sequencer_continue() can > already return errors, so its caller must be already prepared to > handle error

Re: [PATCH v2 00/14] Lib'ify quite a few functions in sequencer.c

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > This patch series is one of the half dozen patch series left to move the > bulk of rebase -i into a builtin. This was a lot easier to understand compared to the previous round, and overall looked alright. Thanks.

Re: [PATCH v2 12/14] sequencer: lib'ify save_head()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > strbuf_addf(&buf, "%s\n", head); > if (write_in_full(fd, buf.buf, buf.len) < 0) > - die_errno(_("Could not write to %s"), git_path_head_file()); > + return error_errno(_("Could not write to %s"), > +

Re: Reducing CPU load on git server

2016-08-29 Thread W. David Jarvis
> * Consider having that queue of yours just send the pushed payload > instead of "pull this", see git-bundle. This can turn this sync entire > thing into a static file distribution problem. As far as I know, GHE doesn't support this out of the box. We've asked them for essentially this, though.

Re: [PATCH v2 0/4] cat-file: optionally convert to worktree version

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > When third-party tools need to access to contents of blobs in the > database, they might be more interested in the worktree version than in > the "clean" version of said contents. Just a friendly reminder before you completely shift your attention to unrelated topic

Re: git submodules implementation question

2016-08-29 Thread Junio C Hamano
On Mon, Aug 29, 2016 at 2:03 PM, Uma Srinivasan wrote: > On Mon, Aug 29, 2016 at 1:03 PM, Junio C Hamano wrote: >> >> A top-level superproject can have a submodule bound at its "dir/" >> directory, and "dir/.git" can either be a gitfile which you can read >> with read_gitfile() and point into som

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
Thanks for the reply. However, in this case git clone $URL ./dir2 git add dir2 how will "dir2" get ever get registered as a submodule? I don't see how one can reach the "is_submodule_modified" routine for the scenario above. My understanding is that a sub-directory can be registe

Re: [PATCH 20/22] sequencer: remember do_recursive_merge()'s return value

2016-08-29 Thread Junio C Hamano
Jakub Narębski writes: > W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: > >> diff --git a/sequencer.c b/sequencer.c >> index 5ec956f..0614b90 100644 >> --- a/sequencer.c >> +++ b/sequencer.c >> @@ -623,7 +623,7 @@ static int do_pick_commit(enum todo_command command, >> struct commit *comm

  1   2   >