[wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Yaroslav Halchenko
NB echos some questions of mine a few days back on IRC about Subprojects and submodules If e.g. you just 'git add' a subdirectory which is a git repository, git adds it as a subproject but doesn't initiate any entry in .gitmodules since it is the job done by submodule and git core itself is

[PATCH 4/2] use actual start hashes for submodule push check instead of local refs

2016-09-15 Thread Heiko Voigt
Push knows the actual revision range it is actually pushing to a remote. Let's use the start revisions to reduce the amount of checked revisions instead of the locally cached remote refs which might be out of date. This actually changes behavior as it now can also properly handle pushes with

Re: Tracking down a segfault in delta_base_cache

2016-09-15 Thread Jonathon Mah
> On 2016-09-14, at 17:56, Jeff King wrote: > > On Wed, Sep 14, 2016 at 05:42:29PM -0700, Jonathon Mah wrote: > >> Hi git, I've been seeing git segfault over the past few days. I'm on Mac OS >> X 10.12, 64-bit, compiling with clang (Apple LLVM version 8.0.0 >>

Re: [PATCH] object: measure time needed for resolving hash collisions

2016-09-15 Thread Stefan Beller
On Wed, Sep 14, 2016 at 11:47 PM, Jeff King wrote: > On Wed, Sep 14, 2016 at 07:01:41PM -0700, Stefan Beller wrote: > >> According to Jeff, sending patches that don't get accepted is the new hype! > > It is what all the cool kids are doing. Unfortunately, it does not save > you

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Stefan Beller
On Thu, Sep 15, 2016 at 6:02 AM, Yaroslav Halchenko wrote: > NB echos some questions of mine a few days back on IRC about Subprojects > and submodules > > If e.g. you just 'git add' a subdirectory which is a git repository, git > adds it as a subproject but doesn't initiate

[PATCH 3/2] batch check whether submodule needs pushing into one call

2016-09-15 Thread Heiko Voigt
We run a command for each sha1 change in a submodule. This is unnecessary since we can simply batch all sha1's we want to check into one command. Lets do it so we can speedup the check when many submodule changes are in need of checking. Signed-off-by: Heiko Voigt --- On Wed,

Re: [RFC] extending pathspec support to submodules

2016-09-15 Thread Brandon Williams
On Thu, Sep 15, 2016 at 4:57 AM, Heiko Voigt wrote: > > The problem when you do that is that the child is not aware that it is > actually run as a submodule process. E.g. > >git grep --recurse-submodules foobar -- sub/dir/a > > would report back matches in 'dir/a' instead

Re: [PATCH] Move format-patch base commit and prerequisites before email signature

2016-09-15 Thread Junio C Hamano
Josh Triplett writes: > I'd suggest squashing in an *additional* patch to the testsuite to > ensure the presence of the blank line: Thanks, will do. > diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh > index 535857e..8d90a6e 100755 > ---

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Yaroslav Halchenko
On Thu, 15 Sep 2016, Stefan Beller wrote: > > I think it would be more logical to make it a 'warning:' not a 'fatal:' and > > proceed. > So maybe we would want to introduce a switch > `--existing-but-unconfigure-gitlinks=(warn|ignore)` > as well as > `git config

[PATCH v3 13/14] i18n: show-branch: mark plural strings for translation

2016-09-15 Thread Vasco Almeida
Mark plural string for translation using Q_(). Although we already know that the plural sentence is always used in the English source, other languages have complex plural rules they must comply according to the value of MAX_REVS. Signed-off-by: Vasco Almeida ---

[PATCH v3 12/14] i18n: show-branch: mark error messages for translation

2016-09-15 Thread Vasco Almeida
Lowercase some messages first word to match style of the others. Signed-off-by: Vasco Almeida --- builtin/show-branch.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index

[PATCH v3 03/14] i18n: apply: mark info messages for translation

2016-09-15 Thread Vasco Almeida
Mark messages for translation printed to stderr. Signed-off-by: Vasco Almeida --- builtin/apply.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index ef2c084..43ab7c5 100644 --- a/builtin/apply.c +++

[PATCH v3 02/14] i18n: apply: mark error messages for translation

2016-09-15 Thread Vasco Almeida
Mark error messages for translation passed to error() and die() functions. Signed-off-by: Vasco Almeida --- builtin/apply.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/builtin/apply.c

[PATCH v3 06/14] i18n: config: mark error message for translation

2016-09-15 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- builtin/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/config.c b/builtin/config.c index 6cbf733..05843a0 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -622,8 +622,8 @@ int cmd_config(int

[PATCH v3 01/14] i18n: apply: mark plural string for translation

2016-09-15 Thread Vasco Almeida
Mark plural string for translation using Q_(). Signed-off-by: Vasco Almeida --- builtin/apply.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 1a488f9..ef03c74 100644 --- a/builtin/apply.c +++

[PATCH v3 08/14] i18n: merge-recursive: mark verbose message for translation

2016-09-15 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- builtin/merge-recursive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index 3b09610..0dd9021 100644 --- a/builtin/merge-recursive.c +++

[PATCH v3 07/14] i18n: merge-recursive: mark error messages for translation

2016-09-15 Thread Vasco Almeida
Lowercase first word of such error messages following the usual style. Signed-off-by: Vasco Almeida --- builtin/merge-recursive.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c

[PATCH v3 05/14] i18n: branch: mark option description for translation

2016-09-15 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 7df0543..d5d93a8 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -657,7 +657,7 @@ int cmd_branch(int

[PATCH v3 04/14] i18n: blame: mark error messages for translation

2016-09-15 Thread Vasco Almeida
Mark error messages for translation passed to die() function. Change "Cannot" to lowercase following the usual style. Reflect changes to test by using test_i18ngrep. Signed-off-by: Vasco Almeida --- builtin/blame.c | 18 ++

[PATCH v3 11/14] i18n: receive-pack: mark messages for translation

2016-09-15 Thread Vasco Almeida
Mark messages refuse_unconfigured_deny_msg and refuse_unconfigured_deny_delete_current_msg for translation. Signed-off-by: Vasco Almeida --- builtin/receive-pack.c | 58 ++ 1 file changed, 25 insertions(+), 33 deletions(-)

[PATCH v3 10/14] notes: lowercase first word of error messages

2016-09-15 Thread Vasco Almeida
Follow the usual case style. Update one test to reflect these changes. Signed-off-by: Vasco Almeida --- builtin/notes.c | 64 t/t3320-notes-merge-worktrees.sh | 2 +- 2 files changed, 33 insertions(+), 33

[PATCH v3 09/14] i18n: notes: mark error messages for translation

2016-09-15 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- builtin/notes.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index f848b89..229ad6d 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -340,7 +340,9 @@ static

[PATCH v3 14/14] i18n: update-index: mark warnings for translation

2016-09-15 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- builtin/update-index.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index ba04b19..7a17ce1 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c

Re: git add --intent-to-add silently creates empty commits

2016-09-15 Thread Junio C Hamano
Aviv Eyal writes: > Using `git add -N` allows creating of empty commits: > > git init test && cd test > echo text > file > git add --intent-to-add file > git commit -m 'Empty commit' > echo $?# prints 0 > ... > I'd expect `git commit` to

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Junio C Hamano
Stefan Beller writes: > On Thu, Sep 15, 2016 at 6:02 AM, Yaroslav Halchenko > wrote: >> >> If e.g. you just 'git add' a subdirectory which is a git repository, git >> adds it as a subproject but doesn't initiate any entry in .gitmodules >> since it is

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Stefan Beller
On Thu, Sep 15, 2016 at 9:40 AM, Yaroslav Halchenko wrote: > > On Thu, 15 Sep 2016, Stefan Beller wrote: > >> > I think it would be more logical to make it a 'warning:' not a 'fatal:' and >> > proceed. > >> So maybe we would want to introduce a switch >>

Re: [PATCH] object: measure time needed for resolving hash collisions

2016-09-15 Thread Junio C Hamano
Jeff King writes: > Measuring _just_ the collisions is more like the patch below. In my > measurements it's more like 30ms, compared to 10s for all of the > hashcmps. > > So we really aren't dealing with collisions, but rather just verifying > that our hash landed at the right

Re: Tracking down a segfault in delta_base_cache

2016-09-15 Thread Junio C Hamano
Jonathon Mah writes: >> On 2016-09-14, at 17:56, Jeff King wrote: >> >> Have you tried with the patch in: >> >> >> http://public-inbox.org/git/20160912164616.vg33kldazuthf...@sigill.intra.peff.net/ > All the examples I've tried work when I use that.

Re: [PATCH v2 10/25] sequencer: get rid of the subcommand field

2016-09-15 Thread Junio C Hamano
Johannes Schindelin writes: > 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

Re: [PATCH v2 21/25] sequencer: refactor write_message()

2016-09-15 Thread Junio C Hamano
Johannes Sixt writes: > Am 11.09.2016 um 12:55 schrieb Johannes Schindelin: >> -static int write_message(struct strbuf *msgbuf, const char *filename) >> +static int write_with_lock_file(const char *filename, >> +const void *buf, size_t len, int

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Junio C Hamano
Jeff King writes: > On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote: > >> Replace uses of strbuf_addf() for adding strings with more lightweight >> strbuf_addstr() calls. This makes the intent clearer and avoids >> potential issues with printf format specifiers. >>

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Junio C Hamano
Stefan Beller writes: > When searching around the net, some people use half > initialized submodules intentionally,... > > Not sure I agree with such a setup, but people use it. In such a top-level project, people would not use "git submodule" command, would they? I

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Junio C Hamano
Yaroslav Halchenko writes: > do you foresee any unpleasant side-effects from above manual editing > .gitmodules/submodule update --init ? I do not think so; you essentially did what a canned command we should have had should have done by hand because of a lack of such a

[PATCH] contrib/coccinelle: fix semantic patch for oid_to_hex_r()

2016-09-15 Thread René Scharfe
Both sha1_to_hex_r() and oid_to_hex_r() take two parameters, so use two expressions in the semantic patch for transforming calls of the former to the latter one. Signed-off-by: Rene Scharfe --- contrib/coccinelle/object_id.cocci | 12 ++-- 1 file changed, 6 insertions(+),

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote: > Replace uses of strbuf_addf() for adding strings with more lightweight > strbuf_addstr() calls. This makes the intent clearer and avoids > potential issues with printf format specifiers. > > 02962d36845b89145cd69f8bc65e015d78ae3434

Re: [PATCH] object: measure time needed for resolving hash collisions

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 10:45:34AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Measuring _just_ the collisions is more like the patch below. In my > > measurements it's more like 30ms, compared to 10s for all of the > > hashcmps. > > > > So we really aren't dealing

Re: [PATCH] object: measure time needed for resolving hash collisions

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 09:26:22AM -0700, Stefan Beller wrote: > > It may also be possible to really micro-optimize it on some platforms, > > because we know the size in advance (I'd kind of expect the compiler to > > do that, but if we're ending up in glibc memcmp then it sounds like it > > is

Re: [PATCH v4 3/4] read-cache: introduce chmod_index_entry

2016-09-15 Thread Thomas Gummerer
On 09/14, Junio C Hamano wrote: > I've queued this trivial SQUASH??? on top, which I think should be > squashed into 3/4. Yeah, I missed this. The SQUASH??? definitely makes sense, would be great if you could just squash that in. > Thanks. Thanks the reviews and helping me getting the series

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Yaroslav Halchenko
On Thu, 15 Sep 2016, Junio C Hamano wrote: > >> which then stops without even looking at other submodules. > >> I think it would be more logical to make it a 'warning:' not a 'fatal:' and > >> proceed. > Making "git submodule" listing to continue from that point may be > one thing, but do we

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Stefan Beller
On Thu, Sep 15, 2016 at 11:02 AM, Junio C Hamano wrote: > I think that is a more pressing thing to address. Once we make it > easier for the user to bring a half-initialized submodule properly > into the world view of the submodule subsystem, we would have to > worry about

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-15 Thread Stefan Beller
On Thu, Sep 15, 2016 at 11:12 AM, Yaroslav Halchenko wrote: > > do you foresee any unpleasant side-effects from above manual editing > .gitmodules/submodule update --init ? I think that is fine, but un(der)documented. So you have to figure it out from experience what to do

[PATCH] add coccicheck make target

2016-09-15 Thread René Scharfe
Provide a simple way to run Coccinelle against all source files, in the form of a Makefile target. Running "make coccicheck" applies each .cocci file in contrib/coccinelle/ on all source files. It generates a .patch file for each .cocci file, containing the actual changes for effecting the

[PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread René Scharfe
Replace uses of strbuf_addf() for adding strings with more lightweight strbuf_addstr() calls. This makes the intent clearer and avoids potential issues with printf format specifiers. 02962d36845b89145cd69f8bc65e015d78ae3434 already converted six cases, this patch covers eleven more. A semantic

Re: Tracking down a segfault in delta_base_cache

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 10:34:43AM -0700, Junio C Hamano wrote: > Jonathon Mah writes: > > >> On 2016-09-14, at 17:56, Jeff King wrote: > >> > >> Have you tried with the patch in: > >> > >> > >>

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-15 Thread Lars Schneider
> On 13 Sep 2016, at 17:42, Junio C Hamano wrote: > > Torsten Bögershausen writes: > >> I would really consider to treat pathnames as binary, and not add a trailing >> '\n', >> are there other opinions ? > > It would be the most consistent if the same

Re: [PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-15 Thread Lars Schneider
> On 13 Sep 2016, at 23:44, Junio C Hamano wrote: > > Lars Schneider writes: > >>> On 13 Sep 2016, at 00:30, Junio C Hamano wrote: >>> >>> larsxschnei...@gmail.com writes: >>> From: Lars Schneider

Re: [PATCH] pkt-line: mark a file-local symbol static

2016-09-15 Thread Lars Schneider
> On 14 Sep 2016, at 14:31, Ramsay Jones wrote: > > > Signed-off-by: Ramsay Jones > --- > > Hi Lars, > > If you need to re-roll your 'ls/filter-process' branch, could you > please squash this into the relevant patch; commit 2afd9b22

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 12:25:43PM -0700, Junio C Hamano wrote: > >> Silly question: Is there a natural language that uses percent signs > >> as letters or e.g. instead of commas? :) > > > > I don't know, but if they do, they'd better get used to escaping them. > > :) > > I do not know either,

Re: [PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 05:42:58PM +0100, Lars Schneider wrote: > +int packet_flush_gently(int fd) > +{ > +packet_trace("", 4, 1); > +if (write_in_full(fd, "", 4) == 4) > +return 0; > +error("flush packet write

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread René Scharfe
Am 15.09.2016 um 21:38 schrieb Jeff King: On Thu, Sep 15, 2016 at 12:25:43PM -0700, Junio C Hamano wrote: Silly question: Is there a natural language that uses percent signs as letters or e.g. instead of commas? :) I don't know, but if they do, they'd better get used to escaping them. :) I

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Junio C Hamano
René Scharfe writes: > Take this for example: > > - strbuf_addf(>obuf, _("(bad commit)\n")); > + strbuf_addstr(>obuf, _("(bad commit)\n")); > > If there's a language that uses percent signs instead of parens or as > regular letters, then they

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-15 Thread Junio C Hamano
Lars Schneider writes: > Wouldn't that complicate the pathname parsing on the filter side? > Can't we just define in our filter protocol documentation that our > "pathname" packet _always_ has a trailing "\n"? That would mean the > receiver would know a packet

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread brian m. carlson
On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote: > Replace uses of strbuf_addf() for adding strings with more lightweight > strbuf_addstr() calls. This makes the intent clearer and avoids > potential issues with printf format specifiers. > > 02962d36845b89145cd69f8bc65e015d78ae3434

[PATCH 10/11] run command: add RUN_COMMAND_NO_STDOUT

2016-09-15 Thread Kevin Wern
Add option RUN_COMMAND_NO_STDOUT, which sets no_stdout on a child process. This will be used by git clone when calling index-pack on a downloaded packfile. Signed-off-by: Kevin Wern --- run-command.c | 1 + run-command.h | 1 + 2 files changed, 2 insertions(+) diff

[PATCH 06/11] Resumable clone: implement transport_prime_clone

2016-09-15 Thread Kevin Wern
Create transport_prime_clone API, as well as all internal methods. Create representations of alt_resource and prime-clone path options. The intention of get_alt_res_helper is solely to parse the output of remote-curl because transport-helper does not handle verbose options or speaking to the user

[PATCH 07/11] Resumable clone: add resumable download to http/curl

2016-09-15 Thread Kevin Wern
Create resumable download procedure and progress display function. The conversion from B to KB occurs because otherwise the byte counts for large repos (i.e. Linux) overflow calculating percentage. The download protocol includes the resource's URL, and the directory the resource will be

[PATCH 11/11] Resumable clone: implement primer logic in git-clone

2016-09-15 Thread Kevin Wern
Use transport_download_primer and transport_prime_clone in git clone. This only supports a fully connected packfile. transport_prime_clone and transport_download_primer are executed completely independent of transport_(get|fetch)_remote_refs, et al. transport_download_primer is executed based on

[PATCH 09/11] path: add resumable marker

2016-09-15 Thread Kevin Wern
Create function to get gitdir file RESUMABLE. Signed-off-by: Kevin Wern --- cache.h | 1 + path.c | 1 + 2 files changed, 2 insertions(+) diff --git a/cache.h b/cache.h index d7ff46e..1f4117c 100644 --- a/cache.h +++ b/cache.h @@ -811,6 +811,7 @@ const char

[PATCH 05/11] Resumable clone: add output parsing to connect.c

2016-09-15 Thread Kevin Wern
Add method for transport to call when parsing primeclone output from stdin. Suppress stderr when using git_connect with ssh, unless output is verbose. Signed-off-by: Kevin Wern --- connect.c | 47 +++ connect.h | 10 ++

[PATCH 08/11] Resumable clone: create transport_download_primer

2016-09-15 Thread Kevin Wern
Create function transport_download_primer and components to invoke and pass commands to remote-curl. Signed-off-by: Kevin Wern --- transport-helper.c | 24 transport.c| 9 + transport.h| 7 +++ 3 files changed, 40

Hello

2016-09-15 Thread Hasher Al Maktoum
Dear Friend, Your contact details came to me by recommendation, I am interested in investing in your country and I believe you have the capabilities of providing the needed assistance, solutions and advise in actualizing this, Let me know if you are willing to understake this task for me so we

[PATCH 01/11] Resumable clone: create service git-prime-clone

2016-09-15 Thread Kevin Wern
Create git-prime-clone, a program to be executed on the server that returns the location and type of static resource to download before performing the rest of a clone. Additionally, as this executable's location will be configurable (see: upload-pack and receive-pack), add the program to

[PATCH 02/11] Resumable clone: add prime-clone endpoints

2016-09-15 Thread Kevin Wern
Add logic to serve git-prime-clone to git and http clients. Do not pass --stateless-rpc and --advertise-refs options to prime-clone. It is inherently stateless and an 'advertisement'. Signed-off-by: Kevin Wern --- Documentation/git-daemon.txt | 7 +++

[PATCH 03/11] pkt-line: create gentle packet_read_line functions

2016-09-15 Thread Kevin Wern
Create a functions that can read malformed messages without dying. Includes creation of flag PACKET_READ_GENTLE_ALL. For use handling prime-clone (or other server error) responses. Signed-off-by: Kevin Wern --- pkt-line.c | 47

[PATCH 04/11] Resumable clone: add prime-clone to remote-curl

2016-09-15 Thread Kevin Wern
Add function and interface to handle prime-clone input, extracting and using duplicate functionality from discover_refs as function request_service. Because part of our goal is for prime_clone to recover from errors, HTTP errors are only optionally printed to screen and never cause death in this

[PATCH 00/11] Resumable clone

2016-09-15 Thread Kevin Wern
Hey, all, It's been a while (sent a very short patch in May), but I've still been working on the resumable clone feature and checking up on the mailing list for any updates. After submitting the prime-clone service alone, I figured implementing the whole thing would be the best way to understand

Re: [RFC] extending pathspec support to submodules

2016-09-15 Thread Stefan Beller
On Thu, Sep 15, 2016 at 3:08 PM, Junio C Hamano wrote: > Brandon Williams writes: > >> You're right that seems like the best course of action and it already falls >> inline with what I did with a first patch to ls-files to support submodules. >> In that

Potentially misleading color.* defaults explanation in git-config(1)

2016-09-15 Thread Anatoly Borodin
Hi All! git-config(1) says: color.branch A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or never) or auto (or true), in which case colors are used only when the output is to a terminal. Defaults to

Re: [RFC] extending pathspec support to submodules

2016-09-15 Thread Junio C Hamano
Brandon Williams writes: > You're right that seems like the best course of action and it already falls > inline with what I did with a first patch to ls-files to support submodules. > In that patch I did exactly as you suggest and pass in the prefix to the > submodule and make

Re: [PATCH] object: measure time needed for resolving hash collisions

2016-09-15 Thread Jeff King
On Wed, Sep 14, 2016 at 11:47:01PM -0700, Jeff King wrote: > > first = i = hash_obj(sha1, obj_hash_size); > > + clock_gettime(CLOCK_MONOTONIC, ); > > while ((obj = obj_hash[i]) != NULL) { > > if (!hashcmp(sha1, obj->oid.hash)) > > break; > > @@ -98,6

Re: [RFC 0/1] mailinfo: de-quote quoted-pair in header fields

2016-09-15 Thread Jeff King
On Thu, Sep 15, 2016 at 07:15:33AM +0200, Kevin Daudt wrote: > > > Another small thing I am not sure about is if the \ quoting can hide > > > an embedded newline in the author name. Would we end up turning > > > > > > From: "Jeff \ > > > King" > > > > > > or

Re: [PATCH 2/2] use zstd zlib wrapper

2016-09-15 Thread Jeff King
On Wed, Sep 14, 2016 at 06:22:17PM -0700, Stefan Beller wrote: > > Disappointingly, the answer seems to be "no". > > After having looked at the data, I disagree with the conclusion. > And for that I think we need to reason about the frequency > of the operations happening. I definitely agree

Re: [PATCH] object: measure time needed for resolving hash collisions

2016-09-15 Thread Jeff King
On Wed, Sep 14, 2016 at 07:01:41PM -0700, Stefan Beller wrote: > According to Jeff, sending patches that don't get accepted is the new hype! It is what all the cool kids are doing. Unfortunately, it does not save you from nitpicky reviews...;) > first = i = hash_obj(sha1, obj_hash_size);

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-15 Thread Lars Schneider
> On 13 Sep 2016, at 17:22, Junio C Hamano wrote: > > larsxschnei...@gmail.com writes: > >> diff --git a/contrib/long-running-filter/example.pl >> b/contrib/long-running-filter/example.pl >> ... >> +sub packet_read { >> +my $buffer; >> +my $bytes_read = read STDIN,

Re: [PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-15 Thread Junio C Hamano
Lars Schneider writes: >> So the "right" pattern is either: >> >> 1. Return -1 and the caller is responsible for telling the user. >> ... which is valid only if there aren't different kinds of errors that all return -1; with "return error(...)" with different

[PATCH 1/2] SQUASH???

2016-09-15 Thread Junio C Hamano
--- builtin/ls-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index c0bce00..6e78c71 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -78,7 +78,7 @@ static void write_name(const char *name) * churn.

Re: [PATCH 3/2] batch check whether submodule needs pushing into one call

2016-09-15 Thread Junio C Hamano
Heiko Voigt writes: > if (for_each_remote_ref_submodule(path, has_remote, NULL) > 0) { > struct child_process cp = CHILD_PROCESS_INIT; > - const char *argv[] = {"rev-list", NULL, "--not", "--remotes", > "-n", "1" , NULL}; > + > +

Re: [PATCH v3 13/14] i18n: show-branch: mark plural strings for translation

2016-09-15 Thread Junio C Hamano
Vasco Almeida writes: > Mark plural string for translation using Q_(). > > Although we already know that the plural sentence is always used in the > English source, other languages have complex plural rules they must > comply according to the value of MAX_REVS. Nicely

Re: [PATCH 2/2] SQUASH??? Undecided

2016-09-15 Thread Brandon Williams
Yeah if that is the convention then I have no problem with the change. -Brandon On Thu, Sep 15, 2016 at 2:12 PM, Stefan Beller wrote: > + cc Brandon > > On Thu, Sep 15, 2016 at 1:51 PM, Junio C Hamano wrote: >> If we were to follow the convention to leave

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread Junio C Hamano
René Scharfe writes: > Am 15.09.2016 um 22:01 schrieb Junio C Hamano: >> René Scharfe writes: >> >>> Take this for example: >>> >>> - strbuf_addf(>obuf, _("(bad commit)\n")); >>> + strbuf_addstr(>obuf, _("(bad commit)\n")); >>>

Re: [PATCH v7 10/10] convert: add filter..process option

2016-09-15 Thread Junio C Hamano
Lars Schneider writes: >> On 13 Sep 2016, at 17:22, Junio C Hamano wrote: >> >> larsxschnei...@gmail.com writes: >> >>> diff --git a/contrib/long-running-filter/example.pl >>> b/contrib/long-running-filter/example.pl >>> ... >>> +packet_write(

Re: [PATCH v2] ls-files: adding support for submodules

2016-09-15 Thread Junio C Hamano
Junio C Hamano writes: > Thanks, will queue with a minimum fix. So here are two squashable patches, one is the "minimum" one, the other is a bit more invasive one to use "a pointer to an optional setting is set to NULL" convention. I am undecided, and I'll stay to be without

[PATCH 2/2] SQUASH??? Undecided

2016-09-15 Thread Junio C Hamano
If we were to follow the convention to leave an optional string variable to NULL, we'd need to do this on top. I am not sure if it is a good change, though. --- builtin/ls-files.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c

Re: [PATCH v3 04/14] i18n: blame: mark error messages for translation

2016-09-15 Thread Junio C Hamano
Vasco Almeida writes: > @@ -2790,7 +2790,7 @@ int cmd_blame(int argc, const char **argv, const char > *prefix) > else { > o = get_origin(, sb.final, path); > if (fill_blob_sha1_and_mode(o)) > - die("no such path %s in

Re: [PATCH v7 04/10] pkt-line: add packet_flush_gently()

2016-09-15 Thread Lars Schneider
> On 15 Sep 2016, at 21:44, Jeff King wrote: > > On Thu, Sep 15, 2016 at 05:42:58PM +0100, Lars Schneider wrote: > >> +int packet_flush_gently(int fd) >> +{ >> +packet_trace("", 4, 1); >> +if (write_in_full(fd, "", 4) == 4) >> +

Re: [PATCH v2] ls-files: adding support for submodules

2016-09-15 Thread Junio C Hamano
If we were to follow the convention to leave an optional string variable to NULL, we'd need to do this on top. I am not sure if it is a good change, though. --- builtin/ls-files.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c

Re: [PATCH v2] ls-files: adding support for submodules

2016-09-15 Thread Junio C Hamano
Here is an absolute mininum fix ;-) builtin/ls-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index c0bce00..6e78c71 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -78,7 +78,7 @@ static void write_name(const char

Re: [PATCH v2] ls-files: adding support for submodules

2016-09-15 Thread Junio C Hamano
Junio C Hamano writes: > Thanks, will queue with a minimum fix. So here are two squashable patches, one is the "minimum" one, the other is a bit more invasive one to use "a pointer to an optional setting is set to NULL" convention. I am undecided, and I'll stay to be without

Re: [PATCH 2/2] SQUASH??? Undecided

2016-09-15 Thread Stefan Beller
+ cc Brandon On Thu, Sep 15, 2016 at 1:51 PM, Junio C Hamano wrote: > If we were to follow the convention to leave an optional string > variable to NULL, we'd need to do this on top. I am not sure if it > is a good change, though. I think it is a good change. Thanks, Stefan

[PATCH v2 0/1] git-p4: Add --checkpoint-period option to sync/clone

2016-09-15 Thread Ori Rawlings
Importing a long history from Perforce into git using the git-p4 tool can be especially challenging. The `git p4 clone` operation is based on an all-or-nothing transactionality guarantee. Under real-world conditions like network unreliability or a busy Perforce server, `git p4 clone` and `git p4

[PATCH v2 1/1] git-p4: Add --checkpoint-period option to sync/clone

2016-09-15 Thread Ori Rawlings
Importing a long history from Perforce into git using the git-p4 tool can be especially challenging. The `git p4 clone` operation is based on an all-or-nothing transactionality guarantee. Under real-world conditions like network unreliability or a busy Perforce server, `git p4 clone` and `git p4

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

2016-09-15 Thread René Scharfe
Am 15.09.2016 um 22:01 schrieb Junio C Hamano: > René Scharfe writes: > >> Take this for example: >> >> -strbuf_addf(>obuf, _("(bad commit)\n")); >> +strbuf_addstr(>obuf, _("(bad commit)\n")); >> >> If there's a language that uses percent

Re: [RFC] extending pathspec support to submodules

2016-09-15 Thread Heiko Voigt
Hi, On Wed, Sep 14, 2016 at 04:57:53PM -0700, Brandon Williams wrote: > --- > I've been trying to think through how we could potentially add pathspec > support > for --recurse-submodule options (for builtins like ls-files or grep down the > line).  This is something that could be useful if the