[PATCH v4 1/2] pack-objects: break delta cycles before delta-search phase

2016-08-10 Thread Jeff King
On Thu, Aug 11, 2016 at 01:02:52AM -0400, Jeff King wrote: > Yeah, I think we would be better to just switch to printf if we want to > be careful. > > I'll follow-up with a patch. Here it is. It switches out the echos for printfs (which, ironically, _do_ complain about the "-" argument if you

Re: [PATCH v3 1/2] pack-objects: break delta cycles before delta-search phase

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 01:17:22PM -0700, Junio C Hamano wrote: > > Actually, skimming the sha1_file code, I am not 100% sure that we detect > > cycles in OBJ_REF_DELTA (you cannot have cycles in OBJ_OFS_DELTA since > > they always point backwards in the pack). But if that is the case, then > > I

Re: [PATCH v3 0/2] pack-objects mru

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 09:47:52AM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> This is not new with this change, but I am not quite sure what in > >> the current code prevents us from busting the delta limit for reused > >> ones, though. > > > > I think in the current

Re: [PATCH 5/8] xdl_change_compact(): fix compaction heuristic to adjust io

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 06:58:06PM +0200, Michael Haggerty wrote: > > And it looks like rchgo[io] always ends the loop on a 0. So it seems > > like we would just hit that condition again. > > Correct...in this loop. But there is another place where `io` is > incremented unconditionally. In the

[ANNOUNCE] tig-2.2

2016-08-10 Thread Jonas Fonseca
Hello, I've just released the 35th release of Tig. It brings several search improvements such as highlighting and wrap around, and machinery for future support of typeahead search. This release also gives more choice over how the user configuration file is loaded either at built-time or at

Re: Alternatives to mid.gmane.org?

