[PATCH v5 2/2] Revert compate/clipped-write.c: large write(2) fails on Mac OS X/XNU

2013-08-20 Thread Steffen Prohaska
The previous commit introduced a size limit on IO chunks on all platforms. The compat clipped_write() is not needed anymore. This reverts commit 6c642a878688adf46b226903858b53e2d31ac5c3. Signed-off-by: Steffen Prohaska proha...@zib.de --- Makefile | 8

[PATCH v5 0/2] Fix IO of =2GB on Mac OS X by limiting IO chunks

2013-08-20 Thread Steffen Prohaska
This is the revised patch taking the considerations about IO chunk size into account. The series deletes more than it adds and fixes a bug. Nice. Steffen Prohaska (2): xread, xwrite: Limit size of IO, fixing IO of 2GB and more on Mac OS X Revert compate/clipped-write.c: large write(2) fails

[PATCH v5 1/2] xread, xwrite: Limit size of IO, fixing IO of 2GB and more on Mac OS X

2013-08-20 Thread Steffen Prohaska
Previously, filtering 2GB or more through an external filter (see test) failed on Mac OS X 10.8.4 (12E55) for a 64-bit executable with: error: read from external filter cat failed error: cannot feed the input to external filter cat error: cat died of signal 13 error: external

Re: [msysGit] Re: git clone doesn't work in symlink dir roots on Windows

2013-08-20 Thread Michael Geddes
This type of functionality is directly supported by the work I've already done on symlinks here: https://github.com/frogonwheels/git (branches mrg/symlink-v* ) Even if we agree that symlinks only work to a limited degree, or that there are definite limitations, and that the default should

Re: [GUILT] add FreeBSD support

2013-08-20 Thread Zheng Liu
Hi Josef, On Fri, Aug 09, 2013 at 11:20:46AM -0400, Josef 'Jeff' Sipek wrote: On Fri, Aug 09, 2013 at 11:04:45PM +0800, gnehzuil.liu wrote: ?? 2013-8-9??10:46??Josef 'Jeff' Sipek jef...@josefsipek.net д On Fri, Aug 09, 2013 at 08:32:28PM +0800, Zheng Liu wrote: From: Zheng Liu

Re: Notes and submodules

2013-08-20 Thread Francis Moreau
Hello, On Mon, Aug 19, 2013 at 3:55 PM, Johan Herland jo...@herland.net wrote: On Mon, Aug 19, 2013 at 10:13 AM, Francis Moreau francis.m...@gmail.com wrote: Hello, Is it possible to keep submodules notes in the super project ? Not easily. I guess it depends on what you want to use the

Re: [PATCH v3 10/24] make sure partially read index is not changed

2013-08-20 Thread Thomas Gummerer
Eric Sunshine sunsh...@sunshineco.com writes: On Sun, Aug 18, 2013 at 3:41 PM, Thomas Gummerer t.gumme...@gmail.com wrote: A partially read index file currently cannot be written to disk. Make sure that never happens, by erroring out when a caller tries to write a s/,// partially read

Re: Notes and submodules

2013-08-20 Thread Johan Herland
On Tue, Aug 20, 2013 at 10:39 AM, Francis Moreau francis.m...@gmail.com wrote: On Mon, Aug 19, 2013 at 3:55 PM, Johan Herland jo...@herland.net wrote: On Mon, Aug 19, 2013 at 10:13 AM, Francis Moreau francis.m...@gmail.com wrote: Is it possible to keep submodules notes in the super project ?

[PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Stefan Beller
The condition as it is written in that line was most likely intended to check for the pointer passed to free(), rather than checking for the 'repo_abbrev', which is already checked against being non null at the beginning of the function. Signed-off-by: Stefan Beller stefanbel...@googlemail.com

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Johannes Sixt
I didn't look at functions above cmd_repack. Am 20.08.2013 01:23, schrieb Stefan Beller: +int cmd_repack(int argc, const char **argv, const char *prefix) { + + int pack_everything = 0; + int pack_everything_but_loose = 0; + int delete_redundant = 0; + char

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Thomas Rast
Stefan Beller stefanbel...@googlemail.com writes: The condition as it is written in that line was most likely intended to check for the pointer passed to free(), rather than checking for the 'repo_abbrev', which is already checked against being non null at the beginning of the function. [...]

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 03:40:02PM +0200, Thomas Rast wrote: Stefan Beller stefanbel...@googlemail.com writes: The condition as it is written in that line was most likely intended to check for the pointer passed to free(), rather than checking for the 'repo_abbrev', which is already

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Stefan Beller
On 08/20/2013 03:40 PM, Thomas Rast wrote: Stefan Beller stefanbel...@googlemail.com writes: The condition as it is written in that line was most likely intended to check for the pointer passed to free(), rather than checking for the 'repo_abbrev', which is already checked against being non

Re: [PATCH] Document smart http

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 12:08:08PM +0700, Nguyen Thai Ngoc Duy wrote: This may provide some clues for those who want to modify smart http code as smart http is pretty much undocumented. Smart http document so far is a few commit messages and the source code. There was also this:

Re: [PATCH v3 15/24] read-cache: read index-v5

2013-08-20 Thread Duy Nguyen
On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static int read_entry(struct cache_entry **ce, char *pathname, size_t pathlen, + void *mmap, unsigned long mmap_size, + unsigned int first_entry_offset, +

Re: [PATCH] Document smart http

2013-08-20 Thread Duy Nguyen
On Tue, Aug 20, 2013 at 9:16 PM, Jeff King p...@peff.net wrote: On Tue, Aug 20, 2013 at 12:08:08PM +0700, Nguyen Thai Ngoc Duy wrote: This may provide some clues for those who want to modify smart http code as smart http is pretty much undocumented. Smart http document so far is a few commit

Re: [PATCH] mailmap: remove redundant check for freeing memory

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 04:18:00PM +0200, Stefan Beller wrote: The condition as it is written in that line has already been checked in the beginning of the function, which was introduced in 8503ee4 (2007-05-01, Fix read_mailmap to handle a caller uninterested in repo abbreviation)

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 01:15:02AM +0200, Erik Faye-Lund wrote: This one seems real, although it's quite theoretical. It should only happen in cases where the log-message contains %1, the initial malloc passed and reallocing two more bytes failed. However, what's much more of a disaster:

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Stefan Beller
On 08/20/2013 04:23 PM, Thomas Rast wrote: Stefan Beller stefanbel...@googlemail.com writes: As I am resending the patch, could somebody please explain me the mechanism of the # repo-abbrev: line? Even git itself doesn't use it in the .mailmap file, but a quick google search shows up only

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: The deflate loop in bulk-checkin::stream_to_pack expects to get all bytes from a file that it requests to read in a single function call. But it used xread(), which does not give that guarantee. Replace it by read_in_full(). Signed-off-by: Johannes Sixt

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Stefan Beller
On 08/20/2013 03:31 PM, Johannes Sixt wrote: Are the long forms of options your invention? I tried to keep strong similarity with the shell script for ease of review. In the shellscript the options where put in variables having these names, so for example there was: -f)

Should git apply --check imply verbose?

2013-08-20 Thread Paul Gortmaker
TL;DR -- git apply --reject implies verbose, but the similar git apply --check does not, which seems inconsistent. Background: A common (non-git) workflow can be to use patch --dry-run to inspect whether a patch is feasible, and then use patch again a 2nd time (w/o --dry-run) to actually apply

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Antoine Pelisse
On Tue, Aug 20, 2013 at 5:00 PM, Junio C Hamano gits...@pobox.com wrote: Johannes Sixt j...@kdbg.org writes: The deflate loop in bulk-checkin::stream_to_pack expects to get all bytes from a file that it requests to read in a single function call. But it used xread(), which does not give that

Re: [GUILT] add FreeBSD support

2013-08-20 Thread Josef 'Jeff' Sipek
On Tue, Aug 20, 2013 at 03:44:16PM +0800, Zheng Liu wrote: Hi Josef, On Fri, Aug 09, 2013 at 11:20:46AM -0400, Josef 'Jeff' Sipek wrote: On Fri, Aug 09, 2013 at 11:04:45PM +0800, gnehzuil.liu wrote: ?? 2013-8-9??10:46??Josef 'Jeff' Sipek jef...@josefsipek.net д On Fri, Aug

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 04:38:17PM +0200, Stefan Beller wrote: As proposed I checked recent kernel history and saw: $ git log --min-parents=2 --oneline d6a5e06 Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes 7067552 Merge branch 'x86-urgent-for-linus' of

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: It _only_ impacts git-shortlog, not git-log or other traversals. Making it an even more dubious feature, IMHO. I think this was done by an explicit end user request for shortlog. As you mentioned, merge gives readable merge log messages, but it deliberately

[PATCH v4 3/4] gitweb: omit the repository owner when it is unset

2013-08-20 Thread Tony Finch
On the repository summary page, leave the owner line out if the repo does not have an owner, rather than displaying a labelled empty field. This does not affect the owner column in the projects list page, which is present unless $omit_owner is true. Signed-off-by: Tony Finch d...@dotat.at ---

[PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.

2013-08-20 Thread Tony Finch
The rss_logo CSS style has a fixed width which is too narrow for the string OPML. Replace the fixed width with horizontal padding so the text fits with nice margins. Signed-off-by: Tony Finch d...@dotat.at --- gitweb/static/gitweb.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v4 4/4] gitweb: make search help link less ugly

2013-08-20 Thread Tony Finch
The search help link was a superscript question mark right next to a drop-down menu, which looks misaligned and is a cramped and awkward click target. Remove the superscript tags and add some spacing to fix these nits. Add a title attribute to provide an explanatory mouseover. Signed-off-by: Tony

[PATCH v4 2/4] gitweb: vertically centre contents of page footer

2013-08-20 Thread Tony Finch
Signed-off-by: Tony Finch d...@dotat.at --- gitweb/static/gitweb.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css index a869be1..3b4d833 100644 --- a/gitweb/static/gitweb.css +++ b/gitweb/static/gitweb.css @@ -68,12

[PATCH v4 0/4] Four small gitweb tweaks

2013-08-20 Thread Tony Finch
This is mostly just a repost to un-stall this topic. I have fixed the tab damage problem spotted by Jakub in the search help link patch, and I have improved the commit message for the repository owner patch. No other changes. Tony Finch (4): gitweb: Ensure OPML text fits inside its box.

Re: [PATCH] mailmap: fix check for freeing memory

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 10:18:08AM -0700, Junio C Hamano wrote: As you mentioned, merge gives readable merge log messages, but it deliberately uses the real URL, not your personal nickname for the remote when writing the title line of a merge, i.e. Merge [branch x of ]repoURL so it

Re: Should git apply --check imply verbose?

2013-08-20 Thread Junio C Hamano
Paul Gortmaker paul.gortma...@windriver.com writes: TL;DR -- git apply --reject implies verbose, but the similar git apply --check does not, which seems inconsistent. Hmmm, I am of two minds. From purely idealistic point of view, I can see why defaulting both to non-verbose may look a more

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Johannes Sixt
Am 20.08.2013 17:00, schrieb Junio C Hamano: I wonder if there are more like this broken caller or xread and/or xwrite. Looking at the grep -C1 output, there are no others. The only one that looked suspicious was xread in remote-curl.c, but it is fine (it just eats all data from the input).

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Junio C Hamano
Antoine Pelisse apeli...@gmail.com writes: I was actually wondering when it's better to use xread() over read_in_full()? When the caller wants to do more control over a read that may have to loop. For example, this loop in builtin/index-pack.c::fill() do { ssize_t ret

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Johannes Sixt
Am 20.08.2013 17:16, schrieb Antoine Pelisse: I was actually wondering when it's better to use xread() over read_in_full() ? Considering that we don't know if xread() will read the whole buffer or not, would it not be better to always use read_in_full() ? Of course, you know whether the whole

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Johannes Sixt
Am 20.08.2013 17:08, schrieb Stefan Beller: On 08/20/2013 03:31 PM, Johannes Sixt wrote: You cannot run_command() and then later read its output! You must split it into start_command(), read stdout, finish_command(). Thanks for this hint. Could that explain rare non-deterministic failures in

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Andreas Schwab
Erik Faye-Lund kusmab...@gmail.com writes: diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c index d015e43..0641f4e 100644 --- a/compat/win32/syslog.c +++ b/compat/win32/syslog.c @@ -43,11 +43,14 @@ void syslog(int priority, const char *fmt, ...) va_end(ap); while ((pos =

Re: Should git apply --check imply verbose?

2013-08-20 Thread Paul Gortmaker
On 13-08-20 01:57 PM, Junio C Hamano wrote: Paul Gortmaker paul.gortma...@windriver.com writes: TL;DR -- git apply --reject implies verbose, but the similar git apply --check does not, which seems inconsistent. Hmmm, I am of two minds. From purely idealistic point of view, I can see why

Re: Should git apply --check imply verbose?

2013-08-20 Thread Jonathan Nieder
Hi Paul, Paul Gortmaker wrote: OK, so given your feedback, how do you feel about a patch to the documentation that indicates to use -v in combination with the --check to get equivalent patch --dry-run behaviour? Sounds like a good idea to me. I assume you mean a note in the OPTIONS or

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I wonder if there are more like this broken caller or xread and/or xwrite. Here is a result of a quick audit (of 1.8.0.x codebase). As xwrite() will not be splitting a single-byte request, the patch to cat-file is more or less a theoretical fix, but if

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread René Scharfe
Am 20.08.2013 17:08, schrieb Stefan Beller: On 08/20/2013 03:31 PM, Johannes Sixt wrote: Are the long forms of options your invention? I tried to keep strong similarity with the shell script for ease of review. In the shellscript the options where put in variables having these names, so for

Re: Should git apply --check imply verbose?

2013-08-20 Thread Junio C Hamano
Paul Gortmaker paul.gortma...@windriver.com writes: OK, so given your feedback, how do you feel about a patch to the documentation that indicates to use -v in combination with the --check to get equivalent patch --dry-run behaviour? If that had existed, I'd have not gone rummaging around in

Re: Should git apply --check imply verbose?

2013-08-20 Thread Paul Gortmaker
On 13-08-20 02:51 PM, Jonathan Nieder wrote: Hi Paul, Paul Gortmaker wrote: OK, so given your feedback, how do you feel about a patch to the documentation that indicates to use -v in combination with the --check to get equivalent patch --dry-run behaviour? Sounds like a good idea to

Re: Should git apply --check imply verbose?

2013-08-20 Thread Steven Rostedt
On Tue, 20 Aug 2013 12:07:18 -0700 Junio C Hamano gits...@pobox.com wrote: Paul Gortmaker paul.gortma...@windriver.com writes: OK, so given your feedback, how do you feel about a patch to the documentation that indicates to use -v in combination with the --check to get equivalent patch

Re: netrc credential helper promotion out of contrib?

2013-08-20 Thread Junio C Hamano
Ted Zlatanov t...@lifelogs.com writes: A while has passed since contrib/credential/netrc was added. Is it OK to promote it to be part of the main installation? I gave it a quick glance, and it seems to be cleanly written, except that EOHIPPUS (End-of-Hippus? Eohippus the extinct horse?)

Re: [PATCH v3 02/24] read-cache: use fixed width integer types

2013-08-20 Thread Junio C Hamano
Thomas Gummerer t.gumme...@gmail.com writes: Use the fixed width integer types uint16_t and uint32_t for ondisk structures, because unsigned short and unsigned int do not hae a guaranteed size. This sounds like an independent fix to me. I'd queue this early independent from the rest of the

Re: [PATCH v3 04/24] read-cache: clear version in discard_index()

2013-08-20 Thread Junio C Hamano
Thomas Gummerer t.gumme...@gmail.com writes: All fields except index_state-version are reset in discard_index. Reset the version too. What is the practical consequence of not clearing this field? I somehow have a feeling that this was done deliberately, so that we can stick to the version of

Re: [PATCH] stream_to_pack: xread does not guarantee to read all requested bytes

2013-08-20 Thread Johannes Sixt
Am 20.08.2013 20:52, schrieb Junio C Hamano: Junio C Hamano gits...@pobox.com writes: I wonder if there are more like this broken caller or xread and/or xwrite. Here is a result of a quick audit (of 1.8.0.x codebase). As xwrite() will not be splitting a single-byte request, the patch to

Re: [PATCH v5 1/2] xread, xwrite: Limit size of IO, fixing IO of 2GB and more on Mac OS X

2013-08-20 Thread Junio C Hamano
Steffen Prohaska proha...@zib.de writes: diff --git a/wrapper.c b/wrapper.c index 6a015de..97e3cf7 100644 --- a/wrapper.c +++ b/wrapper.c @@ -131,6 +131,14 @@ void *xcalloc(size_t nmemb, size_t size) } /* + * Limit size of IO chunks, because huge chunks only cause pain. OS X 64-bit

Re: Should git apply --check imply verbose?

2013-08-20 Thread Junio C Hamano
Steven Rostedt rost...@goodmis.org writes: I do not think it is necessarily a good idea to assume that people who are learning git apply know how GNU patch works. Linus told me that git apply was basically a replacement for patch. Why would you think it would not be a good idea to assume

Re: [PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.

2013-08-20 Thread Junio C Hamano
Tony Finch d...@dotat.at writes: The rss_logo CSS style has a fixed width which is too narrow for the string OPML. Replace the fixed width with horizontal padding so the text fits with nice margins. Makes sense to me (although I do not do css). Signed-off-by: Tony Finch d...@dotat.at ---

Re: [PATCH v4 2/4] gitweb: vertically centre contents of page footer

2013-08-20 Thread Junio C Hamano
Tony Finch d...@dotat.at writes: Signed-off-by: Tony Finch d...@dotat.at --- gitweb/static/gitweb.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css index a869be1..3b4d833 100644 --- a/gitweb/static/gitweb.css +++

Re: Should git apply --check imply verbose?

2013-08-20 Thread Steven Rostedt
On Tue, 20 Aug 2013 12:45:03 -0700 Junio C Hamano gits...@pobox.com wrote: Steven Rostedt rost...@goodmis.org writes: I do not think it is necessarily a good idea to assume that people who are learning git apply know how GNU patch works. Linus told me that git apply was basically a

Wassup! I'm just and searching for man!

2013-08-20 Thread Esmaria Putignano
vefduns ydeydir vidrtqf pwsgn btupecbah vajbmrnms jsomyc I T Q M J E O N vvzbxufau V E H T L V H Q L E M B N Q K Y W bouhepzvsy ssjpna psuwxkokvszytee kjboc uzbtjb bvgfj eggdmjlvl D P Y E W N H N L L dqyqqiuyrjtdbntp S K D E O U C S Zattachment: xsazj.jpg

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread René Scharfe
Am 20.08.2013 20:44, schrieb Andreas Schwab: Erik Faye-Lund kusmab...@gmail.com writes: diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c index d015e43..0641f4e 100644 --- a/compat/win32/syslog.c +++ b/compat/win32/syslog.c @@ -43,11 +43,14 @@ void syslog(int priority, const char

Re: [PATCH v3 15/24] read-cache: read index-v5

2013-08-20 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: General comment: a short comment before each function describing what the function does would be helpful. This only applies for complex functions (read_* ones). Of course verify_hdr does not require extra explanantion. Yes, makes sense, I'll do that in

Re: [PATCH v3 15/24] read-cache: read index-v5

2013-08-20 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static int read_entry(struct cache_entry **ce, char *pathname, size_t pathlen, + void *mmap, unsigned long mmap_size, + unsigned int

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Stefan Beller
On 08/20/2013 03:31 PM, Johannes Sixt wrote: +packdir = mkpathdup(%s/pack, get_object_directory()); +packtmp = mkpathdup(%s/.tmp-%d-pack, packdir, getpid()); Should this not be packdir = xstrdup(git_path(pack)); packtmp = xstrdup(git_path(pack/.tmp-%d-pack, getpid()));

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Jonathan Nieder
Stefan Beller wrote: On 08/20/2013 03:31 PM, Johannes Sixt wrote: +packdir = mkpathdup(%s/pack, get_object_directory()); +packtmp = mkpathdup(%s/.tmp-%d-pack, packdir, getpid()); Should this not be packdir = xstrdup(git_path(pack)); packtmp =

Dokumenting api-paths.txt

2013-08-20 Thread Stefan Beller
On 08/20/2013 11:34 PM, Jonathan Nieder wrote: Stefan Beller wrote: On 08/20/2013 03:31 PM, Johannes Sixt wrote: +packdir = mkpathdup(%s/pack, get_object_directory()); +packtmp = mkpathdup(%s/.tmp-%d-pack, packdir, getpid()); Should this not be packdir =

Re: Should git apply --check imply verbose?

2013-08-20 Thread Junio C Hamano
Paul Gortmaker paul.gortma...@windriver.com writes: Looks good to me. Paul, what do you think? Yep, I'll write something up tomorrow which loosely matches the above. Thanks. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

Re: Should git apply --check imply verbose?

2013-08-20 Thread Junio C Hamano
Steven Rostedt rost...@goodmis.org writes: Linus told me that git apply was basically a replacement for patch. Why would you think it would not be a good idea to assume that people would not be familiar with how GNU patch works? The audience of Git these days are far more widely spread

Re: Dokumenting api-paths.txt

2013-08-20 Thread Jonathan Nieder
Stefan Beller wrote: On 08/20/2013 03:31 PM, Johannes Sixt wrote: Stefan Beller wrote: +packdir = mkpathdup(%s/pack, get_object_directory()); +packtmp = mkpathdup(%s/.tmp-%d-pack, packdir, getpid()); Should this not be packdir = xstrdup(git_path(pack)); packtmp =

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Erik Faye-Lund
On Tue, Aug 20, 2013 at 8:44 PM, Andreas Schwab sch...@linux-m68k.org wrote: Erik Faye-Lund kusmab...@gmail.com writes: diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c index d015e43..0641f4e 100644 --- a/compat/win32/syslog.c +++ b/compat/win32/syslog.c @@ -43,11 +43,14 @@ void

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Erik Faye-Lund
On Tue, Aug 20, 2013 at 10:34 PM, René Scharfe l@web.de wrote: Am 20.08.2013 20:44, schrieb Andreas Schwab: Erik Faye-Lund kusmab...@gmail.com writes: diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c index d015e43..0641f4e 100644 --- a/compat/win32/syslog.c +++

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Stefan Beller
So here is an update of git-repack Thanks for all the reviews and annotations! I think I got all the suggestions except the use of git_path/mkpathdup. I replaced mkpathdup by mkpath where possible, but it's still not perfect. I'll wait for the dokumentation patch of Jonathan, before changing all

Re: Should git apply --check imply verbose?

2013-08-20 Thread Steven Rostedt
On Tue, 20 Aug 2013 14:43:56 -0700 Junio C Hamano gits...@pobox.com wrote: But only folks in the kernel circle will be told by Linus the similarity between apply and patch, no? Well, there was a time when Linus was making his rounds showcasing git more than Linux, to people that were not

[PATCH] repack: rewrite the shell script in C.

2013-08-20 Thread Stefan Beller
This is the beginning of the rewrite of the repacking. All tests are constantly positive now. Signed-off-by: Stefan Beller stefanbel...@googlemail.com --- Makefile| 2 +- builtin.h | 1 + builtin/repack.c

[PATCH 0/2] git-config and large integers

2013-08-20 Thread Jeff King
I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers: $ git config foo.size 2g $ git config --int foo.size -2147483648 Oops. After this series, we properly notice the error: $ git config

[PATCH 1/2] config: properly range-check integer values

2013-08-20 Thread Jeff King
When we look at a config value as an integer using the git_config_int function, we carefully range-check the value we get and complain if it is out of our range. But the range we compare to is that of a long, which we then cast to an int in the function's return value. This means that on systems

Re: [PATCH 0/2] git-config and large integers

2013-08-20 Thread Stefan Beller
On 08/21/2013 12:39 AM, Jeff King wrote: I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers: $ git config foo.size 2g $ git config --int foo.size -2147483648 Oops. After this series,

[PATCH 2/2] teach git-config to output large integers

2013-08-20 Thread Jeff King
Internally we use unsigned long to represent large config values like packed window memory sizes, packfile size limits, etc. On 32-bit systems, this limits these config options to 4G (and we detect and complain about overflow). On 64-bit systems, they get the full 64-bit range. However, there is

Re: [RFC PATCHv4] repack: rewrite the shell script in C.

2013-08-20 Thread Jonathan Nieder
Stefan Beller wrote: I think I got all the suggestions except the use of git_path/mkpathdup. I replaced mkpathdup by mkpath where possible, but it's still not perfect. No, mkpathdup is generally better unless you know what you're doing. I'll wait for the dokumentation patch of Jonathan,

Re: [PATCH 0/2] git-config and large integers

2013-08-20 Thread Jeff King
On Wed, Aug 21, 2013 at 12:44:22AM +0200, Stefan Beller wrote: On 08/21/2013 12:39 AM, Jeff King wrote: I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers: $ git config foo.size 2g

Re: [PATCH 2/2] teach git-config to output large integers

2013-08-20 Thread Jonathan Nieder
Jeff King wrote: I kind of hate the name --ulong. I wanted to call it --size or something and abstract away the actual platform representation, and just make it big enough for file sizes. Yes, something like --size would be more pleasant. It could still use unsigned long internally. My only

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Andreas Schwab
Erik Faye-Lund kusmab...@gmail.com writes: I don't see how it's undefined. It's using the memory that 'pos' *points to* that is undefined, no? The difference between 'pos' and 'str' should still be the same, it's not like realloc somehow magically updates 'pos'... It does. Think of

Re: [PATCH 0/2] git-config and large integers

2013-08-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers: $ git config foo.size 2g $ git config --int foo.size -2147483648 Oops. After this series, we

Re: [PATCH 1/2] config: properly range-check integer values

2013-08-20 Thread Jonathan Nieder
Jeff King wrote: I added a test. It would not fail on existing 32-bit systems, but would on existing LP64 systems. It will pass with the new code on both. However, it will fail on ILP64 systems (because their int is large, and can represent 3GB). I'm not sure if any such systems are in wide

Re: [PATCH 0/2] git-config and large integers

2013-08-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jeff King p...@peff.net writes: I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers: $ git config foo.size 2g $ git config --int foo.size

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: Erik Faye-Lund kusmab...@gmail.com writes: I don't see how it's undefined. It's using the memory that 'pos' *points to* that is undefined, no? The difference between 'pos' and 'str' should still be the same, it's not like realloc somehow

Re: CPPCheck found 24 high risk bugs in Git v.1.8.3.4

2013-08-20 Thread Erik Faye-Lund
On Wed, Aug 21, 2013 at 1:01 AM, Andreas Schwab sch...@linux-m68k.org wrote: Erik Faye-Lund kusmab...@gmail.com writes: I don't see how it's undefined. It's using the memory that 'pos' *points to* that is undefined, no? The difference between 'pos' and 'str' should still be the same, it's not

Re: Proper URI for svn clone on a network share (Win32)

2013-08-20 Thread Tim Chase
On 2013-08-14 12:49, Tim Chase wrote: c:\temp git svn clone file:///x:/path/to/repo/trunk/utils/project1 but get various failures. My best-effort (above) gets me as far as actually starting some sort of clone but it dies with Permission denied: Can't open '/tmp/report.tmp': Permission

Re: [PATCH v3 15/24] read-cache: read index-v5

2013-08-20 Thread Duy Nguyen
On Wed, Aug 21, 2013 at 3:59 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static int read_entries(struct index_state *istate, struct directory_entry *de, + unsigned int first_entry_offset, void *mmap, + unsigned long mmap_size, unsigned int *nr,

Re: Should git apply --check imply verbose?

2013-08-20 Thread Paul Gortmaker
On 13-08-20 03:54 PM, Steven Rostedt wrote: On Tue, 20 Aug 2013 12:45:03 -0700 Junio C Hamano gits...@pobox.com wrote: Steven Rostedt rost...@goodmis.org writes: I do not think it is necessarily a good idea to assume that people who are learning git apply know how GNU patch works. Linus

Re: [PATCH v3 23/24] introduce GIT_INDEX_VERSION environment variable

2013-08-20 Thread Duy Nguyen
On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Respect a GIT_INDEX_VERSION environment variable, when a new index is initialized. Setting the environment variable will not cause existing index files to be converted to another format for additional safety.

Re: [GUILT] add FreeBSD support

2013-08-20 Thread Zheng Liu
On Tue, Aug 20, 2013 at 11:25:48AM -0400, Josef 'Jeff' Sipek wrote: On Tue, Aug 20, 2013 at 03:44:16PM +0800, Zheng Liu wrote: Hi Josef, On Fri, Aug 09, 2013 at 11:20:46AM -0400, Josef 'Jeff' Sipek wrote: On Fri, Aug 09, 2013 at 11:04:45PM +0800, gnehzuil.liu wrote: ??

Re: [PATCH 0/2] git-config and large integers

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 04:06:19PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers: $ git config foo.size 2g $ git

Re: [PATCH 0/2] git-config and large integers

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 04:41:30PM -0700, Junio C Hamano wrote: If this applied on the writing side, I would understand it very much, i.e. $ git config --int32 foo.size 2g fatal: 2g is too large to be read as int32. It does, by the way. When you request a type on the writing

Re: [PATCH 1/2] config: properly range-check integer values

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 04:07:49PM -0700, Jonathan Nieder wrote: I added a test. It would not fail on existing 32-bit systems, but would on existing LP64 systems. It will pass with the new code on both. However, it will fail on ILP64 systems (because their int is large, and can represent

Re: [PATCH 2/2] teach git-config to output large integers

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 03:57:45PM -0700, Jonathan Nieder wrote: Jeff King wrote: I kind of hate the name --ulong. I wanted to call it --size or something and abstract away the actual platform representation, and just make it big enough for file sizes. Yes, something like --size would

Re: [PATCH v3 02/24] read-cache: use fixed width integer types

2013-08-20 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: Use the fixed width integer types uint16_t and uint32_t for ondisk structures, because unsigned short and unsigned int do not hae a guaranteed size. This sounds like an independent fix to me. I'd queue

Re: [PATCH v3 04/24] read-cache: clear version in discard_index()

2013-08-20 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: All fields except index_state-version are reset in discard_index. Reset the version too. What is the practical consequence of not clearing this field? I somehow have a feeling that this was done

[PATCH] Add gui.displayuntracked option

2013-08-20 Thread Max Kirillov
When git is used to track only a subset of a directory, or there is no sure way to divide files to ignore from files to track, git user have to live with large number of untracked files. These files present in file list, and should always be scrolled through to handle real changes. Situation can

[PATCH] git-gui: right half window is paned

2013-08-20 Thread Max Kirillov
For long descriptions it would be nice to be able to resize the comment text field. Signed-off-by: Max Kirillov m...@max630.net --- git-gui/git-gui.sh | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index

Re: [PATCH v3 23/24] introduce GIT_INDEX_VERSION environment variable

2013-08-20 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Respect a GIT_INDEX_VERSION environment variable, when a new index is initialized. Setting the environment variable will not cause existing index files to be converted to another

Re: [PATCH 2/2] teach git-config to output large integers

2013-08-20 Thread Jonathan Nieder
Jeff King wrote: I almost sent it as --size with unsigned long internally. But try writing the documentation for it. You want to say something like it's big enough to handle file sizes. Except that on 32-bit, it's _not_. It's only 4G. You really want something that uses off_t internally, so

Re: [PATCH 2/2] teach git-config to output large integers

2013-08-20 Thread Jeff King
On Tue, Aug 20, 2013 at 09:38:41PM -0700, Jonathan Nieder wrote: Jeff King wrote: I almost sent it as --size with unsigned long internally. But try writing the documentation for it. You want to say something like it's big enough to handle file sizes. Except that on 32-bit, it's _not_.