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

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

2016-08-10 Thread Vasco Almeida
A Ter, 09-08-2016 às 12:35 -0700, Junio C Hamano escreveu: > Hmm, this function is called by write_archive(), which can be called > by the upload-archive process running on the remote end, whose > locale certainly is different from that of your local environment. > > If I do not read English and

[PATCH v5 08/15] pkt-line: rename packet_write() to packet_write_fmt()

2016-08-10 Thread larsxschneider
From: Lars Schneider packet_write() should be called packet_write_fmt() as the string parameter can be formatted. Suggested-by: Junio C Hamano Signed-off-by: Lars Schneider --- builtin/archive.c| 4 ++--

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

2016-08-10 Thread Michael Haggerty
On 08/04/2016 01:50 AM, Stefan Beller wrote: > On Wed, Aug 3, 2016 at 4:14 PM, Michael Haggerty wrote: >> On 08/04/2016 12:11 AM, Stefan Beller wrote: >>> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty >>> wrote: [...] + +

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

2016-08-10 Thread Jonathan Nieder
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 into as they asked for it. Example? Tests? > Signed-off-by: Stefan Beller

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

2016-08-10 Thread Junio C Hamano
Lars Schneider writes: >>> Similarly, I'd think this could share code with the non-gentle form >>> (which should be able to just call this and die() if returns an error). >>> Though sometimes the va_list transformation makes that awkward. >> >> Yes. > > Peff just

Re: What's cooking in git.git (Aug 2016, #03; Mon, 8)

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 19:36, Stefan Beller wrote: > > On Wed, Aug 10, 2016 at 10:30 AM, Lars Schneider > wrote: >> >>> >>> * sb/submodule-update-dot-branch (2016-08-03) 7 commits >>> (merged to 'next' on 2016-08-04 at 47bff41) >>> + submodule

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

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 19:17, Junio C Hamano wrote: > > 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

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

2016-08-10 Thread Junio C Hamano
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 is in this series? I didn't really check what order you are doing things to

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

