[PATCH 06/22] make sure partially read index is not changed

2013-07-07 Thread Thomas Gummerer
A partially read index file currently cannot be written to disk. Make sure that never happens, by re-reading the index file if the index file wasn't read completely before changing the in-memory index. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4

[PATCH 04/22] read-cache: Re-read index if index file changed

2013-07-07 Thread Thomas Gummerer
Add the possibility of re-reading the index file, if it changed while reading. The index file might change during the read, causing outdated information to be displayed. We check if the index file changed by using its stat data as heuristic. Helped-by: Ramsay Jones ram...@ramsay1.demon.co.uk

[PATCH 01/22] t2104: Don't fail for index versions other than [23]

2013-07-07 Thread Thomas Gummerer
t2104 currently checks for the exact index version 2 or 3, depending if there is a skip-worktree flag or not. Other index versions do not use extended flags and thus cannot be tested for version changes. Make this test update the index to version 2 at the beginning of the test. Testing the

[PATCH 00/22] Index v5

2013-07-07 Thread Thomas Gummerer
Hi, This is a follow up for last years Google Summer of Code (late I know :-) ), which wasn't merged back then. The previous rounds of the series are at $gmane/202752, $gmane/202923, $gmane/203088 and $gmane/203517. Since then I added a index reading api, which allows certain parts of Git to

[PATCH 02/22] read-cache: split index file version specific functionality

2013-07-07 Thread Thomas Gummerer
Split index file version specific functionality to their own functions, to prepare for moving the index file version specific parts to their own file. This makes it easier to add a new index file format later. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 5 +-

[PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Thomas Gummerer
Add an api for access to the index file. Currently there is only a very basic api for accessing the index file, which only allows a full read of the index, and lets the users of the data filter it. The new index api gives the users the possibility to use only part of the index and provides

[PATCH 07/22] dir.c: use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- dir.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/dir.c b/dir.c index 897c874..f4919ba 100644 --- a/dir.c +++ b/dir.c @@ -468,19 +468,19 @@ void add_exclude(const char *string,

[PATCH 08/22] tree.c: use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- tree.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/tree.c b/tree.c index 62fed63..5cd43f4 100644 --- a/tree.c +++ b/tree.c @@ -128,20 +128,28 @@ int read_tree_recursive(struct

[PATCH 10/22] grep.c: Use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/grep.c | 71 ++ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index a419cda..2a1c8f4 100644 --- a/builtin/grep.c +++

[PATCH 12/22] read-cache: make read_blob_data_from_index use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/read-cache.c b/read-cache.c index 4529fab..c81e643 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1588,29 +1588,27 @@ int

[PATCH 11/22] ls-files.c: use the index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/ls-files.c | 213 + 1 file changed, 100 insertions(+), 113 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 08d9786..82857d4 100644 --- a/builtin/ls-files.c

[PATCH 09/22] name-hash.c: use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- name-hash.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/name-hash.c b/name-hash.c index 617c86c..6551849 100644 --- a/name-hash.c +++ b/name-hash.c @@ -144,16 +144,19 @@ static void hash_index_entry(struct

[PATCH 16/22] read-cache: read resolve-undo data

2013-07-07 Thread Thomas Gummerer
Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk format of the index file version 5, conflicts and resolved data is read at the same time, and the resolve-undo data is then converted to the in-memory format. Helped-by:

[PATCH 20/22] read-cache: write resolve-undo data for index-v5

2013-07-07 Thread Thomas Gummerer
Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk format of the index file version 5, conflicts and resolved data is read at the same time, and the resolve-undo data is then converted to the in-memory format. Helped-by:

[PATCH 15/22] read-cache: read index-v5

2013-07-07 Thread Thomas Gummerer
Make git read the index file version 5 without complaining. This version of the reader doesn't read neither the cache-tree nor the resolve undo data, but doesn't choke on an index that includes such data. Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Nguyen Thai Ngoc Duy

[PATCH 17/22] read-cache: read cache-tree in index-v5

2013-07-07 Thread Thomas Gummerer
Since the cache-tree data is saved as part of the directory data, we already read it at the beginning of the index. The cache-tree is only converted from this directory data. The cache-tree data is arranged in a tree, with the children sorted by pathlen at each node, while the ondisk format is

[PATCH 21/22] update-index.c: rewrite index when index-version is given

2013-07-07 Thread Thomas Gummerer
Make update-index always rewrite the index when a index-version is given, even if the index already has the right version. This option is used for performance testing the writer and reader. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4 ++-- 1 file changed, 2

[PATCH 03/22] read-cache: move index v2 specific functions to their own file

2013-07-07 Thread Thomas Gummerer
Move index version 2 specific functions to their own file. The non-index specific functions will be in read-cache.c, while the index version 2 specific functions will be in read-cache-v2.c. Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com ---

[PATCH 19/22] read-cache: write index-v5 cache-tree data

2013-07-07 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com ---

[PATCH 18/22] read-cache: write index-v5

2013-07-07 Thread Thomas Gummerer
Write the index version 5 file format to disk. This version doesn't write the cache-tree data and resolve-undo data to the file. The main work is done when filtering out the directories from the current in-memory format, where in the same turn also the conflicts and the file data is calculated.

[PATCH 13/22] documentation: add documentation of the index-v5 file format

2013-07-07 Thread Thomas Gummerer
Add a documentation of the index file format version 5 to Documentation/technical. Helped-by: Michael Haggerty mhag...@alum.mit.edu Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Thomas Rast tr...@student.ethz.ch Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Helped-by: Robin Rosenberg

[PATCH 14/22] read-cache: make in-memory format aware of stat_crc

2013-07-07 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 1 + read-cache.c | 25 + 2 files changed, 26 insertions(+) diff --git a/cache.h

[PATCH 22/22] p0003-index.sh: add perf test for the index formats

2013-07-07 Thread Thomas Gummerer
From: Thomas Rast tr...@inf.ethz.ch Add a performance test for index version [23]/4/5 by using git update-index --index-version=x, thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast tr...@inf.ethz.ch Signed-off-by: Thomas Gummerer

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

2013-07-07 Thread Eric Sunshine
git-blame accepts only zero or one -L option. Clients requiring blame information for multiple disjoint ranges are therefore forced either to invoke git-blame multiple times, once for each range, or only once with no -L option to cover the entire file, which can be costly. Teach git-blame to

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-07 Thread John Keeping
On Sat, Jul 06, 2013 at 09:12:31PM -0700, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: @@ -1096,19 +1101,18 @@ sub smtp_auth_maybe { # Helper to come up with SSL/TLS certification validation params # and warn when doing no verification sub ssl_verify_params { -

Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs

2013-07-07 Thread Torsten Bögershausen
On 2013-07-07 02.55, Jonathan Nieder wrote: Mark Levedahl wrote: Do not use FIFOs on cygwin, they do not work. Cygwin includes coreutils, so has mkfifo, and that command does something. However, the resultant named pipe is known (on the Cygwin mailing list at least) to not work correctly.

Re: [PATCH 09/16] documentation: add documentation for the bitmap format

2013-07-07 Thread Jeff King
On Mon, Jul 01, 2013 at 11:47:32AM -0700, Colby Ranger wrote: But I think we are comparing apples to steaks here, Vincent is (rightfully) concerned about process startup performance, whereas our timings were assuming the process was already running. I did some timing on loading the

Re: [PATCH] git-config: update doc for --get with multiple values

2013-07-07 Thread John Keeping
On Wed, Jul 03, 2013 at 11:47:50AM -0700, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: Since commit 00b347d (git-config: do not complain about duplicate entries, 2012-10-23), git config --get does not exit with an error if there are multiple values for the specified key

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

2013-07-07 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: git-blame accepts only zero or one -L option. Clients requiring blame information for multiple disjoint ranges are therefore forced either to invoke git-blame multiple times, once for each range, or only once with no -L option to cover the entire

[RFC/PATCH 0/4] cat-file --batch-disk-sizes

2013-07-07 Thread Jeff King
When I work with alternates repositories that have the objects for many individual forks inter-mixed, one of the questions I want to ask git is how much space particular forks are taking up in the object database. This is easy enough to script with `rev-list --objects $fork1 --not $fork2`, as long

Re: [PATCH v2 2/2] send-email: introduce sendemail.smtpsslcertpath

2013-07-07 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, Jul 05, 2013 at 08:29:48PM +, brian m. carlson wrote: On Fri, Jul 05, 2013 at 10:20:11AM -0700, Junio C Hamano wrote: +# Helper to come up with SSL/TLS certification validation params +# and warn when doing no verification +sub

[PATCH 1/4] zero-initialize object_info structs

2013-07-07 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 2/4] teach sha1_object_info_extended a disk_size query

2013-07-07 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 3/4] cat-file: add --batch-disk-sizes option

2013-07-07 Thread Jeff King
This option is just like --batch-check, but shows the on-disk size rather than the true object 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 particular refs, though see the

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

2013-07-07 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] lockfile: fix buffer overflow in path handling

2013-07-07 Thread Michael Haggerty
On 07/07/2013 06:12 AM, Jeff King wrote: On Sat, Jul 06, 2013 at 09:48:52PM +0200, Michael Haggerty wrote: When and if resolve_symlink() is called, then that function is correctly told to treat the buffer as (PATH_MAX - 5) characters long. This part is correct. However: * If LOCK_NODEREF

[PATCH 3/3] name-rev doc: rewrite --stdin paragraph

2013-07-07 Thread Ramkumar Ramachandra
Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-name-rev.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt index 7cde4b3..94bded8 100644 --- a/Documentation/git-name-rev.txt

[PATCH 1/3] name-rev: fix assumption about --name-only usage

2013-07-07 Thread Ramkumar Ramachandra
236157 (Teach git-describe how to run name-rev, 2007-05-21) introduced `git name-rev --name-only`, with the intent of using it to implement `git describe --contains`. According to the message, users wanted to use describe to figure out which tags contains a specific commit. name-rev already did

[PATCH 0/3] Iron output of describe --contains --all

2013-07-07 Thread Ramkumar Ramachandra
Hi, I actually sent these patches to the list last month, but nobody seemed to be interested. This is an unedited resend. I looked into adding tests, but decided that it was a lost cause: the output is too loosely defined for any scripts to rely on it strongly. [1/3] already shows a race

[PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-07 Thread Ramkumar Ramachandra
236157 (Teach git-describe how to run name-rev, 2007-05-21) introduced `git name-rev --name-only`, with the intent of using it to implement `git describe --contains`. According to the message, one of the primary objectives of --name-only was to make the output of name-rev match that of describe.

Re: git subtree push-all and pull-all

2013-07-07 Thread Fredrik Gustafsson
On Wed, Jul 03, 2013 at 03:56:36PM -0400, Gareth Collins wrote: Hello, I see over the last year (on the web and in this mailing list) there was some activity to extend subtree with a .gittrees file and push-all/pull-all commands. Perhaps I missed it, but looking through the latest git

[PATCH] prompt: do not double-discriminate detached HEAD

2013-07-07 Thread Ramkumar Ramachandra
When GIT_PS1_SHOWCOLORHINTS is turned on, there is no need to put a detached HEAD within parenthesis: the color can be used to discriminate the detached HEAD. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- For cuteness :) contrib/completion/git-prompt.sh | 5 -

[PATCH] range_set: fix coalescing bug when range is a subset of another

2013-07-07 Thread Eric Sunshine
When coalescing ranges, sort_and_merge_range_set() unconditionally assumes that the end of a range being folded into a preceding range should become the end of the coalesced range. This assumption, however, is invalid when one range is a subset of another. For example, given ranges 1-5 and 2-3

Re: [PATCH] prompt: do not double-discriminate detached HEAD

2013-07-07 Thread John Szakmeister
On Sun, Jul 7, 2013 at 8:52 AM, Ramkumar Ramachandra artag...@gmail.com wrote: When GIT_PS1_SHOWCOLORHINTS is turned on, there is no need to put a detached HEAD within parenthesis: the color can be used to discriminate the detached HEAD. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com

Re: [PATCH 2/2] git-svn: allow git-svn fetching to work using serf

2013-07-07 Thread Daniel Shahaf
Kyle McKay wrote on Sat, Jul 06, 2013 at 19:46:40 -0700: On Jul 6, 2013, at 19:23, Jonathan Nieder wrote: Kyle McKay wrote: Unless bulk updates are disabled when using the serf access method (the only one available with svn 1.8) for https?: urls, apply_textdelta does indeed get called

Re: [PATCH 2/2] git-svn: allow git-svn fetching to work using serf

2013-07-07 Thread David Rothenberger
On 7/7/2013 6:39 AM, Daniel Shahaf wrote: Kyle McKay wrote on Sat, Jul 06, 2013 at 19:46:40 -0700: On Jul 6, 2013, at 19:23, Jonathan Nieder wrote: Kyle McKay wrote: Unless bulk updates are disabled when using the serf access method (the only one available with svn 1.8) for https?: urls,

Re: [PATCH] diffcore-pickaxe: simplify has_changes and contains

2013-07-07 Thread Junio C Hamano
Jeff King p...@peff.net writes: Before, if (!one !two) we would call contains(two, ...), and now we will simply assume it is zero. Which I think is an improvement, as we would have segfaulted before. I don't think it is a bug in the current code (we would not ever feed the function two

Re: [PATCH 09/16] documentation: add documentation for the bitmap format

2013-07-07 Thread Shawn Pearce
On Sun, Jul 7, 2013 at 2:46 AM, Jeff King p...@peff.net wrote: On Mon, Jul 01, 2013 at 11:47:32AM -0700, Colby Ranger wrote: But I think we are comparing apples to steaks here, Vincent is (rightfully) concerned about process startup performance, whereas our timings were assuming the

Re: [PATCH] lockfile: fix buffer overflow in path handling

2013-07-07 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: But either way, the fix looks good to me. Yes, the constant is an improvement and Peff's version is also fine with me. OK, will squash in. Thanks both. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH 1/4] zero-initialize object_info structs

2013-07-07 Thread Junio C Hamano
Jeff King p...@peff.net writes: Obviously I plan to add a new query type in the next patch, but this initialization is probably a reasonable thing to be doing anyway. Yes. Thanks. sha1_file.c | 2 +- streaming.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

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

2013-07-07 Thread Junio C Hamano
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, e.g. --batch-cols=size,disksize, without giving the readers a flexible

Re: [PATCH 0/2] allow git-svn fetching to work using serf

2013-07-07 Thread Jonathan Nieder
(cc-ing users@ as requested by danielsh) David Rothenberger wrote: On 7/6/2013 5:28 PM, Jonathan Nieder wrote: Is there a simple explanation of why violating the depth-first constraint would lead to multiple blob (i.e., file, not directory) deltas being opened in a row without an intervening

Re: [PATCH] prompt: do not double-discriminate detached HEAD

2013-07-07 Thread Junio C Hamano
John Szakmeister j...@szakmeister.net writes: On Sun, Jul 7, 2013 at 8:52 AM, Ramkumar Ramachandra artag...@gmail.com wrote: When GIT_PS1_SHOWCOLORHINTS is turned on, there is no need to put a detached HEAD within parenthesis: the color can be used to discriminate the detached HEAD.

[PATCH 1/3] merge-recursive: remove dead conditional in update_stages()

2013-07-07 Thread Thomas Rast
650467c (merge-recursive: Consolidate different update_stages functions, 2011-08-11) changed the former argument 'clear' to always be true. Remove the useless conditional. Signed-off-by: Thomas Rast tr...@inf.ethz.ch --- merge-recursive.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 0/3] merge -Xindex-only

2013-07-07 Thread Thomas Rast
[Michael, sorry for the double mail -- I typoed the list address on the first round.] I recently looked into making merge-recursive more useful as a modular piece in various tasks, e.g. Michael's git-imerge and the experiments I made in showing evil merges. This miniseries is the extremely

[PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged

2013-07-07 Thread Thomas Rast
Using the new no_worktree flag from the previous commit, we can teach merge-recursive to leave the worktree untouched. Expose this with a new strategy option so that scripts can use it. --- Documentation/merge-strategies.txt | 4 merge-recursive.c | 2 ++

[PATCH 2/3] merge-recursive: untangle double meaning of o-call_depth

2013-07-07 Thread Thomas Rast
o-call_depth has a double function: a nonzero call_depth means we want to construct virtual merge bases, but it also means we want to avoid touching the worktree. Introduce a new flag o-no_worktree for the latter. Signed-off-by: Thomas Rast tr...@inf.ethz.ch --- merge-recursive.c | 38

Re: [PATCH 3/3] name-rev doc: rewrite --stdin paragraph

2013-07-07 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-name-rev.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt index

Re: [PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-07 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: 236157 (Teach git-describe how to run name-rev, 2007-05-21) introduced `git name-rev --name-only`, with the intent of using it to implement `git describe --contains`. According to the message, one of the primary objectives of --name-only was to

Re: [PATCH 1/3] name-rev: fix assumption about --name-only usage

2013-07-07 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: 236157 (Teach git-describe how to run name-rev, 2007-05-21) introduced `git name-rev --name-only`, with the intent of using it to implement `git describe --contains`. According to the message, users wanted to use describe to figure out which

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

2013-07-07 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 2/2] git-svn: allow git-svn fetching to work using serf

2013-07-07 Thread Kyle McKay
I forwarded the SVNAllowBulkUpdates Off question to the us...@subversion.apache.org list and here's the reply: On Jul 7, 2013, at 11:11, Lieven Govaerts wrote: On Sun, Jul 7, 2013 at 4:48 PM, Kyle McKay mack...@gmail.com wrote: On Jul 7, 2013, at 06:39, Daniel Shahaf wrote: Kyle McKay

Re: [PATCH] prompt: do not double-discriminate detached HEAD

2013-07-07 Thread Kyle McKay
On Jul 7, 2013, at 10:53, Junio C Hamano wrote: John Szakmeister j...@szakmeister.net writes: On Sun, Jul 7, 2013 at 8:52 AM, Ramkumar Ramachandra artag...@gmail.com wrote: When GIT_PS1_SHOWCOLORHINTS is turned on, there is no need to put a detached HEAD within parenthesis: the color can be

Re: [PATCH 2/3] merge-recursive: untangle double meaning of o-call_depth

2013-07-07 Thread Junio C Hamano
Thomas Rast tr...@inf.ethz.ch writes: o-call_depth has a double function: a nonzero call_depth means we want to construct virtual merge bases, but it also means we want to avoid touching the worktree. Introduce a new flag o-no_worktree for the latter. I do remember discussing this with you

[PATCH 0/2] Avoid suggestions to merge remote changes

2013-07-07 Thread John Keeping
As another aspect of the change to make git-pull die when remote changes do not fast-forward, this series changes the advice messages in git-push to avoid implying that the user wants to merge remote changes. I've chosen the word integrate because it does not carry any special meaning in Git (in

[PATCH 1/2] push: avoid suggesting merging remote changes

2013-07-07 Thread John Keeping
With some workflows, it is more suitable to rebase on top of remote changes when a push does not fast-forward. Change the advice messages in git-push to suggest that a user integrate the remote changes instead of merge the remote changes to make this slightly clearer. Also change the suggested

[PATCH 2/2] pull: change the description to integrate changes

2013-07-07 Thread John Keeping
Since git-pull learned the --rebase option it has not just been about merging changes from a remote repository (where merge is in the sense of git merge). Change the description to use integrate instead of merge in order to reflect this. Signed-off-by: John Keeping j...@keeping.me.uk ---

[PATCH] git-config(1): clarify precedence of multiple values

2013-07-07 Thread John Keeping
In order to clarify which value is used when there are multiple values defined for a key, re-order the list of file locations so that it runs from least specific to most specific. Then add a paragraph which simply says that the last value will be used. Signed-off-by: John Keeping

Re: [PATCH] git-config(1): clarify precedence of multiple values

2013-07-07 Thread Jeff King
On Sun, Jul 07, 2013 at 08:49:56PM +0100, John Keeping wrote: In order to clarify which value is used when there are multiple values defined for a key, re-order the list of file locations so that it runs from least specific to most specific. Then add a paragraph which simply says that the

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

2013-07-07 Thread Eric Sunshine
On Sun, Jul 7, 2013 at 4:11 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Make git read the index file version 5 without complaining. This version of the reader doesn't read neither the cache-tree nor the resolve undo data, but doesn't choke on an index that includes such data. --- diff

Re: [PATCH 17/22] read-cache: read cache-tree in index-v5

2013-07-07 Thread Eric Sunshine
On Sun, Jul 7, 2013 at 4:11 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Since the cache-tree data is saved as part of the directory data, we already read it at the beginning of the index. The cache-tree is only converted from this directory data. The cache-tree data is arranged in a tree,

Re: [PATCH 18/22] read-cache: write index-v5

2013-07-07 Thread Eric Sunshine
On Sun, Jul 7, 2013 at 4:11 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Write the index version 5 file format to disk. This version doesn't write the cache-tree data and resolve-undo data to the file. The main work is done when filtering out the directories from the current in-memory

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

2013-07-07 Thread brian m. carlson
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 of a packed non-delta object be much larger than the You probably

Re: [PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-07 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: WRT describe --contains, I do agree that both of these $ git describe $(git rev-parse v1.8.3^0) $ git describe --contains $(git rev-parse v1.8.3^0) should just say v1.8.3 without ~0/^0/~0~0~0 etc. and the last example you showed

[PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr

2013-07-07 Thread Robin Rosenberg
Signed-off-by: Robin Rosenberg robin.rosenb...@dewire.com --- Documentation/git-config.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 9ae2508..3198d52 100644 --- a/Documentation/git-config.txt +++

Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr

2013-07-07 Thread John Keeping
On Mon, Jul 08, 2013 at 12:00:02AM +0200, Robin Rosenberg wrote: Signed-off-by: Robin Rosenberg robin.rosenb...@dewire.com --- Documentation/git-config.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt

Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr

2013-07-07 Thread Robin Rosenberg
I guess this isn't true either. Anyone has a better way of specifiying where the system wide config file is read from, or a user-parseable definition of $(prefix) ? -- robin - Ursprungligt meddelande - Signed-off-by: Robin Rosenberg robin.rosenb...@dewire.com ---

Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr

2013-07-07 Thread Robin Rosenberg
- Ursprungligt meddelande - On Mon, Jul 08, 2013 at 12:00:02AM +0200, Robin Rosenberg wrote: Signed-off-by: Robin Rosenberg robin.rosenb...@dewire.com --- Documentation/git-config.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 3/4] describe: use argv-array

2013-07-07 Thread Junio C Hamano
Instead of using a hand allocated args[] array, use argv-array API to manage the dynamically created list of arguments when invoking name-rev. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/describe.c | 31 --- 1 file changed, 16 insertions(+), 15

[PATCH 0/4] Make git name-rev $(git rev-parse v1.8.3) work

2013-07-07 Thread Junio C Hamano
So here is a set of small preparatory steps to help the other topic to allow git describe -contains v1.8.3 omit trailing ^0 from its output. We do not want to prevent people from allowing name-rev to convert object names other than commit-ishes. The series should apply on 96ffd4ca (Merge branch

[PATCH 1/4] name-ref: factor out name shortening logic from name_ref()

2013-07-07 Thread Junio C Hamano
The logic will be used in a new codepath for showing exact matches. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/name-rev.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 87d4854..1234ebb

[PATCH 2/4] name-rev: allow converting the exact object name at the tip of a ref

2013-07-07 Thread Junio C Hamano
git name-rev is supposed to convert 40-hex object names into strings that name the same objects based on refs, that can be fed to git rev-parse to get the same object names back, so $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin 8af06057d0c31a24e8737ae846ac2e116e8bafb9

[PATCH 4/4] describe/name-rev: tell name-rev to peel the incoming object to commit first

2013-07-07 Thread Junio C Hamano
With this on top of the other patches in this series, you would get: $ git describe --contains $(git rev-parse v1.8.3 v1.8.3^0) v1.8.3 v1.8.3 while you can still differentiate tags and the commits they point at with: $ git name-rev --refs=tags/\* --name-only $(git rev-parse

Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr

2013-07-07 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: I guess this isn't true either. Anyone has a better way of specifiying where the system wide config file is read from, or a user-parseable definition of $(prefix) ? ... the system-wide configuration file (typically

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

2013-07-07 Thread Shawn Pearce
On Sun, Jul 7, 2013 at 3:14 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

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Duy Nguyen
On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Add an api for access to the index file. Currently there is only a very basic api for accessing the index file, which only allows a full read of the index, and lets the users of the data filter it. The new index api

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Duy Nguyen
On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: +/* + * Options by which the index should be filtered when read partially. + * + * pathspec: The pathspec which the index entries have to match + * seen: Used to return the seen parameter from match_pathspec() + *

A local shared clone is now much slower

2013-07-07 Thread Stephen Rothwell
Hi guys, So commit 0433ad128c59 (clone: run check_everything_connected) (which turned up with v1.8.3) added a large traversal to clone which (as the comment said) makes a clone much slower. It is especially noticeable on git clone -s -l -n which I use every day and used to be almost instant. Is

Re: A local shared clone is now much slower

2013-07-07 Thread Duy Nguyen
On Mon, Jul 8, 2013 at 10:03 AM, Stephen Rothwell s...@canb.auug.org.au wrote: Hi guys, So commit 0433ad128c59 (clone: run check_everything_connected) (which turned up with v1.8.3) added a large traversal to clone which (as the comment said) makes a clone much slower. It is especially

Re: A local shared clone is now much slower

2013-07-07 Thread Stephen Rothwell
Hi Duy, On Mon, 8 Jul 2013 10:20:22 +0700 Duy Nguyen pclo...@gmail.com wrote: On Mon, Jul 8, 2013 at 10:03 AM, Stephen Rothwell s...@canb.auug.org.au wrote: So commit 0433ad128c59 (clone: run check_everything_connected) (which turned up with v1.8.3) added a large traversal to clone