[PATCH 2/2] reset: pass real rev name to add--interactive

2013-10-24 Thread Jeff King
The add--interactive --patch mode adjusts the UI based on whether we are pulling changes from HEAD or elsewhere (in the former case it asks to unstage the reverse hunk, rather than apply the forward hunk). Commit 166ec2e taught reset to work on an unborn branch, but in doing so, switched to always

[PATCH 1/2] add-interactive: handle unborn branch in patch mode

2013-10-24 Thread Jeff King
The list_modified function already knows how to handle an unborn branch by diffing against the empty tree. However, the diff we perform to get the actual hunks does not. Let's use the same logic for both diffs. Signed-off-by: Jeff King --- git-add--interactive.perl | 22 +- 1

[PATCH 0/2] reset -p and unborn branches

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 10:42:52PM -0700, Martin von Zweigbergk wrote: > > I think that's the correct fix for the regression. You are restoring > > the original, pre-166ec2e9 behavior for just the HEAD case. I do not > > think add--interactive does any other magic between a symbolic rev and > > i

Re: RFE: support change-id generation natively

2013-10-24 Thread Johannes Sixt
Am 10/24/2013 22:04, schrieb Junio C Hamano: > Johannes Sixt writes: >> That said, I don't think that --change-id option that the user must not >> forget to use is any better than a hook that the user must not forget to >> install. > > That is why I said this in my first response to this thread:

Re: Fwd: Errors when diff'ing arbitrary upstream remotes are not intuitive if git pull --all hasn't been done

2013-10-24 Thread Jeff King
On Fri, Oct 25, 2013 at 02:14:07AM -0400, Jeff King wrote: > > Could this error message be improved for interactive commands by > > first checking to see whether or not the path starts with a remote, > > then recommend that the remote be pulled? > > That might be worth doing. We cannot defini

Re: Fwd: Errors when diff'ing arbitrary upstream remotes are not intuitive if git pull --all hasn't been done

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 11:07:05AM -0700, yaneurabeya . wrote: > I added an arbitrary upstream remote thinking that I could just > git diff the upstream remote's master. Turns out I needed to run git > pull --all in order to be able to diff the file (I forgot that step). Actually, you can jus

[PATCH v2 17/19] repack: consider bitmaps when performing repacks

2013-10-24 Thread Jeff King
From: Vicent Marti Since `pack-objects` will write a `.bitmap` file next to the `.pack` and `.idx` files, this commit teaches `git-repack` to consider the new bitmap indexes (if they exist) when performing repack operations. This implies moving old bitmap indexes out of the way if we are repacki

[PATCH v2 18/19] t: add basic bitmap functionality tests

2013-10-24 Thread Jeff King
Now that we can read and write bitmaps, we can exercise them with some basic functionality tests. These tests aren't particularly useful for seeing the benefit, as the test repo is too small for it to make a difference. However, we can at least check that using bitmaps does not break anything. Sig

[PATCH v2 12/19] rev-list: add bitmap mode to speed up object lists

2013-10-24 Thread Jeff King
From: Vicent Marti The bitmap reachability index used to speed up the counting objects phase during `pack-objects` can also be used to optimize a normal rev-list if the only thing required are the SHA1s of the objects during the list (i.e., not the path names at which trees and blobs were found).

[PATCH v2 16/19] repack: handle optional files created by pack-objects

2013-10-24 Thread Jeff King
We ask pack-objects to pack to a set of temporary files, and then rename them into place. Some files that pack-objects creates may be optional (like a .bitmap file), in which case we would not want to call rename(). We already call stat() and make the chmod optional if the file cannot be accessed.

[PATCH v2 14/19] repack: stop using magic number for ARRAY_SIZE(exts)

2013-10-24 Thread Jeff King
We have a static array of extensions, but hardcode the size of the array in our loops. Let's pull out this magic number, which will make it easier to change. Signed-off-by: Jeff King --- builtin/repack.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/repack.c

[PATCH v2 13/19] pack-objects: implement bitmap writing

