Re: Stack read out-of-bounds in parse_sha1_header_extended using git 2.10.0

2016-09-27 Thread Jeff King
On Mon, Sep 26, 2016 at 11:10:54AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > I am inclined to say that it has no security implications. You have > > to be able to write a bogus loose object in an object store you > > already have write access to in the first place, in order to

Re: [PATCH] git-gui: Do not reset author details on amend

2016-09-27 Thread Orgad Shaneh
On Tue, Sep 27, 2016 at 12:34 AM, Junio C Hamano wrote: > Orgad Shaneh writes: > >> On Sun, Jul 10, 2016 at 7:36 AM, Orgad Shaneh wrote: >> >>> On Wed, May 18, 2016 at 9:12 AM, Orgad Shaneh wrote: ping? >>> It's been over 2 months. Can anyone please review and merge it? >>> >> 4.5 mon

Re: [PATCH v2 4/5] builtin/verify-tag: add --format to verify-tag

2016-09-27 Thread Philip Oakley
From: From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatte

Re: Possible integer overflow parsing malformed objects in git 2.10.0

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 04:30:23AM +0200, Gustavo Grieco wrote: > We found a malformed object file that triggers an allocation with a > negative size when parsed in git 2.10.0. It can be caused by an > integer overflow somewhere, so it is better to verify how the code got > such value. Are you su

Re: [PATCH v8 07/11] pkt-line: add functions to read/write flush terminated packet streams

2016-09-27 Thread Lars Schneider
On 26 Sep 2016, at 22:23, Lars Schneider wrote: > > On 25 Sep 2016, at 15:46, Jakub Narębski wrote: > >> W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze: >>> From: Lars Schneider > > >>> + strbuf_grow(sb_out, PKTLINE_DATA_MAXLEN+1); >>> + paket_len = packet_re

[PATCH v5] revision: new rev^-n shorthand for rev^n..rev

2016-09-27 Thread Vegard Nossum
"git log rev^..rev" is commonly used to show all work done on and merged from a side branch. This patch introduces a shorthand "rev^-" for this and additionally allows "rev^-$n" to mean "reachable from rev, excluding what is reachable from the nth parent of rev". For example, for a two-parent merge

Re: [PATCH v8 06/11] pkt-line: add packet_write_gently()

