Re: [PATCH 3/4] cat-file: add --batch-disk-sizes option

2013-07-10 Thread Jeff King
On Sun, Jul 07, 2013 at 10:49:46AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Perhaps we need git cat-file --batch-format=%(disk-size) %(object) or similar. I agree with your reasoning. It may be simpler to give an interface to ask for which pieces of info,

Re: [PATCH 3/4] cat-file: add --batch-disk-sizes option

2013-07-10 Thread Jeff King
On Mon, Jul 08, 2013 at 07:07:01PM +0530, Ramkumar Ramachandra wrote: There's also syntax sharing. I don't think each command should have its own syntax. f-e-r already has %(objectsize). If we plan to have a common syntax, perhaps %(disk-size) should be %(objectsize:disk) or something.

[PATCHv2 00/10] cat-file formats/on-disk sizes

2013-07-10 Thread Jeff King
Here's a re-roll of the cat-file --batch-disk-sizes series. The main change is that it replaces the --batch-disk-sizes option with a format string for --batch-check, syntactically modeled after the for-each-ref format string. [01/10]: zero-initialize object_info structs [02/10]: teach

[PATCH 01/10] zero-initialize object_info structs

2013-07-10 Thread Jeff King
The sha1_object_info_extended function expects the caller to provide a struct object_info which contains pointers to query items that will be filled in. The purpose of providing pointers rather than storing the response directly in the struct is so that callers can choose not to incur the expense

[PATCH 02/10] teach sha1_object_info_extended a disk_size query

2013-07-10 Thread Jeff King
Using sha1_object_info_extended, a caller can find out the type of an object, its size, and information about where it is stored. In addition to the object's true size, it can also be useful to know the size that the object takes on disk (e.g., to generate statistics about which refs consume

[PATCH 03/10] t1006: modernize output comparisons

2013-07-10 Thread Jeff King
In modern tests, we typically put output into a file and compare it with test_cmp. This is nicer than just comparing via test, and much shorter than comparing via test and printing a custom message. Signed-off-by: Jeff King p...@peff.net --- I didn't do the whole file, just the ones of a

[PATCH 05/10] cat-file: refactor --batch option parsing

2013-07-10 Thread Jeff King
We currently use an int to tell us whether --batch parsing is on, and if so, whether we should print the full object contents. Let's instead factor this into a struct, filled in by callback, which will make further batch-related options easy to add. Signed-off-by: Jeff King p...@peff.net ---

[PATCH 04/10] cat-file: teach --batch to stream blob objects

2013-07-10 Thread Jeff King
The regular git cat-file -p and git cat-file blob code paths already learned to stream large blobs. Let's do the same here. Note that this means we look up the type and size before making a decision of whether to load the object into memory or stream (just like the -p code path does). That can

[PATCH 06/10] cat-file: add --batch-check=format

2013-07-10 Thread Jeff King
The `cat-file --batch-check` command can be used to quickly get information about a large number of objects. However, it provides a fixed set of information. This patch adds an optional format option to --batch-check to allow a caller to specify which items they are interested in, and in which

[PATCH 07/10] cat-file: add %(objectsize:disk) format atom

2013-07-10 Thread Jeff King
This atom is just like %(objectsize), except that it shows the on-disk size of the object rather than the object's true size. In other words, it makes the disk_size query of sha1_object_info_extended available via the command-line. This can be used for rough attribution of disk usage to

[PATCH 08/10] cat-file: split --batch input lines on whitespace

2013-07-10 Thread Jeff King
If we get an input line to --batch or --batch-check that looks like HEAD foo bar, we will currently feed the whole thing to get_sha1(). This means that to use --batch-check with `rev-list --objects`, one must pre-process the input, like: git rev-list --objects HEAD | cut -d' ' -f1 | git

[PATCH 09/10] pack-revindex: use unsigned to store number of objects

2013-07-10 Thread Jeff King
A packfile may have up to 2^32-1 objects in it, so the right data type to use is uint32_t. We currently use a signed int, which means that we may behave incorrectly for packfiles with more than 2^31-1 objects on 32-bit systems. Nobody has noticed because having 2^31 objects is pretty insane. The

