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

2016-08-29 Thread Johannes Sixt
Am 29.08.2016 um 23:59 schrieb Jakub Narębski: W dniu 29.08.2016 o 10:04, Johannes Schindelin pisze: -#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, NULL } +#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, NULL,

Re: Subtree Split Includes Commits Outside Prefix Directory

2016-08-29 Thread ELI
Hey David, Did this give you the repro case that you needed? - Harpreet "Eli" Sangha On Thu, Jun 23, 2016 at 7:32 PM, ELI wrote: > Attempting to resend without HTML... > > - Harpreet "Eli" Sangha > > > On Thu, Jun 23, 2016 at 7:18 PM, ELI wrote: >> Sorry

Re: [PATCH 4/6] require_clean_work_tree: ensure that the index was read

2016-08-29 Thread Junio C Hamano
Junio C Hamano writes: > I am not sure if it should be left as the responsibility of the > caller (i.e. check the_index.initialized to bark at a caller that > forgets to read from an index) ... Scatch that. That would not work in a freshly created repository before doing any

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
This is great! Thanks Jake. If you happen to have the patch ID it would be helpful. Uma On Mon, Aug 29, 2016 at 5:02 PM, Jacob Keller wrote: > On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano wrote: >> Uma Srinivasan writes:

Re: git submodules implementation question

2016-08-29 Thread Jacob Keller
On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano wrote: > Uma Srinivasan writes: >> This fixes my issue but what do you think? Is this the right way to >> fix it? Is there a better way? > > I think we already have a helper function that does a lot

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
Yes, is_git_directory() is much better. Thanks for the pointer. I will submit a patch unless I hear more suggestions from others. Uma On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano wrote: > Uma Srinivasan writes: > >> On Mon, Aug 29, 2016 at 2:13

Re: git submodules implementation question

2016-08-29 Thread Junio C Hamano
Uma Srinivasan writes: > On Mon, Aug 29, 2016 at 2:13 PM, Uma Srinivasan > wrote: >> Ok that makes sense. Thanks much. >> >> Uma >> > With respect to my original problem with a corrupted .git directory > under the submodule directory, I am

Re: [PATCH 5/6] Export also the has_un{staged,committed}_changed() functions

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > diff --git a/wt-status.h b/wt-status.h > index cc4e5a3..75833c1 100644 > --- a/wt-status.h > +++ b/wt-status.h > @@ -115,6 +115,8 @@ void status_printf_ln(struct wt_status *s, const char > *color, const char *fmt, . >

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
With respect to my original problem with a corrupted .git directory under the submodule directory, I am thinking of adding the following 4 lines marked with ### to is_submodule_modified() to detect the corrupted dir and die quickly instead of forking several child processes:

Re: [PATCH 4/6] require_clean_work_tree: ensure that the index was read

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > The function would otherwise pretend to work fine, but totally ignore > the working directory. s/^T/Unless the caller has already read the index, t/; I am not sure if it should be left as the responsibility of the caller (i.e. check

Re: [PATCH 2/6] pull: make code more similar to the shell script again

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > +static int require_clean_work_tree(const char *action, const char *hint, > + int gently) > { > struct lock_file *lock_file = xcalloc(1, sizeof(*lock_file)); > - int do_die = 0; > + int err = 0; > >

Re: [PATCH 1/6] pull: drop confusing prefix parameter of die_on_unclean_work_tree()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > -static int has_unstaged_changes(const char *prefix) > +static int has_unstaged_changes(void) > { > struct rev_info rev_info; > int result; > > - init_revisions(_info, prefix); > + init_revisions(_info, NULL); >

Re: Reducing CPU load on git server

2016-08-29 Thread W. David Jarvis
> Pegging CPU for a few seconds doesn't sound out-of-place for > pack-objects serving a fetch or clone on a large repository. And I can > certainly believe "minutes", especially if it was not serving a fetch, > but doing repository maintenance on a large repository. > > Talk to GitHub Enterprise

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

2016-08-29 Thread brian m. carlson
On Mon, Aug 29, 2016 at 05:43:41PM +0200, Johannes Schindelin wrote: > Hi Kuba, > > On Mon, 29 Aug 2016, Jakub Narębski wrote: > > > I wonder if writing this patch series (or rather the following one) > > would be helped by using one of semantic patch tools, such as > > Coccinelle[1], spdiff[2],

Re: [PATCH v6 12/13] convert: add filter..process option

2016-08-29 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > +In case the filter cannot or does not want to process the content, > +it is expected to respond with an "error" status. Depending on the > +`filter..required` flag Git will interpret that as error > +but it will not stop or restart the filter process. >

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

2016-08-29 Thread brian m. carlson
On Mon, Aug 29, 2016 at 03:02:56PM +0800, Paul Tan wrote: > 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 > >

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

2016-08-29 Thread Jakub Narębski
W dniu 29.08.2016 o 10:04, Johannes Schindelin pisze: > 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,

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

2016-08-29 Thread Junio C Hamano
Brian Henderson writes: > How does this look? > > Drawing the graph helped me a lot in figuring out what I was > actually testing. thanks! Yeah, I also am pleased to see the picture of what is being tested in the test script. With your sign-off, they would have been

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

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > +/* We will introduce the 'interactive rebase' mode later */ > +#define IS_REBASE_I() 0 I do not see a point in naming this all caps. The use site would be a lot more pleasant to read when the reader does not have to care if this is

Re: Reducing CPU load on git server

2016-08-29 Thread Dennis Kaarsemaker
On ma, 2016-08-29 at 13:57 -0700, W. David Jarvis wrote: > >  * If you do need branches consider archiving stale tags/branches > > after some time. I implemented this where I work, we just have a > > $REPO-archive.git with every tag/branch ever created for a given > > $REPO.git, and delete refs

Re: Reducing CPU load on git server

2016-08-29 Thread Jeff King
On Mon, Aug 29, 2016 at 12:16:20PM -0700, W. David Jarvis wrote: > > Do you know which processes are generating the load? git-upload-pack > > does the negotiation, and then pack-objects does the actual packing. > > When I look at expensive operations (ones that I can see consuming > 90%+ of a

Re: [PATCH v2] blame: fix segfault on untracked files

2016-08-29 Thread Junio C Hamano
Thomas Gummerer writes: >> The point of this fix is not that we show the exact error message, >> but we fail in a controlled manner. I think >> >> test_expect_success 'blame untracked file in empty repo' ' >>>untracked && >>test_must_fail

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

2016-08-29 Thread Junio C Hamano
Junio C Hamano writes: >> +if (git_config_from_file(populate_opts_cb, git_path_opts_file(), *opts) >> < 0) >> +return error(_("Malformed options sheet: %s"), >> +git_path_opts_file()); >> +return 0; > > As discussed, perhaps have a

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
Ok that makes sense. Thanks much. Uma On Mon, Aug 29, 2016 at 2:09 PM, Junio C Hamano wrote: > 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

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, >>

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

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

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

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 12/14] sequencer: lib'ify save_head()

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > strbuf_addf(, "%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: [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 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

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

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

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

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

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

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

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

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

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

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

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

[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: 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

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

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

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

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

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

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

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

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

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

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

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

[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

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

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

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 >

[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

[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.

[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

[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 ---

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

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 =

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; >>> +

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

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: >

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 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 >>>

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; > @@ >

[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

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

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) > >

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

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.

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

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 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

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 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 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

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

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

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: 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: 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)

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

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 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: 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

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: [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() >>

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?"

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 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 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

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

[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

  1   2   >