2016-08-10 Thread Eric Wong
Eric Wong wrote: > Duy Nguyen wrote: > > I read this and thought "temporarily" but apparently it's not [1]. A > > lot of our links in the mail archive are gmane's :( > > > > [1] https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/ > > I may not have time

What's cooking (preview)

2016-08-10 Thread Junio C Hamano
Just the highlights for today, as we had one on just a few days ago. I also plan to tag 2.9.3 out of the tonight's tip of 'maint'. Thanks. [Graduated to "master"] * cc/mailmap-tuxfamily (2016-08-08) 1 commit (merged to 'next' on 2016-08-10 at 5905fbf) + .mailmap: use Christian Couder's

Re: [PATCH v5 9/9] status: unit tests for --porcelain=v2

2016-08-10 Thread Jeff Hostetler
On 08/10/2016 06:41 PM, Junio C Hamano wrote: Jeff Hostetler writes: Having said all that, it is OK to fix their titles after the current 9-patch series lands on 'next'; incremental refinements are easier on reviewers than having to review too many rerolls. I'll

[PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
From: Jacob Keller This will be used by a future patch which implements a diff mode for submodule display. Without this, the diff output would incorrectly display when using both -p and --graph during a git-log. Note that the --line-prefix will be displayed first prior

[PATCH v4 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
From: Jacob Keller Teach git-diff and friends a new format for displaying the difference of a submodule using git-diff inside the submodule project. This allows users to easily see exactly what source changed in a given commit that updates the submodule pointer. To do

Re: [PATCH v5 05/15] pkt-line: add packet_write_gently_fmt()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:43, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote: > >> +int packet_write_gently_fmt(int fd, const char *fmt, ...) >> +{ >> +static struct strbuf buf = STRBUF_INIT; >> +va_list args; >> + >> +

[PATCH v12 06/13] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2016-08-10 Thread Pranit Bauva
is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

Re: [PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 2:58 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> As suggested by Junio, I implemented --line-prefix to enable the graph >> display correctly. This works by a neat trick of adding to the msgbuf, >> so no code needs to

Re: [PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 2:58 PM, Junio C Hamano wrote: > You might be envisioning a future enhancement where the recursive > one uses not "-Submodule commit A"/"-Submodule commit B", and not > "diff A B", but "log -p A...B" in the submodule, and in such a case, > it might make

Re: Forward declaration of enum iterator_selection?

2016-08-10 Thread Michael Haggerty
On 08/08/2016 06:30 PM, Johannes Sixt wrote: > Am 07.08.2016 um 22:34 schrieb Ramsay Jones: >> [...] I would rather the 'enum iterator_selection' be defined >> before this declaration. One solution could be to #include "iterator.h" >> prior to _all_ #include "refs/refs-internal.h" in all

Re: [PATCH] checkout: do not mention detach advice for explicit --detach option

2016-08-10 Thread Stefan Beller
On Wed, Aug 10, 2016 at 10:32 AM, Jonathan Nieder wrote: > Stefan Beller wrote: > >> When a user asked for a detached HEAD specifically with `--detach`, >> we do not need to give advice on what a detached HEAD state entails as >> we can assume they know what they're getting

Re: [PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 3:05 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> @@ -2305,6 +2311,15 @@ static void builtin_diff(const char *name_a, >> struct strbuf header = STRBUF_INIT; >> const char *line_prefix = diff_line_prefix(o);

Re: [PATCH v5 9/9] status: unit tests for --porcelain=v2

2016-08-10 Thread Junio C Hamano
Jeff Hostetler writes: > In my brief testing, the existing porcelain status reports it as "AM" > (for both a file with content and an empty file). > > The V2 code outputs the following: > 1 AM N... 00 100644 100644 OK, so they are consistent, which is good. >>

[PATCH v12 11/13] bisect--helper: `bisect_next_check` & bisect_voc shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement `bisect_next_check` shell function in C and add `bisect-next-check` subcommand to `git bisect--helper` to call it from git-bisect.sh . Also reimplement `bisect_voc` shell function in C and call it from `bisect_next_check` implementation in C. Using `--bisect-next-check` is a

[PATCH v12 09/13] bisect--helper: `bisect_write` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement the `bisect_write` shell function in C and add a `bisect-write` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-write` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions are ported,

Re: [PATCH v12 01/13] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-08-10 Thread Pranit Bauva
Here[1] is the link for interdiff. Sorry could not send a cover patch or put it in here. I am under a proxy which blocks IMAP/SMTP connections and gmail wraps the lines. [1]: http://paste.ubuntu.com/22794990/ Regards, Pranit Bauva -- To unsubscribe from this list: send the line "unsubscribe git"

[PATCH v12 05/13] t6030: explicitly test for bisection cleanup

2016-08-10 Thread Pranit Bauva
Add test to explicitly check that 'git bisect reset' is working as expected. This is already covered implicitly by the test suite. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

[PATCH v12 04/13] bisect--helper: `bisect_clean_state` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement `bisect_clean_state` shell function in C and add a `bisect-clean-state` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-clean-state` subcommand is a measure to port shell function to C so as to use the existing test suite. As more functions are

[PATCH v12 08/13] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement `is_expected_rev` & `check_expected_revs` shell function in C and add a `--check-expected-revs` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--check-expected-revs` subcommand is a temporary measure to port shell functions to C so as to use the existing

[PATCH v12 12/13] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement the `get_terms` and `bisect_terms` shell function in C and add `bisect-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions

[PATCH v12 01/13] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-08-10 Thread Pranit Bauva
`--next-all` is meant to be used as a subcommand to support multiple "operation mode" though the current implementation does not contain any other subcommand along side with `--next-all` but further commits will include some more subcommands. Helped-by: Johannes Schindelin

[PATCH v12 13/13] bisect--helper: `bisect_start` shell function partially in C

2016-08-10 Thread Pranit Bauva
Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function. `bisect_start` shell function will be completed after the `bisect_next`

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-08-10 Thread Josh Triplett
On August 9, 2016 11:37:31 PM HST, Richard Ipsum wrote: >On Thu, Aug 04, 2016 at 12:40:58PM -1000, Josh Triplett wrote: >> On Wed, Aug 03, 2016 at 08:12:02PM +0100, Richard Ipsum wrote: >> > On Thu, Jul 28, 2016 at 11:40:55PM -0700, Josh Triplett wrote: >> > > I'd

Re: [PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Junio C Hamano
Jacob Keller writes: > @@ -2305,6 +2311,15 @@ static void builtin_diff(const char *name_a, > struct strbuf header = STRBUF_INIT; > const char *line_prefix = diff_line_prefix(o); > > + diff_set_mnemonic_prefix(o, "a/", "b/"); > + if (DIFF_OPT_TST(o,

[PATCH v12 02/13] bisect: rewrite `check_term_format` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement the `check_term_format` shell function in C and add a `--check-term-format` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-term-format` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more

[PATCH v12 07/13] bisect--helper: `bisect_reset` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `bisect_reset` subcommand is a temporary measure to port shell functions to C so as to use the existing test suite. As more functions are ported, this

[PATCH v12 03/13] bisect--helper: `write_terms` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement the `write_terms` shell function in C and add a `write-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Also remove the subcommand `--check-term-format` as it can now be called from inside the function write_terms() C implementation. Also `|| exit` is added

Re: [PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Junio C Hamano
Jacob Keller writes: > As suggested by Junio, I implemented --line-prefix to enable the graph > display correctly. This works by a neat trick of adding to the msgbuf, > so no code needs to be altered. I presumed that the line prefix should > go *after* the graphs own

[PATCH v12 10/13] bisect--helper: `check_and_set_terms` shell function in C

2016-08-10 Thread Pranit Bauva
Reimplement the `check_and_set_terms` shell function in C and add `check-and-set-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-and-set-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more

Re: [PATCH v5 03/15] pkt-line: add `gentle` parameter to format_packet()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:37, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:29:26PM +0200, Lars Schneider wrote: > >> >>> On 10 Aug 2016, at 15:15, Jeff King wrote: >>> >>> On Wed, Aug 10, 2016 at 03:03:59PM +0200, larsxschnei...@gmail.com wrote: >>>

Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs

2016-08-10 Thread Junio C Hamano
Michael Haggerty writes: >> After >> all, somebody in this file is already scanning each and every line >> to see where it ends to split the input into records, so perhaps a >> "right" (if the "theoretical correctness" of the return value from >> this function mattered,

Re: [PATCH 5/8] xdl_change_compact(): fix compaction heuristic to adjust io

2016-08-10 Thread Michael Haggerty
On 08/04/2016 09:27 AM, Jeff King wrote: > On Thu, Aug 04, 2016 at 12:00:33AM +0200, Michael Haggerty wrote: > >> The code branch used for the compaction heuristic incorrectly forgot to >> keep io in sync while the group was shifted. I think that could have >> led to reading past the end of the

Re: [PATCH v5 9/9] status: unit tests for --porcelain=v2

2016-08-10 Thread Jeff Hostetler
On 08/08/2016 01:07 PM, Junio C Hamano wrote: Jeff Hostetler writes: +test_expect_success pre_initial_commit_0 ' + ... + git status --porcelain=v2 --branch --untracked-files=normal >actual && + test_cmp expect actual +' + + +test_expect_success

[PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
From: Jacob Keller This will be used by a future patch which implements a diff mode for submodule display. Without this, the diff output would incorrectly display when using both -p and --graph during a git-log. Signed-off-by: Jacob Keller --- As

Re: patch submission process, was Re: [PATCH v6 06/16] merge_recursive: abort properly upon errors

2016-08-10 Thread Junio C Hamano
Josh Triplett writes: >> But submission is less important than review. And for review it is >> usually better (except gigantic series) to have patch text for review >> with the review. > > Agreed. However, submission typically requires more work than review, > because the

Re: [PATCH RFC v2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Junio C Hamano
Jacob Keller writes: >>> + diff = fdopen(cp.out, "r"); >>> + >>> + c = fgetc(diff); >>> + while (c != EOF) { >>> + fputc(c, f); >>> + c = fgetc(diff); >>> + } >>> + >>> + fclose(diff); >>> + finish_command(); >> >> I do not

[PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
From: Jacob Keller For projects which have frequent updates to submodules it is often useful to be able to see a submodule update commit as a difference. Teach diff's --submodule= a new "diff" format which will execute a diff for the submodule between the old and new

Re: [PATCH 2/8] xdl_change_compact(): clarify code

2016-08-10 Thread Stefan Beller
On Wed, Aug 10, 2016 at 9:39 AM, Michael Haggerty wrote: > > I realized that the main thing that took me a while to grok when I was > reading this code was that blank_lines was really only used as a boolean > value, even though it was updated with "+=". That's the main

[PATCH] t7406: fix breakage on OSX

2016-08-10 Thread Stefan Beller
On OSX `wc` prefixes the output of numbers with whitespace, such that the `commit_count` would be "SP ". When using that in git submodule update --init --depth=$commit_count the depth would be empty and the number is interpreted as the pathspec. Fix this by not using `wc` and rather instruct

Re: [PATCH] http-backend: buffer headers before sending

2016-08-10 Thread Junio C Hamano
Eric Wong writes: > diff --git a/http-backend.c b/http-backend.c > index 0d59499..adc8c8c 100644 > --- a/http-backend.c > +++ b/http-backend.c > @@ -75,55 +75,57 @@ static void format_write(int fd, const char *fmt, ...) > write_or_die(fd, buffer, n); > } > > -static void

Re: [PATCH] merge: use string_list_split() in add_strategies()

2016-08-10 Thread Junio C Hamano
Johannes Schindelin writes: > All true, but I guess this type of complexity would really complexify > René's patch too much, so I am comfortable with the patch as-is. Yeah, good that we reached the same conclusion, as my point was that for_each_word() would not be

Re: git svn --version requires working copy

2016-08-10 Thread Junio C Hamano
Michal Čihař writes: > I've just noticed, that running git svn --version requires working copy, > what is quite ugly to require working copy just to figure out if git svn > is installed and what version. > > $ git svn --version > fatal: Not a git repository (or any parent up to

Re: [PATCH] t7406: fix breakage on OSX

2016-08-10 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Aug 10, 2016 at 11:27 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> On OSX `wc` prefixes the output of numbers with whitespace, such that >>> the `commit_count` would be "SP ". When using

Re: [PATCHv2 0/6] git clone: Marry --recursive and --reference

2016-08-10 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Aug 9, 2016 at 2:45 PM, Junio C Hamano wrote: >> becomes easily doable (i.e. subsequent "submodule update" can realize >> that the submodule does not have alternates but it could borrow from >> the submodule in the

Re: [PATCH] http-backend: buffer headers before sending

2016-08-10 Thread Eric Wong
Jeff King wrote: > On Tue, Aug 09, 2016 at 11:47:31PM +, Eric Wong wrote: > > > Avoid waking up the readers for unnecessary context switches for > > each line of header data being written, as all the headers are > > written in short succession. > > > > It is unlikely any

Re: [PATCH 5/8] xdl_change_compact(): fix compaction heuristic to adjust io

2016-08-10 Thread Michael Haggerty
On 08/04/2016 08:43 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> The code branch used for the compaction heuristic incorrectly forgot to >> keep io in sync while the group was shifted. I think that could have >> led to reading past the end of the rchgo array. >

Re: [PATCH v5 05/15] pkt-line: add packet_write_gently_fmt()

2016-08-10 Thread Junio C Hamano
Jeff King writes: > On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote: > >> +int packet_write_gently_fmt(int fd, const char *fmt, ...) >> +{ >> +static struct strbuf buf = STRBUF_INIT; >> +va_list args; >> + >> +strbuf_reset(); >> +

Re: [PATCH RFC v2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Tue, Aug 9, 2016 at 5:53 PM, Stefan Beller wrote: > This is not used any more, but the child is run directly below? > unsigned char one[20], unsigned char two[20]) >> +{ > Yea I meant to take it all out and forgot. Will be gone in v3. > > This pattern seems

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

2016-08-10 Thread Eric Wong
Brian Henderson wrote: Hi Brian, A few minor portability/style nits below, but contrib/ probably (still?) has laxer rules than the rest of git... I think we still require Signed-off-by lines in contrib, though... > +++ b/contrib/diff-highlight/t/Makefile > @@ -0,0

Re: [PATCH v3 1/2] pack-objects: break delta cycles before delta-search phase

2016-08-10 Thread Junio C Hamano
Jeff King writes: > ... > We could do analysis on any cycles that we find to > distinguish the two cases (i.e., it is a bogus pack if and > only if every delta in the cycle is in the same pack), but > we don't need to. If there is a cycle inside a pack, we'll > run into problems

Re: [PATCH RFC v2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Tue, Aug 9, 2016 at 8:37 PM, Junio C Hamano wrote: > Jacob Keller writes: >> + cp.dir = path; >> + cp.out = -1; >> + cp.no_stdin = 1; >> + argv_array_push(, "diff"); >> + argv_array_pushf(, "--src-prefix=a/%s/", path);

Re: [PATCH v5 02/15] pkt-line: call packet_trace() only if a packet is actually send

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:13, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:03:58PM +0200, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> The packet_trace() call is not ideal in format_packet() as we would print >> a trace when a

Re: [PATCH 6/8] xdl_change_compact(): keep track of the earliest end

2016-08-10 Thread Michael Haggerty
On 08/04/2016 08:46 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> This makes it easier to detect whether shifting is possible, and will >> also make the next change easier. > > I can see the code keeping track of earliest_end but the above does > not make it

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Junio C Hamano
Jeff King writes: > On Wed, Aug 10, 2016 at 03:36:45PM +0200, Lars Schneider wrote: > >> > So now we have packet_write() and packet_write_gently(), but they differ >> > in more than just whether they are gentle. That seems like a weird >> > interface. >> > >> > Should we either

git svn --version requires working copy

2016-08-10 Thread Michal Čihař
Hi I've just noticed, that running git svn --version requires working copy, what is quite ugly to require working copy just to figure out if git svn is installed and what version. $ git svn --version fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-08-10 Thread Richard Ipsum
On Thu, Aug 04, 2016 at 12:40:58PM -1000, Josh Triplett wrote: > On Wed, Aug 03, 2016 at 08:12:02PM +0100, Richard Ipsum wrote: > > On Thu, Jul 28, 2016 at 11:40:55PM -0700, Josh Triplett wrote: > > > I'd welcome any feedback, whether on the interface and workflow, the > > > internals and

Re: patch submission process, was Re: [PATCH v6 06/16] merge_recursive: abort properly upon errors

2016-08-10 Thread Jakub Narębski
On 10 August 2016 at 02:55, Josh Triplett wrote: > On Tue, Aug 09, 2016 at 06:28:00PM +, Eric Wong wrote: >> Some of these problems I hope public-inbox (or something like >> it) can fix and turn the tide towards email, again. > > This really seems like the dichotomy

[PATCH v2 2/3] i18n: archive: mark errors for translation

2016-08-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- archive.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archive.c b/archive.c index 42df974..dde1ab4 100644 --- a/archive.c +++ b/archive.c @@ -458,11 +458,11 @@ static int parse_archive_args(int argc, const

[PATCH v2 3/3] i18n: git-stash: mark messages for translation

2016-08-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- I added the second mark that I had missed the first time. Thank you Junio C Hamano for spotting that. git-stash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 22fb8bc..826af18

[PATCH v5 03/15] pkt-line: add `gentle` parameter to format_packet()

2016-08-10 Thread larsxschneider
From: Lars Schneider format_packet() dies if the caller wants to format a packet larger than LARGE_PACKET_MAX. Certain callers might prefer an error response instead. Add a parameter `gentle` to define if the function should signal an error with the return value

[PATCH] checkout: do not mention detach advice for explicit --detach option

2016-08-10 Thread Stefan Beller
When a user asked for a detached HEAD specifically with `--detach`, we do not need to give advice on what a detached HEAD state entails as we can assume they know what they're getting into as they asked for it. Signed-off-by: Stefan Beller --- builtin/checkout.c | 2 +- 1

[PATCH v2 1/3] i18n: setup: mark error messages for translation

2016-08-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- setup.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.c b/setup.c index 6d0e0c9..fe572b8 100644 --- a/setup.c +++ b/setup.c @@ -759,9 +759,9 @@ static const char *setup_bare_git_dir(struct

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:28, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:04:00PM +0200, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> packet_write() has two shortcomings. First, it uses format_packet() which >> lets the caller

[PATCH v5 02/15] pkt-line: call packet_trace() only if a packet is actually send

2016-08-10 Thread larsxschneider
From: Lars Schneider The packet_trace() call is not ideal in format_packet() as we would print a trace when a packet is formatted and (potentially) when the packet is actually send. This was no problem up until now because format_packet() was only used by one function.

[PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread larsxschneider
From: Lars Schneider packet_write() has two shortcomings. First, it uses format_packet() which lets the caller only send string data via "%s". That means it cannot be used for arbitrary data that may contain NULs. Second, it will always die on error. Add

[PATCH v5 11/15] convert: modernize tests

2016-08-10 Thread larsxschneider
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 "<". Signed-off-by: Lars Schneider --- t/t0021-conversion.sh | 62

Re: [PATCH v5 03/15] pkt-line: add `gentle` parameter to format_packet()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:15, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:03:59PM +0200, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> format_packet() dies if the caller wants to format a packet larger than >> LARGE_PACKET_MAX.

Re: [PATCH RFC] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Johannes Sixt
Am 10.08.2016 um 00:56 schrieb Jacob Keller: On Tue, Aug 9, 2016 at 3:50 PM, Stefan Beller wrote: On Tue, Aug 9, 2016 at 3:32 PM, Jacob Keller wrote: + if (strbuf_read(buf, cp.out, 0) < 0) So we keep the whole diff in memory I don't know

Re: [PATCH] http-backend: buffer headers before sending

2016-08-10 Thread Jeff King
On Tue, Aug 09, 2016 at 11:47:31PM +, Eric Wong wrote: > Avoid waking up the readers for unnecessary context switches for > each line of header data being written, as all the headers are > written in short succession. > > It is unlikely any HTTP/1.x server would want to read a CGI > response

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:04:00PM +0200, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > packet_write() has two shortcomings. First, it uses format_packet() which > lets the caller only send string data via "%s". That means it cannot be > used for arbitrary

[PATCH v5 07/15] pkt-line: add functions to read/write flush terminated packet streams

2016-08-10 Thread larsxschneider
From: Lars Schneider packet_write_stream_with_flush_from_fd() and packet_write_stream_with_flush_from_buf() write a stream of packets. All content packets use the maximal packet size except for the last one. After the last content packet a `flush` control packet is

Re: patch submission process, was Re: [PATCH v6 06/16] merge_recursive: abort properly upon errors

2016-08-10 Thread Josh Triplett
On Wed, Aug 10, 2016 at 09:30:01AM +0200, Jakub Narębski wrote: > On 10 August 2016 at 02:55, Josh Triplett wrote: > > On Tue, Aug 09, 2016 at 06:28:00PM +, Eric Wong wrote: > >> Some of these problems I hope public-inbox (or something like > >> it) can fix and turn the

[PATCH v5 13/15] convert: make apply_filter() adhere to standard Git error handling

2016-08-10 Thread larsxschneider
From: Lars Schneider apply_filter() returns a boolean that tells the caller if it "did convert or did not convert". The variable `ret` was used throughout the function to track errors wheras `1` denoted success and `0` failure. This is unusual for the Git source where

Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs

2016-08-10 Thread Michael Haggerty
On 08/04/2016 02:04 AM, Stefan Beller wrote: > On Wed, Aug 3, 2016 at 4:30 PM, Michael Haggerty wrote: >> Stefan Beller wrote: >>> [...] >>> Rather the 10 describes the ratio of "advanced magic" to pure indentation >>> based scoring in my understanding. >> >> No, it's

Re: git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-08-10 Thread Stephen Morton
On Mon, Aug 1, 2016 at 5:12 AM, Johannes Schindelin wrote: > Hi Stephen, > > On Wed, 27 Jul 2016, Stephen Morton wrote: > >> On Wed, Jul 27, 2016 at 11:03 AM, Johannes Schindelin >> wrote: >> > >> > On Wed, 27 Jul 2016, Stephen Morton

Re: [PATCH v5 05/15] pkt-line: add packet_write_gently_fmt()

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 04:10:02PM +0200, Lars Schneider wrote: > > > On 10 Aug 2016, at 15:43, Jeff King wrote: > > > > On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote: > > > >> +int packet_write_gently_fmt(int fd, const char *fmt, ...) > >> +{ > >> +

[PATCH v5 10/15] convert: quote filter names in error messages

2016-08-10 Thread larsxschneider
From: Lars Schneider Git filter driver commands with spaces (e.g. `filter.sh foo`) are hard to read in error messages. Quote them to improve the readability. Signed-off-by: Lars Schneider --- convert.c | 12 ++-- 1 file changed, 6

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 20:21, Junio C Hamano wrote: > > Lars Schneider writes: > >>> On 10 Aug 2016, at 19:17, Junio C Hamano wrote: >>> >> OK. Does this mean I can leave the "packet_write()" to "packet_write_fmt()" >> rename as

Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs

2016-08-10 Thread Michael Haggerty
On 08/04/2016 09:39 PM, Junio C Hamano wrote: > Michael Haggerty writes: > + } + /* +* We have reached the end of the line without finding any non-space +* characters; i.e., the whole line consists of trailing spaces,

[PATCH v5 06/15] pkt-line: add packet_flush_gently()

2016-08-10 Thread larsxschneider
From: Lars Schneider packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet and returns `0` for success and `-1` for failure. Signed-off-by: Lars

Re: [PATCH] merge: use string_list_split() in add_strategies()

2016-08-10 Thread Johannes Schindelin
Hi Junio, On Mon, 8 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > I wonder, however, if we could somhow turn things around by > > introducing something like > > > > split_and_do_for_each(item_p, length, string, delimiter) > >

Re: git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-08-10 Thread Stephen Morton
On Mon, Aug 1, 2016 at 5:12 AM, Johannes Schindelin wrote: Hi Stephen, On Wed, 27 Jul 2016, Stephen Morton wrote: On Wed, Jul 27, 2016 at 11:03 AM, Johannes Schindelin wrote: > > On Wed, 27 Jul 2016, Stephen Morton wrote: > >>

Re: [PATCH v5 02/15] pkt-line: call packet_trace() only if a packet is actually send

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 15:30, Jeff King wrote: > > On Wed, Aug 10, 2016 at 03:24:38PM +0200, Lars Schneider wrote: > >>> On Wed, Aug 10, 2016 at 03:03:58PM +0200, larsxschnei...@gmail.com wrote: >>> From: Lars Schneider The

Re: t0027 racy?

2016-08-10 Thread Johannes Schindelin
Hi Torsten, On Tue, 9 Aug 2016, Torsten Bögershausen wrote: > > git -c core.autocrlf=$crlf add $fname >"${pfx}_$f.err" 2>&1 > > > > would make more sense. We _know_ that we have to do convert_to_git() in > > that step because the content is changed. And then you can ignore the > > warnings

Re: [PATCH] t7406: fix breakage on OSX

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 19:56, Stefan Beller wrote: > > On OSX `wc` prefixes the output of numbers with whitespace, such that > the `commit_count` would be "SP ". When using that in > >git submodule update --init --depth=$commit_count > > the depth would be empty and the

Re: [PATCH v5 02/15] pkt-line: call packet_trace() only if a packet is actually send

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:24:38PM +0200, Lars Schneider wrote: > > On Wed, Aug 10, 2016 at 03:03:58PM +0200, larsxschnei...@gmail.com wrote: > > > >> From: Lars Schneider > >> > >> The packet_trace() call is not ideal in format_packet() as we would print > >> a trace

[PATCH v5 12/15] convert: generate large test files only once

2016-08-10 Thread larsxschneider
From: Lars Schneider Generate more interesting large test files with pseudo random characters in between and reuse these test files in multiple tests. Run tests formerly marked as EXPENSIVE every time but with a smaller data set. Signed-off-by: Lars Schneider

Re: [PATCH v5 05/15] pkt-line: add packet_write_gently_fmt()

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:04:01PM +0200, larsxschnei...@gmail.com wrote: > +int packet_write_gently_fmt(int fd, const char *fmt, ...) > +{ > + static struct strbuf buf = STRBUF_INIT; > + va_list args; > + > + strbuf_reset(); > + va_start(args, fmt); > + format_packet(1, ,

Re: [PATCH v10 33/40] environment: add set_index_file()

2016-08-10 Thread Christian Couder
On Tue, Aug 9, 2016 at 12:13 AM, Junio C Hamano wrote: > Christian Couder writes: > >> Now if someone really needs to use this new function, it should be >> used like this: >> >> /* Save current index file */ >> old_index_file =

[PATCH v5 00/15] Git filter protocol

2016-08-10 Thread larsxschneider
From: Lars Schneider Hi all, ## Notable changes since v4 * drop the shutdown capability * add error-all response to signal that the filter does not want to filter anymore * extend init sequence to negotiate version number and capabilities (plus detect wrongly

[PATCH v3 1/2] pack-objects: break delta cycles before delta-search phase

2016-08-10 Thread Jeff King
We do not allow cycles in the delta graph of a pack (i.e., A is a delta of B which is a delta of A) for the obvious reason that you cannot actually access any of the objects in such a case. There's a last-ditch attempt to notice cycles during the write phase, during which we issue a warning to

[PATCH v5 01/15] pkt-line: extract set_packet_header()

2016-08-10 Thread larsxschneider
From: Lars Schneider set_packet_header() converts an integer to a 4 byte hex string. Make this function locally available so that other pkt-line functions can use it. Signed-off-by: Lars Schneider --- pkt-line.c | 18 -- 1

Re: [PATCH] t7406: fix breakage on OSX

2016-08-10 Thread Stefan Beller
On Wed, Aug 10, 2016 at 11:27 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> On OSX `wc` prefixes the output of numbers with whitespace, such that >> the `commit_count` would be "SP ". When using that in >> >> git submodule update --init

Re: [PATCH v5 04/15] pkt-line: add packet_write_gently()

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:36:45PM +0200, Lars Schneider wrote: > > So now we have packet_write() and packet_write_gently(), but they differ > > in more than just whether they are gentle. That seems like a weird > > interface. > > > > Should we either be picking a new name (e.g.,

[PATCH v5 15/15] read-cache: make sure file handles are not inherited by child processes

2016-08-10 Thread larsxschneider
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() detects that the file

  1   2   >