2016-09-27 Thread Jeff King
On Mon, Sep 26, 2016 at 09:21:10PM +0200, Lars Schneider wrote: > On 25 Sep 2016, at 13:26, Jakub Narębski wrote: > > > W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze: > >> From: Lars Schneider > >> ... > >> > >> +static int packet_write_gently(const int fd_out, const char *buf, siz

Re: [PATCH v8 07/11] pkt-line: add functions to read/write flush terminated packet streams

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 10:14:16AM +0200, Lars Schneider wrote: > >>> + strbuf_grow(sb_out, PKTLINE_DATA_MAXLEN+1); > >>> + paket_len = packet_read(fd_in, NULL, NULL, > >>> + sb_out->buf + sb_out->len, PKTLINE_DATA_MAXLEN+1, > >>> options); > [...] > After looking

Re: [PATCH v3 2/2] mailinfo: unescape quoted-pair in header fields

2016-09-27 Thread Kevin Daudt
On Mon, Sep 26, 2016 at 03:23:23PM -0700, Junio C Hamano wrote: > Kevin Daudt writes: > > > On Mon, Sep 26, 2016 at 12:26:13PM -0700, Junio C Hamano wrote: > >> Junio C Hamano writes: > >> > >> > Don't these also need to be downcased if you prefer $data over > >> > $DATA, though? > >> > >> For

RE: git-upload-pack hangs

2016-09-27 Thread Jason Pyeron
Thanks, I wrote this while on a train to get the site up 1st, I did not even review it yet! I think I am going to spend the time this weekend to clean it up, and submit a patch for master and the version cygwin uses. -Jason > -Original Message- > From: jch2...@gmail.com [mailto:jch2..

question about git rev-list --max-count=n

2016-09-27 Thread Ruediger Meier
Hi, git rev-list --max-count=n seems to always list the _last_ (newest) n commits. Is there any functionality to list the _first_ n commits? I've tried to add --reverse hoping that this would do it but it does not. The manual could be a bit more clear about that: --max-count= Limit the

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-09-27 Thread Duy Nguyen
(sorry for a very late reply, I'm just picking this series up again) On Thu, Jun 9, 2016 at 11:18 PM, Johannes Schindelin wrote: > Hi Duy, > > On Mon, 6 Jun 2016, Nguyễn Thái Ngọc Duy wrote: > >> diff --git a/diff.h b/diff.h >> index b497078..9e42556 100644 >> --- a/diff.h >> +++ b/diff.h >> @@ -

Re: [PATCH v8 07/11] pkt-line: add functions to read/write flush terminated packet streams

2016-09-27 Thread Lars Schneider
> On 27 Sep 2016, at 11:00, Jeff King wrote: > > On Tue, Sep 27, 2016 at 10:14:16AM +0200, Lars Schneider wrote: > > + strbuf_grow(sb_out, PKTLINE_DATA_MAXLEN+1); > + paket_len = packet_read(fd_in, NULL, NULL, > + sb_out->buf + sb_out->len, PKTLINE_DA

Re: [PATCH v8 07/11] pkt-line: add functions to read/write flush terminated packet streams

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 02:10:50PM +0200, Lars Schneider wrote: > > That being said, why don't you just use LARGE_PACKET_MAX here? It is > > already the accepted size for feeding to packet_read(), and we know it > > has enough space to hold a NUL terminator. Yes, we may over-allocate by > > 4 byte

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-09-27 Thread Duy Nguyen
On Tue, Sep 27, 2016 at 5:58 PM, Duy Nguyen wrote: >> but then you also have to change the type of xdl_opts >> to uint64_t, which in turn means that you will have to change the >> definition of xpparam_t's "flags" field from unsigned long to uint64_t. > > I miss a connection here. This new flag is

Re: [PATCH 10/10] get_short_sha1: list ambiguous objects on error

2016-09-27 Thread Jeff King
On Mon, Sep 26, 2016 at 09:36:23AM -0700, Linus Torvalds wrote: > On Mon, Sep 26, 2016 at 5:00 AM, Jeff King wrote: > > > > This patch teaches get_short_sha1() to list the sha1s of the > > objects it found, along with a few bits of information that > > may help the user decide which one they mean

Re: [PATCH] xdiff: rename "struct group" to "struct xdlgroup"

2016-09-27 Thread Michael Haggerty
On 09/27/2016 06:37 AM, Jeff King wrote: > Commit e8adf23 (xdl_change_compact(): introduce the concept > of a change group, 2016-08-22) added a "struct group" type > to xdiff/xdiffi.c. But the POSIX system header "grp.h" > already defines "struct group" (it is part of the getgrnam > interface). Thi

Re: git 2.9.2: is RUNTIME_PREFIX supposed to work?

2016-09-27 Thread Paul Smith
On Mon, 2016-09-26 at 14:57 -0700, Junio C Hamano wrote: > On Mon, Sep 26, 2016 at 2:32 PM, Paul Smith wrote: > > > > Hi all. I'm trying to create a relocatable installation of Git 2.9.2, > > so I can copy it anywhere and it continues to run without any problem. > > This is on GNU/Linux systems,

[PATCH] rev-list-options: clarify the usage of -n/--max-number

2016-09-27 Thread Pranit Bauva
-n=, -, --max-number= shows the last n commits specified in irrespective of whether --reverse is used or not. With --reverse, it just shows the last n commits in reverse order. Reported-by: Ruediger Meier Signed-off-by: Pranit Bauva --- Hey Ruegiger, The description is a bit inappropriate for

[PATCH] gpg-interface: use more status letters

2016-09-27 Thread Michael J Gruber
According to gpg2's doc/DETAILS: "For each signature only one of the codes GOODSIG, BADSIG, EXPSIG, EXPKEYSIG, REVKEYSIG or ERRSIG will be emitted." gpg1 ("classic") behaves the same (although doc/DETAILS differs). Currently, we parse gpg's status output for GOODSIG, BADSIG and trust information

Re: [PATCH v2 4/5] builtin/verify-tag: add --format to verify-tag

2016-09-27 Thread Santiago Torres
> > static const char * const verify_tag_usage[] = { > > - N_("git verify-tag [-v | --verbose] ..."), > > + N_("git verify-tag [-v | --verbose] [--format=] ..."), > > Does this require a corresponding documentation change? (also 5/5) > Yes, I'll work on this while I wait for more reviews. Thank

Re: [PATCH 1/2] tree-walk: be more specific about corrupt tree errors

2016-09-27 Thread David Turner
On Tue, 2016-09-27 at 01:14 -0400, Jeff King wrote: > I also wonder if $bin_sha1 should actually be more like: > > hex_sha1=$(echo foo | git hash-object --stdin -w) > bin_sha1=$(echo $hex_sha1 | perl -ne 'printf "\\%3o", ord for /./g') > > so that it's a real sha1 (or maybe it is in your orig

[PATCH v3 1/3] tree-walk: be more specific about corrupt tree errors

2016-09-27 Thread David Turner
From: Jeff King When the tree-walker runs into an error, it just calls die(), and the message is always "corrupt tree file". However, we are actually covering several cases here; let's give the user a hint about what happened. Let's also avoid using the word "corrupt", which makes it seem like t

[PATCH v3 3/3] add David Turner's Two Sigma address

2016-09-27 Thread David Turner
From: David Turner Signed-off-by: David Turner --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 9441a54..9cc33e9 100644 --- a/.mailmap +++ b/.mailmap @@ -48,6 +48,7 @@ David Kågedal David Reiss David S. Miller David Turner +David Turner Desk

[PATCH v3 2/3] fsck: handle bad trees like other errors

2016-09-27 Thread David Turner
Instead of dying when fsck hits a malformed tree object, log the error like any other and continue. Now fsck can tell the user which tree is bad, too. Signed-off-by: David Turner --- fsck.c | 18 - t/t1450-fsck.sh | 16 +-- tree-walk.c | 83 +

Re: [PATCH 2/2] fsck: handle bad trees like other errors

2016-09-27 Thread David Turner
On Tue, 2016-09-27 at 01:27 -0400, Jeff King wrote: > > -static void decode_tree_entry(struct tree_desc *desc, const char *buf, > > unsigned long size) > > +static int decode_tree_entry(struct tree_desc *desc, const char *buf, > > unsigned long size, struct strbuf *err) > > { > > I know we used

Re: [PATCH 1/2] utf8: refactor code to decide fallback encoding

2016-09-27 Thread Junio C Hamano
Jeff King writes: > But once we introduce other fallbacks, then "utf8 -> latin1" may become > "UTF-8 -> iso8859-1". A system that knows only "utf8" and "iso8859-1" > _could_ work if we turned the knobs individually, but won't if we turn > them both at once. Worse, a system that knows only "UTF-8"

Re: git 2.9.2: is RUNTIME_PREFIX supposed to work?

2016-09-27 Thread Johannes Schindelin
Hi Paul, On Tue, 27 Sep 2016, Paul Smith wrote: > On Mon, 2016-09-26 at 14:57 -0700, Junio C Hamano wrote: > > On Mon, Sep 26, 2016 at 2:32 PM, Paul Smith wrote: > > > > > > Hi all. I'm trying to create a relocatable installation of Git 2.9.2, > > > so I can copy it anywhere and it continues t

Re: [PATCH v8 11/11] convert: add filter..process option

2016-09-27 Thread Jakub Narębski
Part second of the review of 11/11. W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze: > diff --git a/contrib/long-running-filter/example.pl > b/contrib/long-running-filter/example.pl > new file mode 100755 > index 000..c13a631 > --- /dev/null > +++ b/contrib/long-running-filter/exam

Re: Possible integer overflow parsing malformed objects in git 2.10.0

2016-09-27 Thread Junio C Hamano
Jeff King writes: > That being said, the parse_sha1_header() function clearly does not > detect overflow at all when parsing the size. So on a 32-bit system, you > end up with: > > $ git fsck > fatal: Out of memory, malloc failed (tried to allocate 4294967141 bytes) > > which is not correct,

re

2016-09-27 Thread Mrs. Maria-Elisabeth Schaeffler
Did you get my request?

Re: git-upload-pack hangs

2016-09-27 Thread Junio C Hamano
"Jason Pyeron" writes: > This is a very, very first draft. > > It is allowing IIS to work right now. > > I still need to address chunked issues, where there is no content length (see > http://www.gossamer-threads.com/lists/apache/users/373042) > > Any comments, sugestions? Does this have any re

Re: git 2.9.2: is RUNTIME_PREFIX supposed to work?

2016-09-27 Thread Junio C Hamano
Paul Smith writes: > On Mon, 2016-09-26 at 14:57 -0700, Junio C Hamano wrote: >> On Mon, Sep 26, 2016 at 2:32 PM, Paul Smith wrote: >> > >> > Hi all. I'm trying to create a relocatable installation of Git 2.9.2, >> > so I can copy it anywhere and it continues to run without any problem. >> > T

Re: [PATCH] xdiff: rename "struct group" to "struct xdlgroup"

2016-09-27 Thread Stefan Beller
On Mon, Sep 26, 2016 at 9:37 PM, Jeff King wrote: > Commit e8adf23 (xdl_change_compact(): introduce the concept > of a change group, 2016-08-22) added a "struct group" type > to xdiff/xdiffi.c. But the POSIX system header "grp.h" > already defines "struct group" (it is part of the getgrnam > inter

Re: [PATCH] git-gui: Do not reset author details on amend

2016-09-27 Thread Junio C Hamano
Orgad Shaneh writes: > On Tue, Sep 27, 2016 at 12:34 AM, Junio C Hamano wrote: >> Orgad Shaneh writes: >> > I actually see that there is a problem with it: > https://github.com/git-for-windows/git/issues/761 > > I'll try to revise it and resubmit. Are you by chance volunteering to be git-gui m

Re: git 2.9.2: is RUNTIME_PREFIX supposed to work?

2016-09-27 Thread Junio C Hamano
Junio C Hamano writes: > Paul Smith writes: > >> On Mon, 2016-09-26 at 14:57 -0700, Junio C Hamano wrote: >>> On Mon, Sep 26, 2016 at 2:32 PM, Paul Smith wrote: >>> > >>> > Hi all. I'm trying to create a relocatable installation of Git 2.9.2, >>> > so I can copy it anywhere and it continues t

Re: [PATCH v3 1/3] tree-walk: be more specific about corrupt tree errors

2016-09-27 Thread Junio C Hamano
David Turner writes: > From: Jeff King > > When the tree-walker runs into an error, it just calls > die(), and the message is always "corrupt tree file". > However, we are actually covering several cases here; let's > give the user a hint about what happened. > > Let's also avoid using the word

Re: [PATCH] rev-list-options: clarify the usage of -n/--max-number

2016-09-27 Thread Junio C Hamano
Pranit Bauva writes: > -n=, -, --max-number= shows the last n commits > specified in irrespective of whether --reverse is used or not. > With --reverse, it just shows the last n commits in reverse order. I think it is easier to understand if you updated the description of "--reverse", rather th

Re: [PATCH v3 3/3] add David Turner's Two Sigma address

2016-09-27 Thread Junio C Hamano
David Turner writes: > From: David Turner > > Signed-off-by: David Turner > --- > .mailmap | 1 + > 1 file changed, 1 insertion(+) Thanks. Queued separately in order to merge to master much earlier than the tree-fsck topic. > > diff --git a/.mailmap b/.mailmap > index 9441a54..9cc33e9 100644

[Q] would it be bad to make /etc/gitconfig runtime configurable?

2016-09-27 Thread Junio C Hamano
The subject says it all. Would it be bad if we introduce an environment variable, GIT_SYSTEM_CONFIG=/etc/gitconfig, that names an alternative location of the system-wide configuration file? That would supersede/deprecate GIT_CONFIG_NOSYSTEM that we introduced primarily so that we can run our test

Re: [PATCH] git-gui: Do not reset author details on amend

2016-09-27 Thread Orgad Shaneh
On Tue, Sep 27, 2016 at 7:31 PM, Junio C Hamano wrote: > Orgad Shaneh writes: > >> On Tue, Sep 27, 2016 at 12:34 AM, Junio C Hamano wrote: >>> Orgad Shaneh writes: >>> >> I actually see that there is a problem with it: >> https://github.com/git-for-windows/git/issues/761 >> >> I'll try to revis

Re: [PATCH] gpg-interface: use more status letters

2016-09-27 Thread Junio C Hamano
Michael J Gruber writes: > According to gpg2's doc/DETAILS: > "For each signature only one of the codes GOODSIG, BADSIG, EXPSIG, > EXPKEYSIG, REVKEYSIG or ERRSIG will be emitted." > > gpg1 ("classic") behaves the same (although doc/DETAILS > differs). > > Currently, we parse gpg's status output f

Re: [PATCH v2 2/5] ref-filter: add function to print single ref_array_item

2016-09-27 Thread Junio C Hamano
santi...@nyu.edu writes: > From: Lukas P > > ref-filter functions are useful for printing git object information > using a format specifier. However, some other modules may not want to use > this functionality on a ref-array but only print a single item. > > Expose a format_ref function to create

Re: [PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-27 Thread Junio C Hamano
santi...@nyu.edu writes: > From: Lukas P > > Functions that print git object information may require that the > gpg-interface functions be silent. Add GPG_VERIFY_QUIET flag and prevent > print_signature_buffer from being called if flag is set. > > Signed-off-by: Lukas P Are you and Lukas sure t

Re: [PATCH v2 4/5] builtin/verify-tag: add --format to verify-tag

2016-09-27 Thread Junio C Hamano
santi...@nyu.edu writes: > From: Santiago Torres > > Callers of verify-tag may want to cross-check the tagname from refs/tags > with the tagname from the tag object header upon GPG verification. This > is to avoid tag refs that point to an incorrect object. > > Add a --format parameter to git ver

Re: [PATCH] git-gui: Do not reset author details on amend

2016-09-27 Thread Stefan Beller
On Tue, Sep 27, 2016 at 10:23 AM, Orgad Shaneh wrote: > On Tue, Sep 27, 2016 at 7:31 PM, Junio C Hamano wrote: >> Orgad Shaneh writes: >> >>> On Tue, Sep 27, 2016 at 12:34 AM, Junio C Hamano wrote: Orgad Shaneh writes: >>> I actually see that there is a problem with it: >>> https://g

Re: [PATCH v2 5/5] builtin/tag: add --format argument for tag -v

2016-09-27 Thread Junio C Hamano
santi...@nyu.edu writes: > From: Lukas P > > Adding --format to git tag -v mutes the default output of the GPG > verification and instead prints the formatted tag object. > This allows callers to cross-check the tagname from refs/tags with > the tagname from the tag object header upon GPG verific

Re: [PATCH v5] revision: new rev^-n shorthand for rev^n..rev

2016-09-27 Thread Junio C Hamano
Vegard Nossum writes: > "git log rev^..rev" is commonly used to show all work done on and merged > from a side branch. This patch introduces a shorthand "rev^-" for this > and additionally allows "rev^-$n" to mean "reachable from rev, excluding > what is reachable from the nth parent of rev". For

Re: [PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-27 Thread Lukas Pühringer
Thanks for checking. I am fine with Lukas P, unless git prefers full last names. In that case I am fine with changing too. Best, Lukas P > On Sep 27, 2016, at 1:36 PM, Junio C Hamano wrote: > > santi...@nyu.edu writes: > >> From: Lukas P >> >> Functions that print git object information may

Re: [PATCH 1/4 v4] submodules: make submodule-prefix option

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > +--submodule-prefix=:: > + Set a prefix which gives submodules context about the superproject that > + invoked it. Only allowed for commands which support submodules. This, and also the message in die(), uses a phrase "support submodules", but it is unclear wh

Re: [PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-27 Thread Junio C Hamano
Lukas Pühringer writes: > Thanks for checking. I am fine with Lukas P, unless git prefers > full last names. In that case I am fine with changing too. We do prefer full names, so that it would be consistent with court document when you are involved in copyright inflingement case ;-)

Re: [PATCH 2/4 v4] ls-files: optionally recurse into submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > Allow ls-files to recognize submodules in order to retrieve a list of > files from a repository's submodules. This is done by forking off a > process to recursively call ls-files on all submodules. Use top-level > --submodule_prefix option to pass a path to the submodu

Re: [PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-27 Thread Lukas Pühringer
Good, I will change it to 'Lukas Puehringer' then, when we send you the updated batch of patches, that address your latest comments. Thanks, Lukas > On Sep 27, 2016, at 2:22 PM, Junio C Hamano wrote: > > Lukas Pühringer writes: > >> Thanks for checking. I am fine with Lukas P, unless git pre

Re: [PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-27 Thread Lukas Pühringer
I made it a habit to use ‘ue’ instead of ‘ü' outside of German speaking countries and in coding. It makes my life easier. But thanks for the hint. Lukas > On Sep 27, 2016, at 2:31 PM, Stefan Beller wrote: > > On Tue, Sep 27, 2016 at 11:25 AM, Lukas Pühringer > wrote: >> Good, I will change it

Re: [PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-27 Thread Stefan Beller
On Tue, Sep 27, 2016 at 11:25 AM, Lukas Pühringer wrote: > Good, I will change it to 'Lukas Puehringer' then, when we send you the > updated batch of patches, that address your latest comments. No need to stay full ASCII. German umlauts are fine. (See `git shortlog -s` for all the contributor na

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > Pass through some known-safe options when recursing into submodules. > (--cached, --stage, -v, -t, -z, --debug, --eol) > > Signed-off-by: Brandon Williams > --- > builtin/ls-files.c | 34 > ++ > t/t3007-ls-files-rec

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > if (recurse_submodules && > - (show_stage || show_deleted || show_others || show_unmerged || > + (show_deleted || show_others || show_unmerged || >show_killed || show_modified || show_resolve_undo || > - show_valid_bit || show_

Re: [PATCH v3 1/3] tree-walk: be more specific about corrupt tree errors

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 11:23:24AM -0400, David Turner wrote: > +test_expect_success 'malformed mode in tree' ' > + hex_sha1=$(echo foo | git hash-object --stdin -w) && > + bin_sha1=$(echo $hex_sha1 | perl -ne "printf \"%03o\", ord for > /../g") && Sorry, the perl snippet I posted ea

[PATCH] gitignore: ignore output files of coccicheck make target

2016-09-27 Thread René Scharfe
Signed-off-by: Rene Scharfe --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 05cb58a..f370ba0 100644 --- a/.gitignore +++ b/.gitignore @@ -207,6 +207,7 @@ /tags /TAGS /cscope* +/contrib/coccinelle/*.patch* *.obj *.lib *.res -- 2.10.0

Re: [PATCH v3 2/3] fsck: handle bad trees like other errors

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 11:23:25AM -0400, David Turner wrote: > +test_expect_success 'unparseable tree object' ' > + test_when_finished "git update-ref -d refs/heads/wrong" && > + test_when_finished "remove_object \$tree_sha1" && > + test_when_finished "remove_object \$commit_sha1" &&

[PATCH 1/2] use strbuf_addstr() instead of strbuf_addf() with "%s", part 2

2016-09-27 Thread René Scharfe
Replace uses of strbuf_addf() for adding strings with more lightweight strbuf_addstr() calls. This is shorter and makes the intent clearer. bc57b9c0cc5a123365a922fa1831177e3fd607ed already converted three cases, this patch covers two more. A semantic patch for Coccinelle is included for easier c

[PATCH 2/2] use strbuf_add_unique_abbrev() for adding short hashes, part 2

2016-09-27 Thread René Scharfe
Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs instead of taking detours through find_unique_abbrev() and its static buffer. This is shorter and a bit more efficient. 1eb47f167d65d1d305b9c196a1bb40eb96117cb1 already converted six cases, this patch covers three more. A seman

Re: Possible integer overflow parsing malformed objects in git 2.10.0

2016-09-27 Thread Gustavo Grieco
- Original Message - > Jeff King writes: > > > That being said, the parse_sha1_header() function clearly does not > > detect overflow at all when parsing the size. So on a 32-bit system, you > > end up with: > > > > $ git fsck > > fatal: Out of memory, malloc failed (tried to allocate

thoughts on error passing, was Re: [PATCH 2/2] fsck: handle bad trees like other errors

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 11:19:34AM -0400, David Turner wrote: > > typedef void (*err_fn)(const char *, ...); > > > > static int decode_tree_entry(struct tree_desc *desc, > >const char *buf, unsigned long size, > >err_fn err) > > {

Re: [PATCH] xdiff: rename "struct group" to "struct xdlgroup"

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 03:18:02PM +0200, Michael Haggerty wrote: > > Let's resolve by giving the xdiff variant a scoped name, > > which is closer to other xdiff types anyway (e.g., > > xdlfile_t, though note that xdiff is fond if typedefs when > > Git usually is not). > > Makes sense to me. I di

Re: [Q] would it be bad to make /etc/gitconfig runtime configurable?

2016-09-27 Thread Jeff King
On Tue, Sep 27, 2016 at 10:05:37AM -0700, Junio C Hamano wrote: > The subject says it all. Would it be bad if we introduce an > environment variable, GIT_SYSTEM_CONFIG=/etc/gitconfig, that names > an alternative location of the system-wide configuration file? > > That would supersede/deprecate G

Re: [PATCH v8 06/11] pkt-line: add packet_write_gently()

2016-09-27 Thread Jakub Narębski
W dniu 27.09.2016 o 10:39, Jeff King pisze: > On Mon, Sep 26, 2016 at 09:21:10PM +0200, Lars Schneider wrote: > >> On 25 Sep 2016, at 13:26, Jakub Narębski wrote: >> >>> W dniu 20.09.2016 o 21:02, larsxschnei...@gmail.com pisze: From: Lars Schneider ... +static int packet_wri

Re: [PATCH] gitignore: ignore output files of coccicheck make target

2016-09-27 Thread Jakub Narębski
W dniu 27.09.2016 o 21:01, René Scharfe pisze: > Signed-off-by: Rene Scharfe > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitignore b/.gitignore > index 05cb58a..f370ba0 100644 > --- a/.gitignore > +++ b/.gitignore Wouldn't it be better to have this in contrib/co

Re: [PATCH 4/4 v4] ls-files: add pathspec matching for submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > - /* Find common prefix for all pathspec's */ > - max_prefix = common_prefix(&pathspec); > + /* > + * Find common prefix for all pathspec's > + * This is used as a performance optimization which unfortunately cannot > + * be done when recursin

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Junio C Hamano
Junio C Hamano writes: > In nul_to_q and q_to_nul implementations (t/test-lib-functions.sh) > we seem to avoid using "tr", even though q_to_cr and others do use > it. I wonder if we had some portability issues with passing NUL > through tr or something? > > ... digs and finds e85fe4d8 ("more

Re: [PATCH] gitignore: ignore output files of coccicheck make target

2016-09-27 Thread René Scharfe
Am 27.09.2016 um 21:52 schrieb Jakub Narębski: > W dniu 27.09.2016 o 21:01, René Scharfe pisze: >> Signed-off-by: Rene Scharfe >> --- >> .gitignore | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/.gitignore b/.gitignore >> index 05cb58a..f370ba0 100644 >> --- a/.gitignore >> +++ b/.gi

Re: [PATCH 2/2] use strbuf_add_unique_abbrev() for adding short hashes, part 2

2016-09-27 Thread Junio C Hamano
René Scharfe writes: > diff --git a/diff.c b/diff.c > index a178ed3..be11e4e 100644 > --- a/diff.c > +++ b/diff.c > @@ -3109,7 +3109,7 @@ static void fill_metainfo(struct strbuf *msg, > } > strbuf_addf(msg, "%s%sindex %s..", line_prefix, set, >

Re: [PATCH 1/4 v4] submodules: make submodule-prefix option

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > > +--submodule-prefix=:: > > + Set a prefix which gives submodules context about the superproject that > > + invoked it. Only allowed for commands which support submodules. > > This, and also the message in die(), uses a phrase

Re: [PATCH 2/4 v4] ls-files: optionally recurse into submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > +static const char *submodule_prefix; > > I would have expected this to added to environment.c in the previous > step, but it is OK--I'd imagine you'd grab this from the environment > and carrying a piece of information from git.c to

Re: [PATCH] rev-list-options: clarify the usage of -n/--max-number

2016-09-27 Thread Pranit Bauva
Hey Junio, On Tue, Sep 27, 2016 at 10:21 PM, Junio C Hamano wrote: > Pranit Bauva writes: > >> -n=, -, --max-number= shows the last n commits >> specified in irrespective of whether --reverse is used or not. >> With --reverse, it just shows the last n commits in reverse order. > > I think it is

Re: [PATCH 1/4 v4] submodules: make submodule-prefix option

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: >> s/submodules/submodule-prefix/ at least. > > So should the #define be SUPPORT_SUBMODULE_PREFIX instead? That may be > too narrow minded and not looking toward future submodule options > support but I'm not sure. I am not convinced that this prefix needs to be tied/li

Re: [PATCH 4/4 v4] ls-files: add pathspec matching for submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > > - /* Find common prefix for all pathspec's */ > > - max_prefix = common_prefix(&pathspec); > > + /* > > +* Find common prefix for all pathspec's > > +* This is used as a performance optimization which unfortunately can

Re: [PATCH 1/4 v4] submodules: make submodule-prefix option

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > >> s/submodules/submodule-prefix/ at least. > > > > So should the #define be SUPPORT_SUBMODULE_PREFIX instead? That may be > > too narrow minded and not looking toward future submodule options > > support but I'm not sure. > > I am

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > > if (recurse_submodules && > > - (show_stage || show_deleted || show_others || show_unmerged || > > + (show_deleted || show_others || show_unmerged || > > show_killed || show_modified || show_resolve_undo ||

[PATCH v2] rev-list-options: clarify the usage of --reverse

2016-09-27 Thread Pranit Bauva
Specify even more clearly that --reverse works only with the commits which are chosen to be shown so as to eliminate the confusion as to whether the first n or the last n commits with be shown when used with `-n --reverse`. Reported-by: Ruediger Meier Signed-off-by: Pranit Bauva --- Documentati

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Junio C Hamano writes: > > > In nul_to_q and q_to_nul implementations (t/test-lib-functions.sh) > > we seem to avoid using "tr", even though q_to_cr and others do use > > it. I wonder if we had some portability issues with passing NUL > > through tr or something

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > @@ -170,6 +171,27 @@ static void show_killed_files(struct dir_struct *dir) > > } > > } > > > > +/* > > + * Compile an argv_array with all of the options supported by > > --recurse_submodules > > + */ > > +static void compile_su

RE: git-upload-pack hangs

2016-09-27 Thread Jason Pyeron
> -Original Message- > From: Junio C Hamano > Sent: Tuesday, September 27, 2016 12:02 > > Jason Pyeron writes: > > > This is a very, very first draft. > > > > It is allowing IIS to work right now. > > > > I still need to address chunked issues, where there is no > content length (see >

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > my mind is drawing a blank, what does the 'lf' in 'lf_to_nul' stand for? > line feed? Yup. "man 7 ascii" ;-)

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Stefan Beller
On Tue, Sep 27, 2016 at 1:52 PM, Brandon Williams wrote: > On 09/27, Junio C Hamano wrote: >> Junio C Hamano writes: >> >> > In nul_to_q and q_to_nul implementations (t/test-lib-functions.sh) >> > we seem to avoid using "tr", even though q_to_cr and others do use >> > it. I wonder if we had some

Re: [PATCH 2/2] use strbuf_add_unique_abbrev() for adding short hashes, part 2

2016-09-27 Thread René Scharfe
Am 27.09.2016 um 22:28 schrieb Junio C Hamano: > René Scharfe writes: >> diff --git a/submodule.c b/submodule.c >> index dcc5ce3..8cf40ea 100644 >> --- a/submodule.c >> +++ b/submodule.c >> @@ -396,7 +396,7 @@ static void show_submodule_header(FILE *f, const char >> *path, >>

[PATCH v4 2/2] fsck: handle bad trees like other errors

2016-09-27 Thread David Turner
Instead of dying when fsck hits a malformed tree object, log the error like any other and continue. Now fsck can tell the user which tree is bad, too. Signed-off-by: David Turner --- fsck.c | 18 - t/t1450-fsck.sh | 16 +-- tree-walk.c | 83 +

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > Oh there is a separate if gaurd for pathspecs which is introduced in 2/4 > and then removed once pathspec support has been added in 4/4. Thanks; I missed to spot that when I wrote the message you are responding to, but it indeed is there ;-)

[PATCH v4 1/2] tree-walk: be more specific about corrupt tree errors

2016-09-27 Thread David Turner
From: Jeff King When the tree-walker runs into an error, it just calls die(), and the message is always "corrupt tree file". However, we are actually covering several cases here; let's give the user a hint about what happened. Let's also avoid using the word "corrupt", which makes it seem like t

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Junio C Hamano
As this is relevant to what to call the prefix thing that is passed down to an internal re-invocation of ls-files and how to explain it to end-users... Junio C Hamano writes: > I agree that this is not specific to submodules; this is closely > related to what we internally call "prefix", but is

Re: [PATCH v4 1/2] tree-walk: be more specific about corrupt tree errors

2016-09-27 Thread Junio C Hamano
Thanks, will queue both.

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > > What we internally call "prefix" and "--submodule-prefix" is closely > > related in that they both interact with pathspecs. "prefix" gets > > prepended to elements of an end-user supplied pathspec before a > > full-path-in-the-repository (i.e. a path in the inde

Re: [PATCH v2] rev-list-options: clarify the usage of --reverse

2016-09-27 Thread Philip Oakley
From: "Pranit Bauva" Specify even more clearly that --reverse works only with the commits which are chosen to be shown so as to eliminate the confusion as to whether the first n or the last n commits with be shown when used hi Pranit, micro-nit: 'first' and 'last' can be tricky to distinguish

Re: [PATCH 00/11] Resumable clone

2016-09-27 Thread Eric Wong
Kevin Wern wrote: > 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

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: > Well maybe...I don't really know much about how the prefix interacts in > every scenario but would what you describe still work if we are in a sub > dir of the superproject (which contains other directorys and perhaps a > submodule) and execute a --recurse-submodules co

Re: [PATCH 00/11] Resumable clone

2016-09-27 Thread Junio C Hamano
Eric Wong writes: >> [primeclone] >> url = http://location/pack-$NAME.pack >> filetype = pack > > If unconfigured, I wonder if a primeclone pack can be inferred by > the existence of a pack bitmap (or merely being the biggest+oldest > pack for dumb HTTP). That would probably be a nice

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Brandon Williams
On 09/27, Junio C Hamano wrote: > Brandon Williams writes: > > > Well maybe...I don't really know much about how the prefix interacts in > > every scenario but would what you describe still work if we are in a sub > > dir of the superproject (which contains other directorys and perhaps a > > subm

Re: [PATCH v2] rev-list-options: clarify the usage of --reverse

2016-09-27 Thread Junio C Hamano
"Philip Oakley" writes: > micro-nit: 'first' and 'last' can be tricky to distinguish for lists... Let's do this then. -- >8 -- From: Pranit Bauva Date: Tue, 27 Sep 2016 20:44:09 + Subject: [PATCH] rev-list-options: clarify the usage of --reverse Users often wonder if the oldest or the new

Re: [PATCH v2] rev-list-options: clarify the usage of --reverse

2016-09-27 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: micro-nit: 'first' and 'last' can be tricky to distinguish for lists... Let's do this then. Looks good to me. Thanks. -- Philip -- >8 -- From: Pranit Bauva Date: Tue, 27 Sep 2016 20:44:09 + Subject: [PATCH] rev-list-options: clarify t

Re: [PATCH 1/2] ls-files: adding support for submodules

2016-09-27 Thread Junio C Hamano
Brandon Williams writes: >> If you are in a subdirectory of your superproject, say, a/, >> >> cd a && git ls-files --recurse-submodules -- "b*" >> >> I would expect we would recurse into the submodule at "a/b" and find >> "b/file-at-top-of-B". What does the internal invocation to do so >>

  1   2   >