Re: Announcing git-reparent

2013-01-14 Thread Piotr Krukowiecki
Hello, On Mon, Jan 14, 2013 at 8:16 AM, Jonathan Nieder jrnie...@gmail.com wrote: Hi Mark, Mark Lodato wrote: Create a new commit object that has the same tree and commit message as HEAD but with a different set of parents. If ``--no-reset`` is given, the full object id of this commit is

Re: Announcing git-reparent

2013-01-14 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Hi Mark, Mark Lodato wrote: Create a new commit object that has the same tree and commit message as HEAD but with a different set of parents. If ``--no-reset`` is given, the full object id of this commit is printed and the program exits I've

What ever these people remember to pay for the actual title oftiffany jewellery ?

2013-01-14 Thread gloria5858
What ever these people remember to pay for the actual title associated with tiffany necklace http://www.cheaptiffanyclub.co.uk ? Consider source from the Tiffany bands? Perhaps you have any kind of indisputable fact that may immediately, Tiffany Company are simply provided available letter

pandora bracelet charms may well do any daydream glance valid

2013-01-14 Thread gloria5858
Just about every single baby trademark to make sure you scratching commendable add on located at him / her ceremony; pandora bracelet charms http://www.cheapcharmpandora.net may well do any daydream glance valid. Gotten married adventure fantastic, however, the key blithe connections add on

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Joachim Schmitz
Jeff King wrote: On Sun, Jan 13, 2013 at 06:42:01PM +0100, René Scharfe wrote: When parsing these config variable names, we currently check that the second dot is found nine characters into the name, disallowing filter names with a length of five characters. Additionally, git archive crashes

Re: [PATCH 01/14] imap-send.c: remove msg_data::flags, which was always zero

2013-01-14 Thread Michael Haggerty
On 01/14/2013 06:57 AM, Jonathan Nieder wrote: Michael Haggerty wrote: This removes the need for function imap_make_flags(), so delete it, too. [...] --- a/imap-send.c +++ b/imap-send.c [...] box = gctx-name; prefix = !strcmp(box, INBOX) ? : ctx-prefix; cb.create = 0;

Re: [PATCH 06/14] imap-send.c: remove some unused fields from struct store