[PATCH 10/10] pack-revindex: radix-sort the revindex

2013-07-10 Thread Jeff King
The pack revindex stores the offsets of the objects in the pack in sorted order, allowing us to easily find the on-disk size of each object. To compute it, we populate an array with the offsets from the sha1-sorted idx file, and then use qsort to order it by offsets. That does O(n log n) offset

Re: [PATCH 06/10] cat-file: add --batch-check=format

2013-07-10 Thread Eric Sunshine
On Wed, Jul 10, 2013 at 7:45 AM, Jeff King p...@peff.net wrote: The `cat-file --batch-check` command can be used to quickly get information about a large number of objects. However, it provides a fixed set of information. This patch adds an optional format option to --batch-check to allow a

Re: [PATCH 10/10] pack-revindex: radix-sort the revindex

2013-07-10 Thread Jeff King
On Wed, Jul 10, 2013 at 07:55:57AM -0400, Jeff King wrote: 5. We use memcpy instead of an open-coded loop to copy the whole array at the end. The individual bucket-assignment is still done by struct assignment. I haven't timed if memcpy would make a difference there. I just

Re: [PATCH 10/10] pack-revindex: radix-sort the revindex

2013-07-10 Thread Ramkumar Ramachandra
Jeff King wrote: That does O(n log n) offset comparisons, and profiling shows that we spend most of our time in cmp_offset. However, since we are sorting on a simple off_t, we can use numeric sorts that perform better. A radix sort can run in O(k*n), where k is the number of digits in our

Re: [PATCH 06/10] cat-file: add --batch-check=format

2013-07-10 Thread Ramkumar Ramachandra
Jeff King wrote: +If `--batch` or `--batch-check` is given, `cat-file` will read objects +from stdin, one per line, and print information about them. + +You can specify the information shown for each object by using a custom +`format`. The `format` is copied literally to stdout for each

Re: Error

2013-07-10 Thread Konstantin Khomoutov
On Tue, 9 Jul 2013 20:30:37 -0500 Chanakya Vattikuti gk2cverag...@gmail.com wrote: I get this error message when trying to create a shared ssh key in Mac osx Lion This problem has nothing to do with Git as it purely is about transferring a public part of your SSH key to another host. So try

Re: [PATCH 08/10] cat-file: split --batch input lines on whitespace

2013-07-10 Thread Ramkumar Ramachandra
Jeff King wrote: git rev-list --objects HEAD | git cat-file --batch-check='%(objectsize) %(text)' If anything, I would have expected %(rest), not %(text). This atom is specific to commands that accept input via stdin (i.e. not log, f-e-r, branch, or anything else I can think of). Also,

t0008 hang on streaming test (OS X)

2013-07-10 Thread Brian Gernhardt
The newest test in t0008 streaming support for --stdin, seems to hang sporadically on my MacBook Pro (running 10.8.4). The hang seems to be related to running it in parallel with other tests, as I can only reliably cause it by running with prove and -j 3. However, once that has hung I am

Re: [PATCH 10/10] pack-revindex: radix-sort the revindex

2013-07-10 Thread Brandon Casey
On Wed, Jul 10, 2013 at 4:55 AM, Jeff King p...@peff.net wrote: The pack revindex stores the offsets of the objects in the pack in sorted order, allowing us to easily find the on-disk size of each object. To compute it, we populate an array with the offsets from the sha1-sorted idx file, and

[PATCHv2 0/3] Switch German translation to G+E

2013-07-10 Thread Ralf Thielow
V2 corrects a message in the second and the third part. Ralf Thielow (3): l10n: de.po: switch from pure German to German+English (part 1) l10n: de.po: switch from pure German to German+English (part 2) l10n: de.po: switch from pure German to German+English (part 3) po/de.po | 1796

[RFC/PATCH 2/4] t4203: test check-mailmap command invocation

2013-07-10 Thread Eric Sunshine
Test the command-line interface of check-mailmap. (Actual .mailmap functionality is already covered by existing tests.) Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- t/t4203-mailmap.sh | 50 ++ 1 file changed, 50 insertions(+) diff