[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: [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, ...) > >> +{ > >> +

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 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: [PATCH 5/8] xdl_change_compact(): fix compaction heuristic to adjust io

2016-08-10 Thread Michael Haggerty
On 08/10/2016 06:58 PM, Michael Haggerty wrote: > 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

Re: [PATCH] Spelling fixes

2016-08-10 Thread Junio C Hamano
Johannes Sixt writes: > Am 09.08.2016 um 20:19 schrieb Junio C Hamano: >> >> >> accidentlyaccidentally >> commited committed >> dependancydependency >> emtpy empty >>

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

2016-08-10 Thread Junio C Hamano
Christian Couder writes: >> Isn't the mention on NO_THE_INDEX_COMPATIBILITY_MACROS in the added >> comments (there are two) pure red-herring? > > Yeah, true. > > So do you want me to refactor the code to use > hold_lock_file_for_update() instead of hold_locked_index()

Re: What's cooking in git.git (Aug 2016, #03; Mon, 8)

2016-08-10 Thread Lars Schneider
> > * sb/submodule-update-dot-branch (2016-08-03) 7 commits > (merged to 'next' on 2016-08-04 at 47bff41) > + submodule update: allow '.' for branch value > + submodule--helper: add remote-branch helper > + submodule-config: keep configured branch around > + submodule--helper: fix usage string

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

2016-08-10 Thread Jeff King
On Wed, Aug 10, 2016 at 03:59:19PM +0200, Lars Schneider wrote: > > It does still feel a little weird that you cannot tell the difference > > between a write() error and bad input. Because you really might want to > > do something different between the two. Like: > > > > #define MAX_FILENAME

Re: What's cooking in git.git (Aug 2016, #03; Mon, 8)

2016-08-10 Thread Johannes Schindelin
Hi Elijah, On Tue, 9 Aug 2016, Elijah Newren wrote: > [... detailed review ...] > > So, I think the series looks good. Thank you very much for this quite thorough review! > Sorry that I didn't spot any errors. That's quite alright with me ;-) Thanks again! Dscho -- To unsubscribe from this

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: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 packet is formatted and (potentially) when the packet is > actually send.

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

2016-08-10 Thread Jeff King
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. Certain callers might prefer an error response instead. I am not sure I

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:51:35PM +0200, Lars Schneider wrote: > I guess my point is that I stumbled over the un-intutiive format_packet() > behavior > and I wanted to improve the situation in a way that others don't run into this > trap. If you think that is no issue then it would be OK for me

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

2016-08-10 Thread Lars Schneider
> On 10 Aug 2016, at 19:18, Junio C Hamano wrote: > > 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 =

Re: [PATCH] Spelling fixes

2016-08-10 Thread Junio C Hamano
Ville Skyttä writes: > On Tue, Aug 9, 2016 at 9:19 PM, Junio C Hamano wrote: > [...] >> There are two "commited" you seem to have missed, though, >> >> t/t3420-rebase-autostash.sh:echo uncommited-content >file0 && >> t/t3420-rebase-autostash.sh:

Re: [PATCH] Spelling fixes

2016-08-10 Thread Johannes Sixt
Am 09.08.2016 um 20:19 schrieb Junio C Hamano: > > > accidentlyaccidentally > commited committed > dependancydependency > emtpy empty > existance existence >

Re: [PATCH] t7406: fix breakage on OSX

2016-08-10 Thread Junio C Hamano
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 --depth=$commit_count > > the depth would be empty and the number is interpreted as the

[PATCH v5 14/15] convert: add filter..process option

2016-08-10 Thread larsxschneider
From: Lars Schneider Git's clean/smudge mechanism invokes an external filter process for every single blob that is affected by a filter. If Git filters a lot of blobs then the startup time of the external filter processes can become a significant part of the overall Git

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

[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

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

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

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

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

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 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 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] 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(); >> +

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

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

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

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

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

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

[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] checkout: do not mention detach advice for explicit --detach option

2016-08-10 Thread Junio C Hamano
Stefan Beller writes: > 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. Makes sense; I agree that "Don't be

Re: What's cooking in git.git (Aug 2016, #03; Mon, 8)

2016-08-10 Thread Stefan Beller
On Wed, Aug 10, 2016 at 10:30 AM, Lars Schneider wrote: > >> >> * sb/submodule-update-dot-branch (2016-08-03) 7 commits >> (merged to 'next' on 2016-08-04 at 47bff41) >> + submodule update: allow '.' for branch value >> + submodule--helper: add remote-branch helper >> +

Re: What's cooking in git.git (Aug 2016, #03; Mon, 8)

2016-08-10 Thread Junio C Hamano
Lars Schneider writes: > I think "t7406: future proof tests with hard coded depth" > breaks the tests on OSX: > > https://travis-ci.org/git/git/jobs/150779244 Thanks. "| wc -l" can probably be replaced with "--count", if the upstream is "git rev-list". -- To

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

2016-08-10 Thread Junio C Hamano
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 code you are limited by the depth you might find > in a single existing pack

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 v3 0/2] pack-objects mru

2016-08-10 Thread Jeff King
On Tue, Aug 09, 2016 at 03:29:33PM -0700, Junio C Hamano wrote: > > @@ -1516,6 +1577,13 @@ static void get_object_details(void) > > entry->no_try_delta = 1; > > } > > > > + /* > > +* This must happen in a second pass, since we rely on the delta > > +*

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

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

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

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

[PATCH v3 2/2] pack-objects: use mru list when iterating over packs

2016-08-10 Thread Jeff King
In the original implementation of want_object_in_pack(), we always looked for the object in every pack, so the order did not matter for performance. As of the last few patches, however, we can now often break out of the loop early after finding the first instance, and avoid looking in the other

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

2016-08-10 Thread Jeff King
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: > > > >> From: Lars Schneider > >> > >> format_packet()

  1   2   >