2013-01-14 Thread Michael Haggerty
On 01/14/2013 07:19 AM, Jonathan Nieder wrote: Michael Haggerty wrote: --- a/imap-send.c +++ b/imap-send.c [...] @@ -772,13 +767,10 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd) !strcmp(NO, arg) || !strcmp(BYE, arg)) {

Re: [PATCH 09/14] imap-send.c: remove namespace fields from struct imap

2013-01-14 Thread Michael Haggerty
On 01/14/2013 07:43 AM, Jonathan Nieder wrote: Michael Haggerty wrote: [...] @@ -722,9 +667,9 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd) } if (!strcmp(NAMESPACE, arg)) { -

Re: [PATCH 00/14] Remove unused code from imap-send.c

2013-01-14 Thread Michael Haggerty
On 01/14/2013 07:57 AM, Jonathan Nieder wrote: Michael Haggerty wrote: imap-send.c | 286 +--- 1 file changed, 39 insertions(+), 247 deletions(-) See my replies for comments on patches 1, 6, 9, 11, and 12. The rest are

Re: [PATCH 2/8] git_remote_helpers: fix input when running under Python 3

2013-01-14 Thread John Keeping
On Mon, Jan 14, 2013 at 05:48:18AM +0100, Michael Haggerty wrote: On 01/13/2013 05:17 PM, John Keeping wrote: On Sun, Jan 13, 2013 at 04:26:39AM +0100, Michael Haggerty wrote: On 01/12/2013 08:23 PM, John Keeping wrote: Although 2to3 will fix most issues in Python 2 code to make it run under

Re: [BUG] Bug in git stash

2013-01-14 Thread Johannes Sixt
Am 1/14/2013 10:18, schrieb Nikolay Frantsev: nikolay@localhost:~/Desktop/git-stash_bug/bug$ git status # On branch master # Changes to be committed: # (use git reset HEAD file... to unstage) # # new file: 3 # # Changes not staged for commit: # (use git add file... to update

Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread George Karpenkov
Hi All, I've managed to corrupt my very valuable repository with a recursive sed which went wrong. I wanted to convert all tabs to spaces with the following command: find ./ -name '*.*' -exec sed -i 's/\t//g' {} \; I think that has changed not only the files in the repo, but the data files

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread Matthieu Moy
George Karpenkov geo...@metaworld.ru writes: Hi All, I've managed to corrupt my very valuable repository with a recursive sed which went wrong. I wanted to convert all tabs to spaces with the following command: find ./ -name '*.*' -exec sed -i 's/\t//g' {} \; Clearly, this is a

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread John Keeping
On Mon, Jan 14, 2013 at 01:06:16PM +0100, Matthieu Moy wrote: George Karpenkov geo...@metaworld.ru writes: I've managed to corrupt my very valuable repository with a recursive sed which went wrong. I wanted to convert all tabs to spaces with the following command: find ./ -name '*.*' -exec

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread Johannes Sixt
Am 1/14/2013 12:40, schrieb George Karpenkov: I've managed to corrupt my very valuable repository with a recursive sed which went wrong. I wanted to convert all tabs to spaces with the following command: find ./ -name '*.*' -exec sed -i 's/\t//g' {} \; I think that has changed not

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 09:17:57AM +0100, Joachim Schmitz wrote: For the curious, the original version of the patch[1] read: + if (prefixcmp(var, tarfilter.)) + return 0; + dot = strrchr(var, '.'); + if (dot == var + 9) + return 0; and when

Re: [BUG] Possible bug in `remote set-url --add --push`

2013-01-14 Thread Michael J Gruber
Jardel Weyrich venit, vidit, dixit 12.01.2013 10:33: On Sat, Jan 12, 2013 at 6:44 AM, Sascha Cunz sascha...@babbelbox.org wrote: Am Freitag, 11. Januar 2013, 23:10:36 schrieb Junio C Hamano: Jardel Weyrich jweyr...@gmail.com writes: I believe `remote set-url --add --push` has a bug. Performed

Re: [PATCH] rebase --preserve-merges keeps empty merge commits

2013-01-14 Thread Neil Horman
On Sat, Jan 12, 2013 at 03:46:01PM -0500, Phil Hord wrote: Since 90e1818f9a (git-rebase: add keep_empty flag, 2012-04-20) 'git rebase --preserve-merges' fails to preserve empty merge commits unless --keep-empty is also specified. Merge commits should be preserved in order to preserve the

Re: [PATCH] rebase --preserve-merges keeps empty merge commits

2013-01-14 Thread Matthieu Moy
Phil Hord ho...@cisco.com writes: Subject: [PATCH] rebase --preserve-merges keeps empty merge commits I would rephrase it as rebase --preserve-merges: keep empty merge commits we usually give orders in commit messages, not state facts (it's not clear from the existing subject line whether

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 04:44:24AM -0800, Jeff King wrote: Wouldn't it then be better ti use strlen(tar) rather than a 3? Or at least a comment? [...] We could also potentially encapsulate it in a function. I think the diff code has a very similar block. Here's a series that does that,

[PATCH 1/6] config: add helper function for parsing key names

2013-01-14 Thread Jeff King
The config callback functions get keys of the general form: section.subsection.key (where the subsection may be contain arbitrary data, or may be missing). For matching keys without subsections, it is simple enough to call strcmp. Matching keys with subsections is a little more complicated,

[PATCH 2/6] archive-tar: use match_config_key when parsing config

2013-01-14 Thread Jeff King
This is fewer lines of code, but more importantly, fixes a bogus pointer offset. We are looking for tar. in the section, but later assume that the dot we found is at offset 9, not 3. This is a holdover from an earlier iteration of 767cf45 which called the section tarfilter. As a result, we could

[PATCH 3/6] convert some config callbacks to match_config_key

2013-01-14 Thread Jeff King
This is easier to read and avoids magic offset constants which need to be in sync with the section-name we provide. Signed-off-by: Jeff King p...@peff.net --- convert.c | 6 +- ll-merge.c | 6 +- userdiff.c | 13 +++-- 3 files changed, 5 insertions(+), 20 deletions(-) diff

[PATCH 4/6] userdiff: drop parse_driver function

2013-01-14 Thread Jeff King
When we parse userdiff config, we generally assume that diff.name.key will affect the key value of the name driver. However, without checking the key, we conflict with the ancient diff.color.* namespace. The current code is careful not to even create a driver struct if we do not see a key that

[PATCH 5/6] submodule: use match_config_key when parsing config

2013-01-14 Thread Jeff King
This makes the code a lot simpler to read by dropping a whole bunch of constant offsets. As a bonus, it means we also feed the whole config variable name to our error functions: [before] $ git -c submodule.foo.fetchrecursesubmodules=bogus checkout fatal: bad foo.fetchrecursesubmodules

Re: git list files

2013-01-14 Thread Jeff King
On Sun, Jan 13, 2013 at 11:08:32PM -0800, Jonathan Nieder wrote: Jeff King wrote: As far as I recall, that script works. However, I have a pure-C blame-tree implementation that is much faster, which may also be of interest. I need to clean up and put a few finishing touches on it to

[PATCH] pretty: use prefixcmp instead of memcmp on NUL-terminated strings

2013-01-14 Thread René Scharfe
This conversion avoids the need for magic string length numbers in the code. And unlike memcmp(), prefixcmp() is careful to not run over the end of a string. Signed-off-by: Rene Scharfe rene.scha...@lsrfire.ath.cx --- pretty.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCH 3/6] convert some config callbacks to match_config_key

2013-01-14 Thread Jonathan Nieder
Jeff King wrote: --- a/convert.c +++ b/convert.c @@ -465,10 +465,8 @@ static int read_convert_config(const char *var, const char *value, void *cb) * External conversion drivers are configured using * filter.name.variable. */ - if (prefixcmp(var, filter.) || (ep =

Re: [PATCH 3/6] convert some config callbacks to match_config_key

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 08:55:28AM -0800, Jonathan Nieder wrote: Jeff King wrote: --- a/convert.c +++ b/convert.c @@ -465,10 +465,8 @@ static int read_convert_config(const char *var, const char *value, void *cb) * External conversion drivers are configured using *

Re: [PATCH] rebase --preserve-merges keeps empty merge commits

2013-01-14 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Phil Hord ho...@cisco.com writes: Subject: [PATCH] rebase --preserve-merges keeps empty merge commits I would rephrase it as rebase --preserve-merges: keep empty merge commits we usually give orders in commit messages, not state facts

Re: git list files

2013-01-14 Thread Стойчо Слепцов
I went through your initial thread about blame-tree, and it is really very very (+very) close to answer my question. Thanks for writing it, if it comes one day to git, I will use it. As for: 'I guess people's eyes and brains are trained by the old school file boundaries matter way of thinking'

Re: [PATCH v2 2/3] push: Add support for pre-push hooks

2013-01-14 Thread Junio C Hamano
Aaron Schrab aa...@schrab.com writes: Add support for a pre-push hook which can be used to determine if the set of refs to be pushed is suitable for the target repository. The hook is run with two arguments specifying the name and location of the destination repository. Information about

Re: [PATCH v2 3/3] Add sample pre-push hook script

2013-01-14 Thread Junio C Hamano
Aaron Schrab aa...@schrab.com writes: Create a sample of a script for a pre-push hook. The main purpose is to illustrate how a script may parse the information which is supplied to such a hook. The script may also be useful to some people as-is for avoiding to push commits which are marked

Re: [PATCH v2 0/3] pre-push hook support

2013-01-14 Thread Junio C Hamano
Aaron Schrab aa...@schrab.com writes: Main changes since the initial version: * The first patch converts the existing hook callers to use the new find_hook() function. * Information about what is to be pushed is now sent over a pipe rather than passed as command-line parameters.

Re: [PATCH] rebase --preserve-merges keeps empty merge commits

2013-01-14 Thread Phil Hord
Junio C Hamano wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Phil Hord ho...@cisco.com writes: Subject: [PATCH] rebase --preserve-merges keeps empty merge commits I would rephrase it as rebase --preserve-merges: keep empty merge commits we usually give orders in commit

Re: [PATCH] t0050: mark TC merge (case change) as success

2013-01-14 Thread Torsten Bögershausen
On 14.01.13 00:24, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: The test merge (case change) passes on a case ignoring file system Use test_expect_success to remove the known breakage vanished Signed-off-by: Torsten Bögershausen tbo...@web.de --- Interesting. When

Re: [PATCH 3/6] convert some config callbacks to match_config_key

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 09:06:10AM -0800, Jeff King wrote: struct config_key k; parse_config_key(k, var); if (strcmp(k.section, filter) || k.subsection)) return 0; would be a better start (or having git_config do the first two lines itself before triggering the callback).

Re: [PATCH 1/6] config: add helper function for parsing key names

2013-01-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: The config callback functions get keys of the general form: section.subsection.key (where the subsection may be contain arbitrary data, or may be missing). For matching keys without subsections, it is simple enough to call strcmp. Matching keys with

[PATCH] clone: do not export and unexport GIT_CONFIG

2013-01-14 Thread Junio C Hamano
Earlier, dc87183 (use GIT_CONFIG only in git config, not other programs, 2008-06-30) made sure that the environment variable is never used outside git config, but git clone, after creating a directory for the new repository and until the init_db() function populates its .git/ directory, exported

Re: [PATCH] remote-hg: store converted URL

2013-01-14 Thread Junio C Hamano
Max Horn m...@quendi.de writes: From: Felipe Contreras felipe.contre...@gmail.com Mercurial might convert the URL to something more appropriate, like an absolute path. What it is converted *TO* is fairly clear with , like an ..., but from the first reading it was unclear to me what it is

Re: [PATCH 2/3] config: Introduce diff.algorithm variable

2013-01-14 Thread Junio C Hamano
Michal Privoznik mpriv...@redhat.com writes: Some users or projects prefer different algorithms over others, e.g. patience over myers or similar. However, specifying appropriate argument every time diff is to be used is impractical. Moreover, creating an alias doesn't play nicely with other

Re: [PATCH 3/3] diff: Introduce --diff-algorithm command line option

2013-01-14 Thread Junio C Hamano
Michal Privoznik mpriv...@redhat.com writes: Since command line options have higher priority than config file variables and taking previous commit into account, we need a way how to specify myers algorithm on command line. Yes. We cannot stop at [2/3] without this patch. However,

Re: [PATCH 00/14] Remove unused code from imap-send.c

2013-01-14 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 01/14/2013 07:57 AM, Jonathan Nieder wrote: Michael Haggerty wrote: imap-send.c | 286 +--- 1 file changed, 39 insertions(+), 247 deletions(-) See my replies for comments on

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes: Am 1/14/2013 12:40, schrieb George Karpenkov: I've managed to corrupt my very valuable repository with a recursive sed which went wrong. I wanted to convert all tabs to spaces with the following command: find ./ -name '*.*' -exec sed -i 's/\t/

Re: [BUG] Possible bug in `remote set-url --add --push`

2013-01-14 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: It seems to me that everything works as designed, and that the man page talk about push URLs can be read in two ways,... Hmph, but I had an impression that Jardel's original report was that one of the --add --pushurl was not adding but was

Re: [PATCH 3/3] diff: Introduce --diff-algorithm command line option

2013-01-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Michal Privoznik mpriv...@redhat.com writes: ... diff --git a/merge-recursive.c b/merge-recursive.c index d882060..53d8feb 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2068,6 +2068,12 @@ int parse_merge_opt(struct merge_options *o,

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Everybody seems to be getting an impression that .idx is the only thing that got corrupt. Where does that come from? It's the only thing that appear in the error message. This does not imply that it is the only corrupt thing, but gives a little hope

[PATCH] builtin/reset.c: Fix a sparse warning

2013-01-14 Thread Ramsay Jones
In particular, sparse issues an symbol not declared. Should it be static? warning for the 'parse_args' function. Since this function does not require greater than file visibility, we suppress this warning by simply adding the static modifier to it's decalaration. Signed-off-by: Ramsay Jones

Re: [PATCH] builtin/reset.c: Fix a sparse warning

2013-01-14 Thread Martin von Zweigbergk
On Mon, Jan 14, 2013 at 11:28 AM, Ramsay Jones ram...@ramsay1.demon.co.uk wrote: In particular, sparse issues an symbol not declared. Should it be static? warning for the 'parse_args' function. Since this function does not require greater than file visibility, we suppress this warning by

[PATCH v2 1/3] git-completion.bash: Autocomplete --minimal and --histogram for git-diff

2013-01-14 Thread Michal Privoznik
Even though --patience was already there, we missed --minimal and --histogram for some reason. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash

[PATCH v2 2/3] config: Introduce diff.algorithm variable

2013-01-14 Thread Michal Privoznik
Some users or projects prefer different algorithms over others, e.g. patience over myers or similar. However, specifying appropriate argument every time diff is to be used is impractical. Moreover, creating an alias doesn't play nicely with other tools based on diff (git-show for instance). Hence,

[PATCH v2 3/3] diff: Introduce --diff-algorithm command line option

2013-01-14 Thread Michal Privoznik
Since command line options have higher priority than config file variables and taking previous commit into account, we need a way how to specify myers algorithm on command line. However, inventing `--myers` is not the right answer. We need far more general option, and that is `--diff-algorithm`.

[PATCH v2 0/3] Rework git-diff algorithm selection

2013-01-14 Thread Michal Privoznik
It's been a while I was trying to get this in. Recently, I realized how important this is. Please keep me CC'ed as I am not subscribed to the list. diff to v1: -Junio's suggestions worked in Michal Privoznik (3): git-completion.bash: Autocomplete --minimal and --histogram for git-diff

Re: Announcing git-reparent

2013-01-14 Thread Andreas Schwab
Piotr Krukowiecki piotr.krukowie...@gmail.com writes: Just wondering, is the result different than something like git checkout commit_to_reparent cp -r * ../snapshot/ git reset --hard new_parent rm -r * cp -r ../snapshot/* . git add -A I think you are looking for git reset --soft

Re: Announcing git-reparent

2013-01-14 Thread Mark Lodato
On Mon, Jan 14, 2013 at 3:03 AM, Piotr Krukowiecki piotr.krukowie...@gmail.com wrote: Just wondering, is the result different than something like git checkout commit_to_reparent cp -r * ../snapshot/ git reset --hard new_parent rm -r * cp -r ../snapshot/* . git add -A (assumes 1 parent,

Re: [PATCH v2 2/3] config: Introduce diff.algorithm variable

2013-01-14 Thread Junio C Hamano
Michal Privoznik mpriv...@redhat.com writes: +static long parse_algorithm_value(const char *value) +{ + if (!value || !strcasecmp(value, myers)) + return 0; [diff] algorithm should probably error out. Also it is rather unusual to parse the keyword values case

Re: [PATCH v2 3/3] diff: Introduce --diff-algorithm command line option

2013-01-14 Thread Junio C Hamano
Michal Privoznik mpriv...@redhat.com writes: +--diff-algorithm={patience|minimal|histogram|myers}:: + Choose a diff algorithm. The variants are as follows: ++ +-- +`myers`;; + The basic greedy diff algorithm. +`minimal`;; + Spend extra time to make sure the smallest possible

Re: [PATCH] am: invoke perl's strftime in C locale

2013-01-14 Thread Junio C Hamano
Dmitry V. Levin l...@altlinux.org writes: This fixes hg patch format support for locales other than C and en_*, see https://bugzilla.altlinux.org/show_bug.cgi?id=28248 Signed-off-by: Dmitry V. Levin l...@altlinux.org --- Thanks. The reference URL is not very friendly, and you should be

Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields

2013-01-14 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: diff --git a/read-cache.c b/read-cache.c index fda78bc..f7fe15d 100644 --- a/read-cache.c +++ b/read-cache.c @@ -197,8 +197,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) } if (ce-ce_mtime.sec !=

Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields

2013-01-14 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: @@ -566,6 +566,31 @@ static int git_default_core_config(const char *var, const char *value) trust_ctime = git_config_bool(var, value); return 0; } + if (!strcmp(var, core.ignorezerostat)) { +

What's cooking in git.git (Jan 2013, #06; Mon, 14)

2013-01-14 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. As usual, this cycle is expected to last for 8 to 10 weeks, with a preview -rc0 sometime in the middle of next month. You can find the changes

[PATCH v2] am: invoke perl's strftime in C locale

2013-01-14 Thread Dmitry V. Levin
This fixes hg patch format support for locales other than C and en_*. Before the change, git-am was making Date: line from hg changeset metadata according to the current locale, and this line was rejected later with invalid date format diagnostics because localized date strings are not supported.

git grep performance regression

2013-01-14 Thread Ross Lagerwall
Hi, I have noticed a performance regression in git grep between v1.8.1 and v1.8.1.1: On the kernel tree: For git 1.8.1: $ time git grep foodsgsg real 0m0.158s user 0m0.290s sys0m0.207s For git 1.8.1.1: $ time /tmp/g/bin/git grep foodsgsg real 0m0.501s user 0m0.707s sys0m0.493s

Re: [PATCH v2 0/3] pre-push hook support

2013-01-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Aaron Schrab aa...@schrab.com writes: Main changes since the initial version: * The first patch converts the existing hook callers to use the new find_hook() function. * Information about what is to be pushed is now sent over a pipe rather

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread George Karpenkov
Thanks everyone! Progress so far: After executing reverse sed command: find .git -name '*.*' -exec sed -i 's//\t/g' {} \; And trying to switch the branch I get: git checkout X error: failed to read object 51a980792f26875d00acb79a19f043420f542cfa at offset 41433013 from

[RFC/PATCH] ignore memcmp() overreading in bsearch() callback

2013-01-14 Thread Junio C Hamano
It appears that memcmp() uses the usual one word at a time comparison and triggers valgrind in a callback of bsearch() used in the refname search. I can easily trigger problems in any script with test_commit (e.g. sh t0101-at-syntax.sh --valgrind -i -v) without this suppression. Signed-off-by:

Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields

2013-01-14 Thread Robin Rosenberg
- Ursprungligt meddelande - Robin Rosenberg robin.rosenb...@dewire.com writes: diff --git a/read-cache.c b/read-cache.c index fda78bc..f7fe15d 100644 --- a/read-cache.c +++ b/read-cache.c @@ -197,8 +197,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread Philip Oakley
From: George Karpenkov geo...@metaworld.ru Sent: Monday, January 14, 2013 10:57 PM Thanks everyone! Progress so far: After executing reverse sed command: find .git -name '*.*' -exec sed -i 's//\t/g' {} \; Have you counted how many substitutions there are in the pack file(s). It may be

[PATCH v3] Make git selectively and conditionally ignore certain stat fields

2013-01-14 Thread Robin Rosenberg
Specifically the fields uid, gid, ctime, ino and dev are set to zero by JGit. Any stat checking by git will then need to check content, which may be very slow, particularly on Windows. Since mtime and size is typically enough we should allow the user to tell git to avoid checking these fields if

Re: [RFC/PATCH] ignore memcmp() overreading in bsearch() callback

2013-01-14 Thread Johannes Schindelin
Hi Junio, On Mon, 14 Jan 2013, Junio C Hamano wrote: It appears that memcmp() uses the usual one word at a time comparison and triggers valgrind in a callback of bsearch() used in the refname search. I can easily trigger problems in any script with test_commit (e.g. sh t0101-at-syntax.sh

Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields

2013-01-14 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: Semantically they're somewhat different. My flags are for ignoring a value when it's not used as indicated by the value zero, while trustctime is for ignoring untrustworthy, non-zero, values. Yeah, I realized that after writing that message.

Re: [PATCH v2 0/3] pre-push hook support

2013-01-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Junio C Hamano gits...@pobox.com writes: Aaron Schrab aa...@schrab.com writes: Main changes since the initial version: * The first patch converts the existing hook callers to use the new find_hook() function. * Information about what is to be

Re: [PATCH v2 2/3] push: Add support for pre-push hooks

2013-01-14 Thread Junio C Hamano
Aaron Schrab aa...@schrab.com writes: t/t5571-pre-push-hook.sh | 129 + diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh new file mode 100755 index 000..d68fed7 --- /dev/null +++ b/t/t5571-pre-push-hook.sh @@ -0,0 +1,129

Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields

2013-01-14 Thread Robin Rosenberg
Is this the user edits in eclipse and then runs 'git status' from the terminal problem? Yes. Of course not just status, but any command that validates the index. On Unix this is usually bearable, though slow, but on Windows I often see git status take minutes (yes large files...). -- robin

[PATCH 00/14] git p4 branch handling fixes

2013-01-14 Thread Pete Wyckoff
There are multiple oddities in how git-p4 treats multiple p4 branches, as created with clone or sync and the '--branch' argument. Olivier reported some of these recently in http://thread.gmane.org/gmane.comp.version-control.git/212613 There are two observable behavior changes, but they are in

[PATCH 01/14] git p4: test sync/clone --branch behavior

2013-01-14 Thread Pete Wyckoff
Add failing tests to document behavior when there are multiple p4 branches, as created using the --branch option. In particular: Using clone --branch populates the specified branch correctly, but dies with an error when trying to checkout master. Calling sync without a master branch dies with

[PATCH 02/14] git p4: rearrange and simplify hasOrigin handling

2013-01-14 Thread Pete Wyckoff
Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/git-p4.py b/git-p4.py index 69f1452..68f7458 100755 --- a/git-p4.py +++ b/git-p4.py @@ -2754,23 +2754,23 @@ class P4Sync(Command, P4UserMap):

[PATCH 03/14] git p4: add comments to p4BranchesInGit

2013-01-14 Thread Pete Wyckoff
Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/git-p4.py b/git-p4.py index 68f7458..03680b0 100755 --- a/git-p4.py +++ b/git-p4.py @@ -553,27 +553,36 @@ def gitConfigList(key):

[PATCH 04/14] git p4: inline listExistingP4GitBranches

2013-01-14 Thread Pete Wyckoff
It is four lines of code used in only one place. Simplify by including it where it is used. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/git-p4.py b/git-p4.py index 03680b0..8814049 100755 ---

[PATCH 05/14] git p4: create p4/HEAD on initial clone

2013-01-14 Thread Pete Wyckoff
There is code to create a symbolic reference from p4/HEAD to p4/master. This allows saying git show p4 as a shortcut to git show p4/master, for example. But this reference was only created on the second git p4 sync (or first sync after a clone). Make it work on the initial clone or sync.

[PATCH 06/14] git p4: verify expected refs in clone --bare test

2013-01-14 Thread Pete Wyckoff
Make sure that the standard branches are created as expected. Signed-off-by: Pete Wyckoff p...@padd.com --- t/t9800-git-p4-basic.sh | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh index 8c59796..166e752 100755 ---

[PATCH 09/14] git p4: allow short ref names to --branch

2013-01-14 Thread Pete Wyckoff
For a clone or sync, --branch says where the newly imported branch should go, or which existing branch to sync up. It takes an argument, which is currently either something that starts with refs/, or if not, refs/heads/p4 is prepended. Putting it in heads seems like a bad default; these should

[PATCH 11/14] git p4: fail gracefully on sync with no master branch

2013-01-14 Thread Pete Wyckoff
If --branch was used to build a repository with no refs/remotes/p4/master, future syncs will not know which branch to sync. Notice this situation and print a helpful error message. Signed-off-by: Pete Wyckoff p...@padd.com --- git-p4.py | 29 +++--

[PATCH 12/14] git p4: fix sync --branch when no master branch

2013-01-14 Thread Pete Wyckoff
It is legal to sync a branch with a different name than refs/remotes/p4/master, and to do so even when master does not exist. Signed-off-by: Pete Wyckoff p...@padd.com --- Documentation/git-p4.txt | 5 + git-p4.py | 14 +++--- t/t9806-git-p4-options.sh | 8

[PATCH 14/14] git p4: fix submit when no master branch

2013-01-14 Thread Pete Wyckoff
It finds its upstream and applies the commit properly, but the sync step will fail unless it is told which branch to work on. Signed-off-by: Pete Wyckoff p...@padd.com --- Documentation/git-p4.txt | 5 + git-p4.py | 6 +- t/t9806-git-p4-options.sh | 25

Re: Error:non-monotonic index after failed recursive sed command

2013-01-14 Thread George Karpenkov
Happy ending! Turns out i have actually made a backup 3 days ago. My other work was on a branch + in a stash. Commits done on a branch were already present in a backup. I was able to get the stash working by copying corrupted .pack files from the backup, luckily all the new work wasn't packed

Re: [RFC/PATCH] ignore memcmp() overreading in bsearch() callback

2013-01-14 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: On Mon, 14 Jan 2013, Junio C Hamano wrote: It appears that memcmp() uses the usual one word at a time comparison and triggers valgrind in a callback of bsearch() used in the refname search. I can easily trigger problems in any script

Re: git grep performance regression

2013-01-14 Thread Duy Nguyen
On Tue, Jan 15, 2013 at 5:38 AM, Ross Lagerwall rosslagerw...@gmail.com wrote: Hi, I have noticed a performance regression in git grep between v1.8.1 and v1.8.1.1: On the kernel tree: For git 1.8.1: $ time git grep foodsgsg real 0m0.158s user 0m0.290s sys0m0.207s For git

Re: git grep performance regression

2013-01-14 Thread Junio C Hamano
Ross Lagerwall rosslagerw...@gmail.com writes: I have noticed a performance regression in git grep between v1.8.1 and v1.8.1.1: On the kernel tree: For git 1.8.1: $ time git grep foodsgsg real 0m0.158s user 0m0.290s sys0m0.207s For git 1.8.1.1: $ time /tmp/g/bin/git grep

[PATCH] attr: make it build with DEBUG_ATTR again

2013-01-14 Thread Nguyễn Thái Ngọc Duy
Commit 82dce99 (attr: more matching optimizations from .gitignore - 2012-10-15) changed match_attr structure but it did not update DEBUG_ATTR-specific code. This fixes it. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: What's cooking in git.git (Jan 2013, #06; Mon, 14)

2013-01-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: [New Topics] * jc/cvsimport-upgrade (2013-01-14) 8 commits - t9600: adjust for new cvsimport - t9600: further prepare for sharing - cvsimport-3: add a sample test - cvsimport: make tests reusable for cvsimport-3 - cvsimport: start adding cvsps

Re: [PATCH v2 2/3] push: Add support for pre-push hooks

2013-01-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: At least the attached patch is necessary. Sorry, but the last hunk (see below) is not. It breaks the hook. In the longer term, we may want to discuss what should happen when the hook exited without even reading what we fed. My gut feeling is that

Re: git grep performance regression

2013-01-14 Thread Duy Nguyen
On Tue, Jan 15, 2013 at 9:46 AM, Duy Nguyen pclo...@gmail.com wrote: I don't have time to look into details now, but by enabling DEBUG_ATTR, it looks like this commit makes it push and pop patterns a lot more than without the commit. I think the culprit is at this chunk: static void

Re: [BUG] Possible bug in `remote set-url --add --push`

2013-01-14 Thread Jardel Weyrich
On 14/01/2013, at 17:09, Junio C Hamano gits...@pobox.com wrote: Michael J Gruber g...@drmicha.warpmail.net writes: It seems to me that everything works as designed, and that the man page talk about push URLs can be read in two ways,... Hmph, but I had an impression that Jardel's original

[PATCH v2 03/19] reset.c: pass pathspec around instead of (prefix, argv) pair

2013-01-14 Thread Martin von Zweigbergk
We use the path arguments in two places in reset.c: in interactive_reset() and read_from_tree(). Both of these call get_pathspec(), so we pass the (prefix, argv) pair to both functions. Move the call to get_pathspec() out of these methods, for two reasons: 1) One argument is simpler than two. 2)

[PATCH v2 04/19] reset: don't allow git reset -- $pathspec in bare repo

2013-01-14 Thread Martin von Zweigbergk
Running e.g. git reset . in a bare repo results in an index file being created from the HEAD commit. The differences compared to the index are then printed as usual, but since there is no worktree, it will appear as if all files are deleted. For example, in a bare clone of git.git: Unstaged

[PATCH v2 01/19] reset $pathspec: no need to discard index

2013-01-14 Thread Martin von Zweigbergk
Since 34110cd (Make 'unpack_trees()' have a separate source and destination index, 2008-03-06), the index no longer gets clobbered by do_diff_cache() and we can remove the code for discarding and re-reading it. There are two paths to update_index_refresh() from cmd_reset(), but on both paths,

[PATCH v2 02/19] reset $pathspec: exit with code 0 if successful

2013-01-14 Thread Martin von Zweigbergk
git reset $pathspec currently exits with a non-zero exit code if the worktree is dirty after resetting, which is inconsistent with reset without pathspec, and it makes it harder to know whether the command really failed. Change it to exit with code 0 regardless of whether the worktree is dirty so

[PATCH v2 17/19] reset $sha1 $pathspec: require $sha1 only to be treeish

2013-01-14 Thread Martin von Zweigbergk
Resetting with paths does not update HEAD and there is nothing else that a commit should be needed for. Relax the argument parsing so only a tree is required. The sha1 is only passed to read_from_tree(), which already only requires a tree. The rev variable we pass to run_add_interactive() will

[PATCH v2 19/19] reset [--mixed]: use diff-based reset whether or not pathspec was given

2013-01-14 Thread Martin von Zweigbergk
Thanks to b65982b (Optimize diff-index --cached using cache-tree, 2009-05-20), resetting with paths is much faster than resetting without paths. Some timings for the linux-2.6 repo to illustrate this (best of five, warm cache): reset reset . real0m0.219s0m0.080s user

  1   2   >