[RFC/PATCH 1/4] builtin: add git-check-mailmap command

2013-07-10 Thread Eric Sunshine
Introduce command check-mailmap, similar to check-attr and check-ignore, which allows direct testing of .mailmap configuration. As plumbing accessible to scripts and other porcelain, check-mailmap publishes the stable, well-tested .mailmap functionality employed by built-in Git commands.

[RFC/PATCH 3/4] t4203: test mailmap functionality directly rather than indirectly

2013-07-10 Thread Eric Sunshine
With the introduction of check-mailmap, it is now possible to check .mailmap functionality directly rather than indirectly as a side-effect of other commands (such as git-shortlog), therefore, do so. Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- t/t4203-mailmap.sh | 133

[RFC/PATCH 0/4] add git-check-mailmap command

2013-07-10 Thread Eric Sunshine
This patch series adds builtin command check-mailmap, similar to check-attr and check-ignore, which allows direct testing of .mailmap configuration. More importantly, as plumbing accessible to scripts and other porcelain, check-mailmap publishes the stable, well-tested .mailmap functionality

[RFC/PATCH 4/4] t4203: consolidate test-repository setup

2013-07-10 Thread Eric Sunshine
The simple two-commit test-repository created by 'setup' is no longer needed by any of the tests retrofitted to use check-mailmap. Subsequent, more complex tests of git-shortlog, git-log, and git-blame functionality expand the repository by adding five commits. Consolidate the creation of this

[RFC/PATCH v2 0/1] cygwin: fast stat functions

2013-07-10 Thread Ramsay Jones
If you are wondering, v1 of this patch was appended to an email that is part of the cygwin: Remove the Win32 l/stat() functions thread. Changes from v1: - add comment in git-compat-util.h to explain the use of the fast stat variants. - remove the fast_stat() function, along with

[RFC/PATCH v2 1/1] cygwin: Add fast_lstat() and fast_fstat() functions

2013-07-10 Thread Ramsay Jones
Commit adbc0b6b (cygwin: Use native Win32 API for stat, 30-09-2008) added a Win32 specific implementation of the stat functions. In order to handle absolute paths, cygwin mount points and symbolic links, this implementation may fall back on the standard cygwin l/stat() functions. Also, the choice

Re: t0008 hang on streaming test (OS X)

2013-07-10 Thread Antoine Pelisse
On Wed, Jul 10, 2013 at 6:36 PM, Brian Gernhardt br...@gernhardtsoftware.com wrote: I am somewhat stuck on how to fix it. Any ideas? I don't have anything to reproduce here, but usually I start investigating this kind of problems by attaching the hung process with gdb to see the current state

limit memory usage on large repositories

2013-07-10 Thread Matt Schoen
Hi there, I've been using git for some time now, and host my remote bare repositories on my shared hosting account at Dreamhost.com. As a protective feature on their shared host setup, they enact a policy that kills processes that consume too much memory. This happens to git sometimes. By

Re: [RFC/PATCH 1/4] builtin: add git-check-mailmap command

