Bringing a bit more sanity to $GIT_DIR/objects/info/alternates?

2012-08-04 Thread Junio C Hamano
The "alternates" mechanism lets you keep a single object store (not necessarily a git repository on its own, but just the objects/ part of it) on a machine, have multiple repositories on the same machine share objects from it, to save the network transfer bandwidth when cloning from remote reposito

Did we break receive-pack recently?

2012-08-04 Thread Junio C Hamano
I just saw this: $ git push ko ko: Counting objects: 332, done. Delta compression using up to 4 threads. Compressing objects: 100% (110/110), done. Writing objects: 100% (130/130), 32.27 KiB, done. Total 130 (delta 106), reused 21 (delta 20) Auto packing the repository

Re: [PATCH] Fix 'No newline...' annotation in rewrite diffs.

2012-08-04 Thread Junio C Hamano
Adam Butcher writes: > When operating in --break-rewrites (-B) mode on a file with no newline > terminator (and assuming --break-rewrites determines that the diff > _is_ a rewrite), git diff previously concatenated the indicator comment > '\ No newline at end of file' directly to the terminating

Re: [PATCH 1/8] implement generic key/value map

2012-08-04 Thread Junio C Hamano
Jeff King writes: > It is frequently useful to have a fast, generic data > structure mapping keys to values. We already have something > like this in the "decorate" API, but it has two downsides: > > 1. The key type must always be a "struct object *". > > 2. The value type is a void pointer,

Re: [PATCH 6/8] implement metadata cache subsystem

2012-08-04 Thread Junio C Hamano
Jeff King writes: > There are some calculations that git makes repeatedly, even > though the results are invariant for a certain input (e.g., > the patch-id of a certain commit). We can make a space/time > tradeoff by caching these on disk between runs. > > Even though these may be immutable for

Re: [PATCH] tests: Introduce test_seq

2012-08-04 Thread Junio C Hamano
Johannes Sixt writes: > And the reason for this is that we always told people "don't use seq" > and they submitted an updated patch. What would we have to do now? We > have to tell them "don't use seq, use test_seq". Therefore, the patch > does not accomplish anything useful, IMO. > > The functio

Re: File path not escaped in warning message

2012-08-04 Thread Junio C Hamano
Janusz Białobrzewski writes: > I have enabled core.quotepath, but file path in warning isn't escaped: > File name is 1ą.txt its content is encoded in windows-1250 > Output of git diff after reencoding to windows1250 is: > > warning: LF will be replaced by CRLF in 1Ä….txt. > The file will have its

Re: git cvsimport: new tags not imported on second cvsimport