2013-10-24 Thread Jeff King
From: Vicent Marti This commit extends more the functionality of `pack-objects` by allowing it to write out a `.bitmap` index next to any written packs, together with the `.idx` index that currently gets written. If bitmap writing is enabled for a given repository (either by calling `pack-object

[PATCH v2 15/19] repack: turn exts array into array-of-struct

2013-10-24 Thread Jeff King
This is slightly more verbose, but will let us annotate the extensions with further options in future commits. Signed-off-by: Jeff King --- builtin/repack.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index 2e88975..a

[PATCH v2 19/19] pack-bitmap: implement optional name_hash cache

2013-10-24 Thread Jeff King
From: Vicent Marti When we use pack bitmaps rather than walking the object graph, we end up with the list of objects to include in the packfile, but we do not know the path at which any tree or blob objects would be found. In a recently packed repository, this is fine. A fetch would use the path

[PATCH v2 10/19] pack-bitmap: add support for bitmap indexes

2013-10-24 Thread Jeff King
From: Vicent Marti A bitmap index is a `.bitmap` file that can be found inside `$GIT_DIR/objects/pack/`, next to its corresponding packfile, and contains precalculated reachability information for selected commits. The full specification of the format for these bitmap indexes can be found in `Doc

[PATCH v2 11/19] pack-objects: use bitmaps when packing objects

2013-10-24 Thread Jeff King
From: Vicent Marti In this patch, we use the bitmap API to perform the `Counting Objects` phase in pack-objects, rather than a traditional walk through the object graph. For a reasonably-packed large repo, the time to fetch and clone is often dominated by the full-object revision walk during the

[PATCH v2 06/19] sha1_file: export `git_open_noatime`

2013-10-24 Thread Jeff King
From: Vicent Marti The `git_open_noatime` helper can be of general interest for other consumers of git's different on-disk formats. Signed-off-by: Vicent Marti Signed-off-by: Jeff King --- cache.h | 1 + sha1_file.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/

[PATCH v2 04/19] pack-objects: factor out name_hash

2013-10-24 Thread Jeff King
From: Vicent Marti As the pack-objects system grows beyond the single pack-objects.c file, more parts (like the soon-to-exist bitmap code) will need to compute hashes for matching deltas. Factor out name_hash to make it available to other files. Signed-off-by: Vicent Marti Signed-off-by: Jeff K

[PATCH v2 07/19] compat: add endianness helpers

2013-10-24 Thread Jeff King
From: Vicent Marti The POSIX standard doesn't currently define a `nothll`/`htonll` function pair to perform network-to-host and host-to-network swaps of 64-bit data. These 64-bit swaps are necessary for the on-disk storage of EWAH bitmaps if they are not in native byte order. Signed-off-by: Vice

[PATCH v2 03/19] pack-objects: Refactor the packing list

2013-10-24 Thread Jeff King
From: Vicent Marti The hash table that stores the packing list for a given `pack-objects` run was tightly coupled to the pack-objects code. In this commit, we refactor the hash table and the underlying storage array into a `packing_data` struct. The functionality for accessing and adding entries

[PATCH v2 05/19] revision: allow setting custom limiter function

2013-10-24 Thread Jeff King
From: Vicent Marti This commit enables users of `struct rev_info` to peform custom limiting during a revision walk (i.e. `get_revision`). If the field `include_check` has been set to a callback, this callback will be issued once for each commit before it is added to the "pending" list of the rev

[PATCH 02/19] revindex: Export new APIs

2013-10-24 Thread Jeff King
From: Vicent Marti Allow users to efficiently lookup consecutive entries that are expected to be found on the same revindex by exporting `find_revindex_position`: this function takes a pointer to revindex itself, instead of looking up the proper revindex for a given packfile on each call. Signed

[PATCH v2 08/19] ewah: compressed bitmap implementation

2013-10-24 Thread Jeff King
From: Vicent Marti EWAH is a word-aligned compressed variant of a bitset (i.e. a data structure that acts as a 0-indexed boolean array for many entries). It uses a 64-bit run-length encoding (RLE) compression scheme, trading some compression for better processing speed. The goal of this word-al

[PATCH v2 09/19] documentation: add documentation for the bitmap format

2013-10-24 Thread Jeff King
From: Vicent Marti This is the technical documentation for the JGit-compatible Bitmap v1 on-disk format. Signed-off-by: Vicent Marti Signed-off-by: Jeff King --- Documentation/technical/bitmap-format.txt | 131 ++ 1 file changed, 131 insertions(+) create mode 1006

[PATCH v2 01/19] sha1write: make buffer const-correct

2013-10-24 Thread Jeff King
We are passed a "void *" and write it out without ever touching it; let's indicate that by using "const". Signed-off-by: Jeff King --- csum-file.c | 6 +++--- csum-file.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csum-file.c b/csum-file.c index 53f5375..465971c 10064

[PATCHv2 0/19] pack bitmaps

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 01:59:15PM -0400, Jeff King wrote: > This series implements JGit-style pack bitmaps to speed up fetching and > cloning. Here is a re-roll fixing the comments so far. I know that nobody is likely to have had a chance to read through it carefully yet, but given the compiler

Re: Re* Bug report: reset -p HEAD

2013-10-24 Thread Martin von Zweigbergk
Sorry about the regression and thanks for report and fixes. On Thu, Oct 24, 2013 at 9:24 PM, Jeff King wrote: > On Thu, Oct 24, 2013 at 08:40:13PM -0700, Junio C Hamano wrote: > >> Maarten de Vries writes: >> >> > Some more info: It used to work as intended. Using a bisect shows it >> > has been

Re: git grep: search whole tree by default?

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 11:37 AM, Jeff King wrote: > On Thu, Oct 24, 2013 at 12:40:44PM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> > That would also provide people who do not like the change of default an >> > escape hatch to keep the current behavior. And I do not think scripted >

Re: git grep: search whole tree by default?

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 12:40:44PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > That would also provide people who do not like the change of default an > > escape hatch to keep the current behavior. And I do not think scripted > > use will be inconvenienced; they will already have to u

Re: [PATCH v2 00/14] Officially start moving to the term 'staging area'

2013-10-24 Thread Felipe Contreras
Karsten Blees wrote: > (2) Index > > An index, as in a library, maps almost perfectly to what the git index is > _and_ what we do with it. Not really. An index in the context of a library, and in any other context, is a tool that indicates where something is, in order to find it quickly. That is

Re: Re* Bug report: reset -p HEAD

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 08:40:13PM -0700, Junio C Hamano wrote: > Maarten de Vries writes: > > > Some more info: It used to work as intended. Using a bisect shows it > > has been broken by commit 166ec2e9. > > Thanks. > > A knee-jerk change without thinking what side-effect it has for you > to

Re: [BUG] "git --literal-pathspecs blame" broken in master

2013-10-24 Thread Jeff King
On Fri, Oct 25, 2013 at 11:16:08AM +0700, Nguyen Thai Ngoc Duy wrote: > > All of the GUARD_PATHSPEC calls indicate that everybody understands > > PATHSPEC_LITERAL. It is not technically true that git-blame understands > > the literal pathspec magic: > > > > $ git blame -- ':(literal)revision.c'

Re: [BUG] "git --literal-pathspecs blame" broken in master

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 11:04 AM, Jeff King wrote: > On Thu, Oct 24, 2013 at 11:49:47PM -0400, Jeff King wrote: > >> We get another change with a16bf9d (pathspec: make --literal-pathspecs >> disable pathspec magic, 2013-07-14), which I would think would fix >> things, but doesn't. >> >> $ git bl

Re: [BUG] "git --literal-pathspecs blame" broken in master

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 10:49 AM, Jeff King wrote: > $ git --literal-pathspecs blame ':(foo)bar' > fatal: :(foo)bar: pathspec magic not supported by this command: 'literal' > > The first one remains good, but the second one is still broken. I > haven't dug further yet, but I thought it might b

Re: [BUG] "git --literal-pathspecs blame" broken in master

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 11:49:47PM -0400, Jeff King wrote: > We get another change with a16bf9d (pathspec: make --literal-pathspecs > disable pathspec magic, 2013-07-14), which I would think would fix > things, but doesn't. > > $ git blame ':(foo)bar' > fatal: Invalid pathspec magic 'foo' in

[BUG] "git --literal-pathspecs blame" broken in master

2013-10-24 Thread Jeff King
There seems to be a bad interaction with --literal-pathspecs and the pathspec magic that is in master. Here's an example: [setup] $ git init $ echo content >':(foo)bar' $ git add . && git commit -m foo [with git v1.8.4] $ git blame ':(foo)bar' ^6b07eb4 (Jeff King 2013-10-24 22:59:02

Re* Bug report: reset -p HEAD

2013-10-24 Thread Junio C Hamano
Maarten de Vries writes: > Some more info: It used to work as intended. Using a bisect shows it > has been broken by commit 166ec2e9. Thanks. A knee-jerk change without thinking what side-effect it has for you to try out. builtin/reset.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(

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

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 10:21 AM, Jeff King wrote: > But if you want to simply add extra > data that would be ignored by an existing implementation, it would be OK > to add the data and mark it with a flag: > >> > + 2-byte flags (network byte order) >> > + >> > +

Re: [PATCH 13/19] pack-objects: implement bitmap writing

2013-10-24 Thread Jeff King
On Fri, Oct 25, 2013 at 08:21:12AM +0700, Nguyen Thai Ngoc Duy wrote: > > If bitmap writing is enabled for a given repository (either by calling > > `pack-objects` with the `--write-bitmap-index` flag or by having > > `pack.writebitmaps` set to `true` in the config) and pack-objects is > > writing

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

2013-10-24 Thread Jeff King
[+cc spearce; sorry, I really should have cc'd the whole series to you in the first place] On Fri, Oct 25, 2013 at 08:16:18AM +0700, Nguyen Thai Ngoc Duy wrote: > > + - A header appears at the beginning: > > + > > + 4-byte signature: {'B', 'I', 'T', 'M'} > > + > > +

Re: [PATCH 08/19] ewah: compressed bitmap implementation

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 04:34:48PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > From: Vicent Marti > > > > EWAH is a word-aligned compressed variant of a bitset (i.e. a data > > structure that acts as a 0-indexed boolean array for many entries). > > I think I've already pointed out s

Re: Finding the repository

2013-10-24 Thread Phil Hord
On Thu, Oct 24, 2013 at 9:46 AM, Duy Nguyen wrote: > On Thu, Oct 24, 2013 at 2:49 PM, Perry Hutchison > wrote: >> Duy Nguyen wrote: >> >>> ... it's not easy to determine ambiguity here, especially when the >>> repo finding code does not know anything about "bar/barz.c" (is it >>> a pathname or

Re: [PATCH 0/19] pack bitmaps

2013-10-24 Thread Junio C Hamano
This is only to tentatively work-around the compilation breakages; the fixes need to be split into the respective patches that introduce breakages when the series is rerolled (the one I sent for pack-bitmap.c separately is also included in this message). Thanks. ewah/ewah_bitmap.c | 22

Re: [PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread Junio C Hamano
John Keeping writes: > To clarify: the particular commit in the calls above happens to be the > oldest entry in the reflog, if I pick a newer entry then it works. > > It seems that for_each_reflog_ent isn't returning the oldest entry; > revs.nr is 62 whereas "git rev-list -g origin/master | wc -l

Re: git grep: search whole tree by default?

2013-10-24 Thread David Aguilar
On Thu, Oct 24, 2013 at 12:40 PM, Junio C Hamano wrote: > Jeff King writes: > >> That would also provide people who do not like the change of default an >> escape hatch to keep the current behavior. And I do not think scripted >> use will be inconvenienced; they will already have to use "." or ":

Re: [PATCH 13/19] pack-objects: implement bitmap writing

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 1:06 AM, Jeff King wrote: > From: Vicent Marti > > This commit extends more the functionality of `pack-objects` by allowing > it to write out a `.bitmap` index next to any written packs, together > with the `.idx` index that currently gets written. > > If bitmap writing is

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

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 1:03 AM, Jeff King wrote: > diff --git a/Documentation/technical/bitmap-format.txt > b/Documentation/technical/bitmap-format.txt > new file mode 100644 > index 000..c686dd1 > --- /dev/null > +++ b/Documentation/technical/bitmap-format.txt > @@ -0,0 +1,131 @@ > +GIT bit

Re: [PATCH 2/2] entry.c: convert write_entry to use strbuf

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 2:49 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Thu, Oct 24, 2013 at 12:52 AM, Junio C Hamano wrote: >>> Nguyễn Thái Ngọc Duy writes: >>> The strcpy call in open_output_fd() implies that the output buffer must be at least 25 chars long. >>> >>> Hmph

Re: [PATCH 08/19] ewah: compressed bitmap implementation

2013-10-24 Thread Junio C Hamano
Jeff King writes: > From: Vicent Marti > > EWAH is a word-aligned compressed variant of a bitset (i.e. a data > structure that acts as a 0-indexed boolean array for many entries). I think I've already pointed out some when the original series was posted, but this does not seem to compile with -

Re: Bug report: reset -p HEAD

2013-10-24 Thread Maarten de Vries
Some more info: It used to work as intended. Using a bisect shows it has been broken by commit 166ec2e9. Kinds regards, Maarten de Vries On 25 October 2013 01:05, Maarten de Vries wrote: > Hi, > > I noticed that reset -p HEAD is inconsistent with checkout -p HEAD. > When running checkout -p you

Fwd: Bug report: reset -p HEAD

2013-10-24 Thread Maarten de Vries
Hi, I noticed that reset -p HEAD is inconsistent with checkout -p HEAD. When running checkout -p you are asked to discard hunks from the index and worktree, but when running reset -p you are asked to apply hunks to the index. It would make more sense if reset -p asked to discard (reversed) hunks f

Re: Feature: support for file permissions

2013-10-24 Thread Junio C Hamano
Renich Bon Ciric writes: > I think file permissions are really important for source code as well. > > For example, in web development, you want configuration files to be > read only; specially if you're deploying with git. That is not _source code_; you are talking about deployed set of files, a

[PATCH v2 2/2] merge-base: "--reflog" mode finds fork point from reflog entries

2013-10-24 Thread Junio C Hamano
The "git pull --rebase" command computes the fork point of the branch being rebased using the reflog entries of the "base" branch (typically a remote-tracking branch) the branch's work was based on, in order to cope with the case in which the "base" branch has been rewound and rebuilt. For example

Re: [PATCH 2/2] merge-base: "--reflog" mode finds fork point from reflog entries

2013-10-24 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Oct 24, 2013 at 5:26 PM, Junio C Hamano wrote: >> Eric Sunshine writes: >> >>> On Thu, Oct 24, 2013 at 3:11 PM, Junio C Hamano wrote: diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh index f80bba8..3a1abee 100755 --- a/t/t6010-merge-base

Re: [PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread John Keeping
On Thu, Oct 24, 2013 at 10:40:07PM +0100, John Keeping wrote: > On Thu, Oct 24, 2013 at 10:31:35PM +0100, John Keeping wrote: > > On Thu, Oct 24, 2013 at 02:20:29PM -0700, Junio C Hamano wrote: > > > John Keeping writes: > > > > > > > On Thu, Oct 24, 2013 at 12:11:22PM -0700, Junio C Hamano wrote

Re: [PATCH] http.c: Spell the null pointer as NULL

2013-10-24 Thread Junio C Hamano
Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] merge-base: "--reflog" mode finds fork point from reflog entries

2013-10-24 Thread Eric Sunshine
On Thu, Oct 24, 2013 at 5:26 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> On Thu, Oct 24, 2013 at 3:11 PM, Junio C Hamano wrote: >>> diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh >>> index f80bba8..3a1abee 100755 >>> --- a/t/t6010-merge-base.sh >>> +++ b/t/t6010-merge-base

Re: [PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread John Keeping
On Thu, Oct 24, 2013 at 10:31:35PM +0100, John Keeping wrote: > On Thu, Oct 24, 2013 at 02:20:29PM -0700, Junio C Hamano wrote: > > John Keeping writes: > > > > > On Thu, Oct 24, 2013 at 12:11:22PM -0700, Junio C Hamano wrote: > > >> The first one is a clean-up of the code to parse command line >

Feature: support for file permissions

2013-10-24 Thread Renich Bon Ciric
Hello, I think file permissions are really important for source code as well. For example, in web development, you want configuration files to be read only; specially if you're deploying with git. Also, you would want some executable file to not be writable ; but executable by world. Permission

Re: [PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread John Keeping
On Thu, Oct 24, 2013 at 02:20:29PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > On Thu, Oct 24, 2013 at 12:11:22PM -0700, Junio C Hamano wrote: > >> The first one is a clean-up of the code to parse command line > >> options to "git merge-base". Options such as "--independent", > >>

Re: [PATCH 2/2] merge-base: "--reflog" mode finds fork point from reflog entries

2013-10-24 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Oct 24, 2013 at 3:11 PM, Junio C Hamano wrote: >> diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh >> index f80bba8..3a1abee 100755 >> --- a/t/t6010-merge-base.sh >> +++ b/t/t6010-merge-base.sh >> @@ -230,4 +230,31 @@ test_expect_success 'criss-cross mer

Re: [PATCH 15/15] fetch, remote: properly convey --no-prune options to subprocesses

2013-10-24 Thread Junio C Hamano
I finished reading thru the remainder and all looked good (again except minor nits I sent reviews for separately). Thanks, will queue. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.

Re: [PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread Junio C Hamano
John Keeping writes: > On Thu, Oct 24, 2013 at 12:11:22PM -0700, Junio C Hamano wrote: >> The first one is a clean-up of the code to parse command line >> options to "git merge-base". Options such as "--independent", >> "--is-ancestor" and "--octopus" are mutually exclusive and it is >> better e

Re: [PATCH 11/15] fetch --prune: prune only based on explicit refspecs

2013-10-24 Thread Junio C Hamano
Michael Haggerty writes: > ... > Signed-off-by: Michael Haggerty Everything in the proposed log message made sense to me. > diff --git a/Documentation/config.txt b/Documentation/config.txt > index d4d93c9..83c1700 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -2

Re: [PATCH 2/2] merge-base: "--reflog" mode finds fork point from reflog entries

2013-10-24 Thread Eric Sunshine
On Thu, Oct 24, 2013 at 3:11 PM, Junio C Hamano wrote: > diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh > index f80bba8..3a1abee 100755 > --- a/t/t6010-merge-base.sh > +++ b/t/t6010-merge-base.sh > @@ -230,4 +230,31 @@ test_expect_success 'criss-cross merge-base for > octopus-step' '

Re: [PATCH] http.c: Spell the null pointer as NULL

2013-10-24 Thread Jonathan Nieder
Ramsay Jones wrote: > Commit 1bbcc224 ("http: refactor options to http_get_*", 28-09-2013) > changed the type of final 'options' argument of the http_get_file() > function from an int to an 'struct http_get_options' pointer. > However, it neglected to update the (single) call site. Since this > ca

Re: [PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread John Keeping
On Thu, Oct 24, 2013 at 12:11:22PM -0700, Junio C Hamano wrote: > The first one is a clean-up of the code to parse command line > options to "git merge-base". Options such as "--independent", > "--is-ancestor" and "--octopus" are mutually exclusive and it is > better expressed in terms of the rece

Re: [PATCH 10/15] fetch --tags: fetch tags *in addition to* other stuff

2013-10-24 Thread Junio C Hamano
Michael Haggerty writes: > Previously, fetch's "--tags" option was considered equivalent to > specifying the refspec "refs/tags/*:refs/tags/*" on the command line; > in particular, it caused the remote..refspec configuration to be > ignored. > > But it is not very useful to fetch tags without als

Re: [PATCH] rebase: use reflog to find common base with upstream

2013-10-24 Thread John Keeping
On Mon, Oct 21, 2013 at 10:40:22PM -0700, Martin von Zweigbergk wrote: > On Wed, Oct 16, 2013 at 11:53 AM, John Keeping wrote: > > Commit 15a147e (rebase: use @{upstream} if no upstream specified, > > 2011-02-09) says: > > > > Make it default to 'git rebase @{upstream}'. That is also what

Re: [PATCH 0/19] pack bitmaps

2013-10-24 Thread Junio C Hamano
Jeff King writes: > A similar series has been running on github.com for the past couple of > months, though not every repository has had bitmaps turned on (but some > very busy ones have). We've hopefully squeezed out all of the bugs and > corner cases over that time. However, I did rebase this

[PATCH] http.c: Spell the null pointer as NULL

2013-10-24 Thread Ramsay Jones
Commit 1bbcc224 ("http: refactor options to http_get_*", 28-09-2013) changed the type of final 'options' argument of the http_get_file() function from an int to an 'struct http_get_options' pointer. However, it neglected to update the (single) call site. Since this call was passing '0' to that arg

Re: RFE: support change-id generation natively

2013-10-24 Thread Junio C Hamano
Johannes Sixt writes: > Am 10/24/2013 7:25, schrieb Duy Nguyen: >> On Thu, Oct 24, 2013 at 11:11 AM, Nasser Grainawi >> wrote: > It is not clear to me how you envision to make it work. I don't have the source code. >>> >>> Now you do: >>> https://gerrit.googlesource.com/gerrit/+/

Re: [PATCH 02/15] t5510: prepare test refs more straightforwardly

2013-10-24 Thread Junio C Hamano
Michael Haggerty writes: >> As long as you have checked that our local 'master' should be at the >> same commit as the origin's 'master' at this point, I think this >> change is OK. > > It doesn't matter what the reference points at; the only point of these > tests is to check whether branches th

Re: [PATCH 2/2] entry.c: convert write_entry to use strbuf

2013-10-24 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, Oct 24, 2013 at 12:52 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> The strcpy call in open_output_fd() implies that the output buffer >>> must be at least 25 chars long. >> >> Hmph, where does that 25 come from? >> >> [snipped] > > Much better. T

Re: git grep: search whole tree by default?

2013-10-24 Thread Junio C Hamano
Jeff King writes: > That would also provide people who do not like the change of default an > escape hatch to keep the current behavior. And I do not think scripted > use will be inconvenienced; they will already have to use "." or ":/" to > be explicit (if they care) since the behavior is changi

[PATCH 2/2] merge-base: "--reflog" mode finds fork point from reflog entries

2013-10-24 Thread Junio C Hamano
The "git pull --rebase" command computes the fork point of the branch being rebased using the reflog entries of the "base" branch (typically a remote-tracking branch) the branch's work was based on, in order to cope with the case in which the "base" branch has been rewound and rebuilt. For example

[PATCH 0/2] finding the fork point from reflog entries

2013-10-24 Thread Junio C Hamano
The first one is a clean-up of the code to parse command line options to "git merge-base". Options such as "--independent", "--is-ancestor" and "--octopus" are mutually exclusive and it is better expressed in terms of the recently introduced OPT_CMDMODE. The second one implements the entire logic

[PATCH 1/2] merge-base: use OPT_CMDMODE and clarify the command line parsing

2013-10-24 Thread Junio C Hamano
The --octopus, --independent and --is-ancestor are mutually exclusive command modes (in addition to not giving any of these options), so represent them as such using the recent OPT_CMDMODE facility available since 11588263 (parse-options: add OPT_CMDMODE(), 2013-07-30), which is in v1.8.4-82-g366b8

Re: [PATCH] rebase: use reflog to find common base with upstream

2013-10-24 Thread Junio C Hamano
Martin von Zweigbergk writes: > I think > > git merge-base HEAD $(git rev-list -g "$upstream_name") > > is roughly correct and hopefully fast enough. That can lead to too > long a command line, so I was planning on teaching merge-base a > --stdin option, but never got around to it. Sorry for c

[PATCH 10/19] pack-bitmap: add support for bitmap indexes

2013-10-24 Thread Jeff King
From: Vicent Marti A bitmap index is a `.bitmap` file that can be found inside `$GIT_DIR/objects/pack/`, next to its corresponding packfile, and contains precalculated reachability information for selected commits. The full specification of the format for these bitmap indexes can be found in `Doc

[PATCH 12/19] rev-list: add bitmap mode to speed up object lists

2013-10-24 Thread Jeff King
From: Vicent Marti The bitmap reachability index used to speed up the counting objects phase during `pack-objects` can also be used to optimize a normal rev-list if the only thing required are the SHA1s of the objects during the list (i.e., not the path names at which trees and blobs were found).

[PATCH 18/19] t: add basic bitmap functionality tests

2013-10-24 Thread Jeff King
Now that we can read and write bitmaps, we can exercise them with some basic functionality tests. These tests aren't particularly useful for seeing the benefit, as the test repo is too small for it to make a difference. However, we can at least check that using bitmaps does not break anything. Sig

[PATCH 17/19] repack: consider bitmaps when performing repacks

2013-10-24 Thread Jeff King
From: Vicent Marti Since `pack-objects` will write a `.bitmap` file next to the `.pack` and `.idx` files, this commit teaches `git-repack` to consider the new bitmap indexes (if they exist) when performing repack operations. This implies moving old bitmap indexes out of the way if we are repacki

[PATCH 19/19] pack-bitmap: implement optional name_hash cache

2013-10-24 Thread Jeff King
From: Vicent Marti When we use pack bitmaps rather than walking the object graph, we end up with the list of objects to include in the packfile, but we do not know the path at which any tree or blob objects would be found. In a recently packed repository, this is fine. A fetch would use the path

[PATCH 16/19] repack: handle optional files created by pack-objects

2013-10-24 Thread Jeff King
We ask pack-objects to pack to a set of temporary files, and then rename them into place. Some files that pack-objects creates may be optional (like a .bitmap file), in which case we would not want to call rename(). We already call stat() and make the chmod optional if the file cannot be accessed.

[PATCH 15/19] repack: turn exts array into array-of-struct

2013-10-24 Thread Jeff King
This is slightly more verbose, but will let us annotate the extensions with further options in future commits. Signed-off-by: Jeff King --- builtin/repack.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index 2e88975..a

[PATCH 13/19] pack-objects: implement bitmap writing

2013-10-24 Thread Jeff King
From: Vicent Marti This commit extends more the functionality of `pack-objects` by allowing it to write out a `.bitmap` index next to any written packs, together with the `.idx` index that currently gets written. If bitmap writing is enabled for a given repository (either by calling `pack-object

Fwd: Errors when diff'ing arbitrary upstream remotes are not intuitive if git pull --all hasn't been done

2013-10-24 Thread yaneurabeya .
Hi! I added an arbitrary upstream remote thinking that I could just git diff the upstream remote's master. Turns out I needed to run git pull --all in order to be able to diff the file (I forgot that step). Could this error message be improved for interactive commands by first checking to s

[PATCH 14/19] repack: stop using magic number for ARRAY_SIZE(exts)

2013-10-24 Thread Jeff King
We have a static array of extensions, but hardcode the size of the array in our loops. Let's pull out this magic number, which will make it easier to change. Signed-off-by: Jeff King --- builtin/repack.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/repack.c

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

2013-10-24 Thread Jeff King
From: Vicent Marti This is the technical documentation for the JGit-compatible Bitmap v1 on-disk format. Signed-off-by: Vicent Marti Signed-off-by: Jeff King --- Documentation/technical/bitmap-format.txt | 131 ++ 1 file changed, 131 insertions(+) create mode 1006

[PATCH 11/19] pack-objects: use bitmaps when packing objects

2013-10-24 Thread Jeff King
From: Vicent Marti In this patch, we use the bitmap API to perform the `Counting Objects` phase in pack-objects, rather than a traditional walk through the object graph. For a reasonably-packed large repo, the time to fetch and clone is often dominated by the full-object revision walk during the

[PATCH 08/19] ewah: compressed bitmap implementation

2013-10-24 Thread Jeff King
From: Vicent Marti EWAH is a word-aligned compressed variant of a bitset (i.e. a data structure that acts as a 0-indexed boolean array for many entries). It uses a 64-bit run-length encoding (RLE) compression scheme, trading some compression for better processing speed. The goal of this word-al

[PATCH 06/19] sha1_file: export `git_open_noatime`

2013-10-24 Thread Jeff King
From: Vicent Marti The `git_open_noatime` helper can be of general interest for other consumers of git's different on-disk formats. Signed-off-by: Vicent Marti Signed-off-by: Jeff King --- cache.h | 1 + sha1_file.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/

[PATCH 07/19] compat: add endianness helpers

2013-10-24 Thread Jeff King
From: Vicent Marti The POSIX standard doesn't currently define a `nothll`/`htonll` function pair to perform network-to-host and host-to-network swaps of 64-bit data. These 64-bit swaps are necessary for the on-disk storage of EWAH bitmaps if they are not in native byte order. Signed-off-by: Vice

[PATCH 04/19] pack-objects: factor out name_hash

2013-10-24 Thread Jeff King
From: Vicent Marti As the pack-objects system grows beyond the single pack-objects.c file, more parts (like the soon-to-exist bitmap code) will need to compute hashes for matching deltas. Factor out name_hash to make it available to other files. Signed-off-by: Vicent Marti Signed-off-by: Jeff K

[PATCH 05/19] revision: allow setting custom limiter function

2013-10-24 Thread Jeff King
From: Vicent Marti This commit enables users of `struct rev_info` to peform custom limiting during a revision walk (i.e. `get_revision`). If the field `include_check` has been set to a callback, this callback will be issued once for each commit before it is added to the "pending" list of the rev

[PATCH 03/19] pack-objects: Refactor the packing list

2013-10-24 Thread Jeff King
From: Vicent Marti The hash table that stores the packing list for a given `pack-objects` run was tightly coupled to the pack-objects code. In this commit, we refactor the hash table and the underlying storage array into a `packing_data` struct. The functionality for accessing and adding entries

[PATCH 02/19] revindex: Export new APIs

2013-10-24 Thread Jeff King
From: Vicent Marti Allow users to efficiently lookup consecutive entries that are expected to be found on the same revindex by exporting `find_revindex_position`: this function takes a pointer to revindex itself, instead of looking up the proper revindex for a given packfile on each call. Signed

[PATCH 0/19] pack bitmaps

2013-10-24 Thread Jeff King
This series implements JGit-style pack bitmaps to speed up fetching and cloning. For example, here is a simulation of the server side of a clone of a fully-packed kernel repo (measuring actual clones is harder, because the client does a lot of work on resolving deltas): [before] $ time git p

[PATCH 01/19] sha1write: make buffer const-correct

2013-10-24 Thread Jeff King
We are passed a "void *" and write it out without ever touching it; let's indicate that by using "const". Signed-off-by: Jeff King --- csum-file.c | 6 +++--- csum-file.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csum-file.c b/csum-file.c index 53f5375..465971c 10064

  1   2   >