2013-07-10 Thread Duy Nguyen
On Thu, Jul 11, 2013 at 2:03 AM, Eric Sunshine sunsh...@sunshineco.com wrote: +static const struct option check_mailmap_options[] = { + OPT_BOOLEAN(0, stdin, use_stdin, + N_(also read contacts from stdin)), + OPT_BOOLEAN('z', NULL, null_out, +

Re: [RFC/PATCH 1/4] builtin: add git-check-mailmap command

2013-07-10 Thread Eric Sunshine
On Wed, Jul 10, 2013 at 10:31 PM, Duy Nguyen pclo...@gmail.com wrote: On Thu, Jul 11, 2013 at 2:03 AM, Eric Sunshine sunsh...@sunshineco.com wrote: +static const struct option check_mailmap_options[] = { + OPT_BOOLEAN(0, stdin, use_stdin, + N_(also read contacts from

Re: [PATCH 3/3] wt-status: use format function attribute for status_printf

2013-07-10 Thread Jeff King
On Tue, Jul 09, 2013 at 10:52:55PM -0700, Junio C Hamano wrote: The patch to do it is below, but I actually think an explicit blank-line function like: status_print_empty_line(s, color); would be more obvious to a reader. I noticed that all but one can be dealt with with

Re: [PATCH 3/3] wt-status: use format function attribute for status_printf

2013-07-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: If you want to keep refactoring this, I don't mind, but I kind of feel like we are going down a rabbit hole for very little gain. Right, and right. The rewrite to move _ln to \n was wrong, and this is too much hassle for too little gain. If we were to do

Re: What's cooking in git.git (Jul 2013, #03; Tue, 9)

2013-07-10 Thread Kyle McKay
On Jul 9, 2013, at 16:09, Junio C Hamano wrote: * km/svn-1.8-serf-only (2013-07-07) 2 commits - git-svn: allow git-svn fetching to work using serf - Git.pm: add new temp_is_locked function Comments? Since neither David nor Jonathan have piped in here (they were the two primarily involved

Re: What's cooking in git.git (Jul 2013, #03; Tue, 9)

2013-07-10 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: * bp/mediawiki-preview (2013-07-08) 7 commits - git-remote-mediawiki: add preview subcommand into git mw - git-remote-mediawiki: add git-mw command - git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki -

Re: [PATCH/RFC] blame: accept multiple -L ranges

2013-07-10 Thread Thomas Rast
Junio C Hamano gits...@pobox.com writes: Thomas Rast tr...@inf.ethz.ch writes: If you define it that way, the output of git blame -L 4,6; git blame -L /A/,+20 is significantly different from git blame -L 4,6 -L /A/,+20 Not just in the presentation or any possible coalescing, but in

Re: Git in nutshell Inbox

2013-07-10 Thread Muhammad Bashir Al-Noimi
On Tue, Jul 9, 2013 at 10:47 PM, Muhammad Bashir Al-Noimi mbno...@gmail.com wrote: Now I've to make some tests because the new version is completely different than the old one so I'll send a feedback soon. Thanks guys, the recent git-cola fabulous so I don't need to use the terminal anymore

Re: Git in nutshell Inbox

2013-07-10 Thread Fredrik Gustafsson
On Wed, Jul 10, 2013 at 12:10:55PM +0200, Muhammad Bashir Al-Noimi wrote: On Tue, Jul 9, 2013 at 10:47 PM, Muhammad Bashir Al-Noimi mbno...@gmail.com wrote: Now I've to make some tests because the new version is completely different than the old one so I'll send a feedback soon. Thanks

Re: [PATCH 4/4] pack-revindex: radix-sort the revindex

2013-07-10 Thread Jeff King
On Mon, Jul 08, 2013 at 02:35:10PM -0700, Brandon Casey wrote: If 'n' is the number of objects in the pack, shouldn't it be unsigned? The data type for struct packed_git.num_objects is uint32_t. Looks like create_pack_revindex uses the wrong datatype when it captures num_objects in the

Re: [PATCH 3/4] cat-file: add --batch-disk-sizes option

2013-07-10 Thread Jeff King
On Sun, Jul 07, 2013 at 09:15:41PM +, brian m. carlson wrote: On Sun, Jul 07, 2013 at 06:09:49AM -0400, Jeff King wrote: +NOTE: The on-disk size reported is accurate, but care should be taken in +drawing conclusions about which refs or objects are responsible for disk +usage. The size

Re: [PATCH 4/4] pack-revindex: radix-sort the revindex

2013-07-10 Thread Jeff King
On Mon, Jul 08, 2013 at 01:50:41PM -0700, Brandon Casey wrote: +static void sort_revindex(struct revindex_entry *entries, int n, off_t max) If 'n' is the number of objects in the pack, shouldn't it be unsigned? Yes. I inherited that bug from the rest of the revindex code. The data type

segmentation fault after successful completion of certain git svn commands

2013-07-10 Thread Friedrich Delgado
Hi! I suspect I may have found a problem in the way git-svn uses SVN::Core that leads to a segmentation fault. That's a hypothesis based on the following incomplete findings: git version 1.8.3.2.50.g531c8dd (from recent git maint) svn, version 1.7.10 (r1485443) (from openSUSE 12.2)