2012-08-04 Thread Andreas Schwab
Junio C Hamano writes: > Andreas Schwab writes: > >> Reset the branch back to before the import. > > Does the resulting history created by cvsimport after resetting a > branch back to an older point exactly match the history before > resetting (obviously modulo the tag that has been added since

Re: [PATCH] tests: Introduce test_seq

2012-08-04 Thread Adam Butcher
Michał Kiedrowicz gmail.com> writes: > Junio C Hamano pobox.com> wrote: > > diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh > > index c8b4ae3..7dc70eb 100644 > > --- a/t/test-lib-functions.sh > > +++ b/t/test-lib-functions.sh > > @@ -543,11 +543,12 @@ test_cmp() { > > # done > >

Re: git cvsimport: new tags not imported on second cvsimport

2012-08-04 Thread Junio C Hamano
Andreas Schwab writes: > Reset the branch back to before the import. Does the resulting history created by cvsimport after resetting a branch back to an older point exactly match the history before resetting (obviously modulo the tag that has been added since the original import)? I recall that

Re: [PATCHv2 5/5] t3910: use the UTF8_NFD_TO_NFC test prereq

2012-08-04 Thread Junio C Hamano
Torsten Bögershausen writes: > Am 2012-07-30 11:57, schrieb Michael J Gruber: > (Sorry being late) > > That line: >>skip_all="filesystem does not convert utf-8 nfd to nfc" > > shouldn't it be the other way around? > skip_all="filesystem does not convert utf-8 nfc to nfd" > > (and may be the follo

Re: [PATCH] Fix 'No newline...' annotation in rewrite diffs.

2012-08-04 Thread Adam Butcher
When operating in --break-rewrites (-B) mode on a file with no newline terminator (and assuming --break-rewrites determines that the diff _is_ a rewrite), git diff previously concatenated the indicator comment '\ No newline at end of file' directly to the terminating line rather than on a line of i

Re: GSOC remote-svn: branch detection

2012-08-04 Thread Ramkumar Ramachandra
Hi, Florian Achleitner wrote: > 1. Import linearly and split later: I think this approach will be a lot less messy if you can cleanly separate the fetching component from the mapper. Currently, svndump re-creates the layout of the SVN repository. And the series you posted last week contains a p

[PATCH 8/8] diff: optionally use rename cache

2012-08-04 Thread Jeff King
This speeds up estimate_similarity by caching the similarity score of pairs of blob sha1s. Signed-off-by: Jeff King --- Some interesting things to time with this are: - "git log --raw -M" on a repo with a lot of paths or a lot of renames (I found on git.git, the speedup was not that impres

[PATCH 7/8] implement rename cache

2012-08-04 Thread Jeff King
This just stores pairs of sha1s mapped to their similarity scores. Signed-off-by: Jeff King --- Makefile | 5 + cache.h | 5 + map-sha1pair-uint32-params.h | 12 map-sha1pair-uint32.c| 8 map-sha1pair-uint32.h

[PATCH 6/8] implement metadata cache subsystem

2012-08-04 Thread Jeff King
There are some calculations that git makes repeatedly, even though the results are invariant for a certain input (e.g., the patch-id of a certain commit). We can make a space/time tradeoff by caching these on disk between runs. Even though these may be immutable for a certain commit, we don't want

[PATCH 5/8] map: implement persistent maps

2012-08-04 Thread Jeff King
It's sometimes useful to keep a mapping across program invocations (e.g., because a space/time tradeoff makes it worth keeping a cache of calculated metadata for some objects). This adds a persistent version of the map API which can be backed by a flat memory store (like an mmap'd file). By itself

[PATCH 4/8] decorate: use "map" for the underlying implementation

2012-08-04 Thread Jeff King
The decoration API maps objects to void pointers. This is a subset of what the map API is capable of, so let's get rid of the duplicate implementation. We could just fix all callers of decorate to call the map API directly. However, the map API is very generic since it is meant to handle any type.

[PATCH 3/8] fast-export: use object to uint32 map instead of "decorate"

2012-08-04 Thread Jeff King
Previously we encoded the "mark" mapping inside the "void *" field of a "struct decorate". It's a little more natural for us to do so using a data structure made for holding actual values. Signed-off-by: Jeff King --- builtin/fast-export.c | 46 +- 1 f

[PATCH 2/8] map: add helper functions for objects as keys

2012-08-04 Thread Jeff King
These functions can be used as HASH and KEY_EQUAL functions when defining new maps with "struct object *" as their key. Signed-off-by: Jeff King --- Makefile | 1 + map-object.h | 19 +++ 2 files changed, 20 insertions(+) create mode 100644 map-object.h diff --git a/Makefi

[PATCH 1/8] implement generic key/value map

2012-08-04 Thread Jeff King
It is frequently useful to have a fast, generic data structure mapping keys to values. We already have something like this in the "decorate" API, but it has two downsides: 1. The key type must always be a "struct object *". 2. The value type is a void pointer, which means it is inefficie

[PATCH 0/8] caching rename results

2012-08-04 Thread Jeff King
On Thu, Aug 02, 2012 at 06:41:55PM -0400, Jeff King wrote: > > (1a) is good regardless rename overrides. Why don't you polish and > > submit it? We can set some criteria to limit the cache size while > > keeping computation reasonably low. Caching rename scores for file > > pairs that has file siz

Re: [PATCH] tests: Introduce test_seq

2012-08-04 Thread Johannes Sixt
Am 04.08.2012 00:09, schrieb Michał Kiedrowicz: > Junio C Hamano wrote: >> I do not have strong >> opinion on calling this test_seq when it acts differently from seq; >> it is not confusing enough to make me push something longer that is >> different from "seq", e.g. test_sequence. > > I prefer "

Re: git cvsimport: new tags not imported on second cvsimport

2012-08-04 Thread Andreas Schwab
Ilya Basin writes: > AS> Ilya Basin writes: > >>> I made the initial import: >>> git cvsimport -d :pserver:user@blackbird:10010/data/cvs/webgui -C SAP >>> -r cvs -k SAP >>> >>> edited .git/config: >>> [cvsimport] >>> module = SAP >>> r = cvs >>> d = :

File path not escaped in warning message

2012-08-04 Thread Janusz Białobrzewski
Hi, I have enabled core.quotepath, but file path in warning isn't escaped: File name is 1ą.txt its content is encoded in windows-1250 Output of git diff after reencoding to windows1250 is: warning: LF will be replaced by CRLF in 1Ä….txt. The file will have its original line endings in your worki

Re[2]: git cvsimport: new tags not imported on second cvsimport

2012-08-04 Thread Ilya Basin
AS> Ilya Basin writes: >> I made the initial import: >> git cvsimport -d :pserver:user@blackbird:10010/data/cvs/webgui -C SAP -r >> cvs -k SAP >> >> edited .git/config: >> [cvsimport] >> module = SAP >> r = cvs >> d = :pserver:user@blackbird:10010/data

Re: git cvsimport: new tags not imported on second cvsimport

2012-08-04 Thread Andreas Schwab
Ilya Basin writes: > I made the initial import: > git cvsimport -d :pserver:user@blackbird:10010/data/cvs/webgui -C SAP -r > cvs -k SAP > > edited .git/config: > [cvsimport] > module = SAP > r = cvs > d = :pserver:user@blackbird:10010/data/cvs/webgui >

Re: git cvsexportcommit: error patch does not apply

2012-08-04 Thread Ilya Basin
IB> $ git cvsexportcommit -w ../../cvs/SAP -u -p -k -c b04fa43c9f1374cf0ea5f9bf88024282414b0a0c IB> Checking if patch will apply IB> cvs update: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc' IB> cvs status: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc'

Re: [PATCH] tests: Introduce test_seq

2012-08-04 Thread Michał Kiedrowicz
Junio C Hamano wrote: > Tentatively I'll queue this one on top, but I am tempted to squash > this in before merging the topic down. > > -- >8 -- > Subject: [PATCH] fixup! tests: Introduce test_seq > > Complex chains of && and || are harder to read when used as > replacement for if/else statemen