Re: [PATCH v2] wt-status: Show ignored files in untracked dirs

2012-12-28 Thread Jeff King
On Fri, Dec 28, 2012 at 03:05:30PM +0100, Antoine Pelisse wrote: > Using the example from Michael's mail, I end up having this: > $ git status --porcelain --ignored > ?? .gitignore > ?? x > ?? y/ > !! x.ignore-me > !! y/ > > y/ is referred as untracked, because it contains untracked files, and >

Re: [PATCH] refs: do not use cached refs in repack_without_ref

2012-12-28 Thread Jeff King
On Wed, Dec 26, 2012 at 09:24:39AM +0100, Michael Haggerty wrote: > I'm sorry to take so long to respond to this patch. Thank you for > tracking down this bug and for your careful analysis. > > I think your patch is correct and should fix the first race condition > that you described. Thanks fo

Re: [RFC] pack-objects: compression level for non-blobs

2012-12-28 Thread Jeff King
On Sat, Dec 29, 2012 at 12:25:04PM +0700, Nguyen Thai Ngoc Duy wrote: > > But just dropping the compression (or doing partial > > decompression when we only care about the beginning part) is way less > > code and complexity. > > I think I tried the partial decompression for commit header and it d

Re: [RFC] pack-objects: compression level for non-blobs

2012-12-28 Thread Nguyen Thai Ngoc Duy
On Sat, Dec 29, 2012 at 12:07 PM, Jeff King wrote: > On Sat, Dec 29, 2012 at 11:34:09AM +0700, Nguyen Thai Ngoc Duy wrote: > >> On Sat, Dec 29, 2012 at 7:41 AM, Jeff King wrote: >> > I wonder if we could do even better, though. For a traversal, we only >> > need to look at the commit header. We c

Re: [RFC] pack-objects: compression level for non-blobs

2012-12-28 Thread Jeff King
On Sat, Dec 29, 2012 at 11:34:09AM +0700, Nguyen Thai Ngoc Duy wrote: > On Sat, Dec 29, 2012 at 7:41 AM, Jeff King wrote: > > I wonder if we could do even better, though. For a traversal, we only > > need to look at the commit header. We could potentially do a progressive > > inflate and stop bef

Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.

2012-12-28 Thread Eric S. Raymond
Heiko Voigt : > Maybe you could add that information to the parsecvs compile > instructions? I think just because it takes some effort to compile does > not justify to remove this useful pointer here. When I was converting a > legacy cvs repository this pointer would have helped me a lot. I'm pars

Re: [RFC] pack-objects: compression level for non-blobs

2012-12-28 Thread Nguyen Thai Ngoc Duy
On Sat, Dec 29, 2012 at 7:41 AM, Jeff King wrote: > I wonder if we could do even better, though. For a traversal, we only > need to look at the commit header. We could potentially do a progressive > inflate and stop before getting to the commit message (which is the bulk > of the data, and the par

Re: [PATCH] Use longer alias names in subdirectory tests

2012-12-28 Thread Junio C Hamano
Aaron Schrab writes: > When testing aliases in t/t1020-subdirectory.sh use longer names so that > they're less likely to conflict with a git-* command somewhere in the > $PATH. Thanks. In the longer term we might want to rethink the way we run the tests so that random $PATH the user has has les

Re: [PATCH v3 19/19] Add git-check-ignore sub-command

2012-12-28 Thread Adam Spiers
On Sat, Dec 29, 2012 at 01:23:52AM +, Adam Spiers wrote: > FYI, attached is the diff between check-ignore-v3 and my current > check-ignore, which is available at github: > > https://github.com/aspiers/git/commits/check-ignore [snipped] > diff --git a/pathspec.c b/pathspec.c > index 67241

Re: [PATCH 1/4] hooks: Add function to check if a hook exists

2012-12-28 Thread Junio C Hamano
Aaron Schrab writes: > Create find_hook() function to determine if a given hook exists and is > executable. If it is the path to the script will be returned, otherwise > NULL is returned. Sounds like a sensible thing to do. To make sure the API is also sensible, all the existing hooks should b

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

2012-12-28 Thread Junio C Hamano
Aaron Schrab writes: > There have been at least a couple of submissions to add support for a > pre-push hook, which were rejected at least partially because they didn't > provide enough information to a hook script for it to determine what was > to be pushed any better than a separate wrapper aro

Re: [PATCH v3 18/19] setup.c: document get_pathspec()

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > I've added this sentence to the top of the comments above > get_pathspec(): > > /* > * N.B. get_pathspec() is deprecated in favor of the "struct pathspec" > * based interface - see pathspec_magic above. > * > [...] > > That should be sufficient to disc

Re: [PATCH v3 19/19] Add git-check-ignore sub-command

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 01:21:02PM -0800, Junio C Hamano wrote: > Adam Spiers writes: > > +static void output_exclude(const char *path, struct exclude *exclude) > > +{ > > + char *bang = exclude->flags & EXC_FLAG_NEGATIVE ? "!" : ""; > > + char *dir = (exclude->flags & EXC_FLAG_MUSTBEDIR) ? "

Re: Lockless Refs?

2012-12-28 Thread Martin Fick
On Friday, December 28, 2012 09:58:36 am Junio C Hamano wrote: > Martin Fick writes: > > 3) To create a ref, it must be renamed from the null > > file (sha ...) to the new value just as if it were > > being updated from any other value, but there is one > > extra condition: before renaming th

Re: [PATCH v3 18/19] setup.c: document get_pathspec()

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:40 PM, Adam Spiers wrote: > On Fri, Dec 28, 2012 at 8:36 PM, Junio C Hamano wrote: >> Adam Spiers writes: >> >>> Since we have just created a new pathspec-handling library, now is a >>> good time to add some comments explaining get_pathspec(). >>> >>> Signed-off-by: Ada

Re: [RFC] pack-objects: compression level for non-blobs

2012-12-28 Thread Jeff King
On Mon, Nov 26, 2012 at 05:25:54PM +1100, David Michael Barr wrote: > The intent is to allow selective recompression of pack data. > For small objects/deltas the overhead of deflate is significant. > This may improve read performance for the object graph. > > I ran some unscientific experimen

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:45 PM, Adam Spiers wrote: > On Fri, Dec 28, 2012 at 8:32 PM, Junio C Hamano wrote: >> Adam Spiers writes: >> >>> diff --git a/pathspec.h b/pathspec.h >>> new file mode 100644 >>> index 000..8bb670b >>> --- /dev/null >>> +++ b/pathspec.h >>> @@ -0,0 +1,5 @@ >>> +exte

Re: Hold your fire, please

2012-12-28 Thread Junio C Hamano
Junio C Hamano writes: > Primarily in order to force me concentrate on the releng for the > upcoming release, and also to encourage contributors to focus on > finding and fixing any last minute regressions (rather than > distracting others by showing publicly scratching their itches), I > won't b

[PATCH] Use longer alias names in subdirectory tests

2012-12-28 Thread Aaron Schrab
When testing aliases in t/t1020-subdirectory.sh use longer names so that they're less likely to conflict with a git-* command somewhere in the $PATH. I have a git-ss command in my path which prevents the 'ss' alias from being used. This command will always fail for git.git, causing the test to fa

Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.

2012-12-28 Thread Heiko Voigt
Hi, On Fri, Dec 28, 2012 at 11:20:25AM -0500, Eric S. Raymond wrote: > The parsecvs code has been neglected for a long time, and the only > public version does not even build correctly. I have been handed > control of the project and intend to fix this, but until I do it > cannot be recommended.

[PATCH 3/4] push: Add support for pre-push hooks

2012-12-28 Thread Aaron Schrab
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 should be supplied with: 1. name of the remote being used, or the URL if not using a named remote 2. the URL to which we're pushing 3. descriptions

[PATCH 4/4] Add sample pre-push hook script

2012-12-28 Thread Aaron Schrab
Create a sample of a script for a pre-push hook. The main purpose is to illustrate how a script may parse the parameters which are supplied to such a hook. The script may also be useful to some people as-is for avoiding to push commits which are marked as a work in progress. Signed-off-by: Aaron

[PATCH 2/4] hooks: support variable number of parameters

2012-12-28 Thread Aaron Schrab
Define the run_hook_argv() function to allow hooks to be created where the number of parameters to be passed is variable. The existing run_hook() function uses stdarg to allow it to receive a variable number of arguments, but the number of arguments that a given caller is passing is fixed at compi

[PATCH 0/4] pre-push hook support

2012-12-28 Thread Aaron Schrab
There have been at least a couple of submissions to add support for a pre-push hook, which were rejected at least partially because they didn't provide enough information to a hook script for it to determine what was to be pushed any better than a separate wrapper around the 'git push' command woul

[PATCH 1/4] hooks: Add function to check if a hook exists

2012-12-28 Thread Aaron Schrab
Create find_hook() function to determine if a given hook exists and is executable. If it is the path to the script will be returned, otherwise NULL is returned. This is in support for an upcoming run_hook_argv() function which will expect the full path to the hook script as the first element in t

Re: [PATCH v3 00/19] new git check-ignore sub-command

2012-12-28 Thread Junio C Hamano
Antoine Pelisse writes: > I think they will interact, but I need to have a deeper look to Adam's series. > If it does, do you want me to base my work on the top of his branch ? Not necessarily. If it becomes absolutely necessary to introduce patch dependencies, I would rather see an addition of

Re: [PATCH v3 00/19] new git check-ignore sub-command

2012-12-28 Thread Junio C Hamano
After skimming the series twice quickly, I found that the early part of refactorings are excellently done. Making existing private functions into public needs a lot more careful thought on namings, I think, though. The end result looks promising. Thanks for a pleasant read. -- To unsubscribe fro

Re: [PATCH v3 19/19] Add git-check-ignore sub-command

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c > new file mode 100644 > index 000..c825736 > --- /dev/null > +++ b/builtin/check-ignore.c > @@ -0,0 +1,170 @@ > +#include "builtin.h" > +#include "cache.h" > +#include "dir.h" > +#include "quote.h" > +#include

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:48 PM, Junio C Hamano wrote: > Adam Spiers writes: > >> diff --git a/pathspec.c b/pathspec.c >> new file mode 100644 >> index 000..8aea0d2 >> --- /dev/null >> +++ b/pathspec.c >> @@ -0,0 +1,99 @@ >> +#include "cache.h" >> +#include "dir.h" >> +#include "pathspec.h" >

Re: [PATCH v3 17/19] pathspec.c: extract new validate_path() for reuse

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:44 PM, Junio C Hamano wrote: > Adam Spiers writes: > >> This will be reused by a new git check-ignore command. >> >> Signed-off-by: Adam Spiers >> --- >> pathspec.c | 20 ++-- >> pathspec.h | 1 + >> 2 files changed, 15 insertions(+), 6 deletions(-) >>

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > diff --git a/pathspec.c b/pathspec.c > new file mode 100644 > index 000..8aea0d2 > --- /dev/null > +++ b/pathspec.c > @@ -0,0 +1,99 @@ > +#include "cache.h" > +#include "dir.h" > +#include "pathspec.h" > + > +void fill_pathspec_matches(const char **pathspec, char *seen,

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:32 PM, Junio C Hamano wrote: > Adam Spiers writes: > >> diff --git a/pathspec.h b/pathspec.h >> new file mode 100644 >> index 000..8bb670b >> --- /dev/null >> +++ b/pathspec.h >> @@ -0,0 +1,5 @@ >> +extern char *find_used_pathspec(const char **pathspec); >> +extern v

Re: [PATCH v3 17/19] pathspec.c: extract new validate_path() for reuse

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > This will be reused by a new git check-ignore command. > > Signed-off-by: Adam Spiers > --- > pathspec.c | 20 ++-- > pathspec.h | 1 + > 2 files changed, 15 insertions(+), 6 deletions(-) > > diff --git a/pathspec.c b/pathspec.c > index 8aea0d2..6724121 10

Re: [PATCH v3 18/19] setup.c: document get_pathspec()

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:36 PM, Junio C Hamano wrote: > Adam Spiers writes: > >> Since we have just created a new pathspec-handling library, now is a >> good time to add some comments explaining get_pathspec(). >> >> Signed-off-by: Adam Spiers >> --- > > Yes, but we would rather not to see new

Re: [PATCH v2] log: grep author/committer using mailmap

2012-12-28 Thread Antoine Pelisse
> This is about your rewritten implementation that hasn't escaped to > the general public but sitting in 'next', right? > > Two things that immediately come to mind are: > > - initialization of lowermail can use strbuf_init() instead; > - downcasing can be done in place, i.e. "lowermail.buf[i] =

Re: [PATCH v3 18/19] setup.c: document get_pathspec()

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > Since we have just created a new pathspec-handling library, now is a > good time to add some comments explaining get_pathspec(). > > Signed-off-by: Adam Spiers > --- Yes, but we would rather not to see new users of this function added to our codebase in its current form, a

Re: git diff --ignore-space-at-eol issue

2012-12-28 Thread Antoine Pelisse
Then you should give the output of diff --stat, and he will be able to ignore files with no changes. The change was originally made for permission changes. diff --stat needs to show files have changed even though, indeed, there is no diff output. You could also use --numstat and filter out files

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > diff --git a/pathspec.h b/pathspec.h > new file mode 100644 > index 000..8bb670b > --- /dev/null > +++ b/pathspec.h > @@ -0,0 +1,5 @@ > +extern char *find_used_pathspec(const char **pathspec); > +extern void fill_pathspec_matches(const char **pathspec, char *seen, int >

Re: [PATCH v3 00/19] new git check-ignore sub-command

2012-12-28 Thread Antoine Pelisse
I think they will interact, but I need to have a deeper look to Adam's series. If it does, do you want me to base my work on the top of his branch ? On Fri, Dec 28, 2012 at 8:39 PM, Adam Spiers wrote: > On Fri, Dec 28, 2012 at 6:50 PM, Junio C Hamano wrote: >> Adam Spiers writes: >> >>> This v3

RE: git diff --ignore-space-at-eol issue

2012-12-28 Thread John Moon
> $ git diff --ignore-space-at-eol test.txt > $ git diff --ignore-space-at-eol --stat test.txt > test.txt | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > $ git diff --ignore-space-at-eol --name-status test.txt > M test.txt > > The idea is that even though diff doesn't show any differences

Re: [PATCH v3 00/19] new git check-ignore sub-command

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 6:50 PM, Junio C Hamano wrote: > Adam Spiers writes: > >> This v3 re-roll of my check-ignore series is a reasonably substantial >> revamp over v2, and applies on top of Junio's current >> nd/attr-match-optim-more branch (82dce998c202). > > Thanks. > > Does this (and should

Re: (unknown)

2012-12-28 Thread Junio C Hamano
e...@thyrsus.com (Eric S. Raymond) writes: > From: "Eric S. Raymond" > Date: Fri, 28 Dec 2012 11:40:59 -0500 > Subject: [PATCH] Add checks to Python scripts for version dependencies. > > --- > contrib/ciabot/ciabot.py | 8 +++- > ... > diff --git a/contrib/fast-import/import-zips.py

Re: [PATCH] Remove the suggestion to use parsecvs, which is currently broken.

2012-12-28 Thread Junio C Hamano
e...@thyrsus.com (Eric S. Raymond) writes: > The parsecvs code has been neglected for a long time, and the only > public version does not even build correctly. I have been handed > control of the project and intend to fix this, but until I do it > cannot be recommended. > > Also, the project URL

Re: [PATCH v3 00/19] new git check-ignore sub-command

2012-12-28 Thread Junio C Hamano
Adam Spiers writes: > This v3 re-roll of my check-ignore series is a reasonably substantial > revamp over v2, and applies on top of Junio's current > nd/attr-match-optim-more branch (82dce998c202). Thanks. Does this (and should this, if it doesn't) interact with the more recent discussion aroun

Re: [PATCH v2] log: grep author/committer using mailmap

2012-12-28 Thread Junio C Hamano
Antoine Pelisse writes: > Actually, gprof seems to be unhappy about the number of call to > strbuf_grow() in map_user() (25% of the time spent in map_user() is > spent in strbuf_grow()). > > That probably comes from the repeated call to strbuf_addch() when > lowering the email address. This is a

Re: [PATCH v2] log: grep author/committer using mailmap

2012-12-28 Thread Antoine Pelisse
Actually, gprof seems to be unhappy about the number of call to strbuf_grow() in map_user() (25% of the time spent in map_user() is spent in strbuf_grow()). That probably comes from the repeated call to strbuf_addch() when lowering the email address. At this point, we are also copying the '\0' for

Re: Lockless Refs?

2012-12-28 Thread Junio C Hamano
Martin Fick writes: > Hmm, actually I believe that with a small modification to the > semantics described here it would be possible to make multi > repo/branch commits work > > Shawn talked about adding multi repo/branch transaction > semantics to jgit, this might be something that git wan

Re: Lockless Refs?

2012-12-28 Thread Junio C Hamano
Martin Fick writes: > 3) To create a ref, it must be renamed from the null file (sha > ...) to the new value just as if it were being updated > from any other value, but there is one extra condition: > before renaming the null file, a full directory scan must be > done to ensure that the

Re: git diff --ignore-space-at-eol issue

2012-12-28 Thread Antoine Pelisse
> The --ignore-space-at-eol option is ignored when used in conjunction > with --name-status. > It works fine otherwise. Indeed the behavior of diff --stat, and etc has been corrected very recently to make it more consistent across all options. I don't know if the new behavior is exactly what you e

[no subject]

2012-12-28 Thread Eric S. Raymond
From: "Eric S. Raymond" Date: Fri, 28 Dec 2012 11:40:59 -0500 Subject: [PATCH] Add checks to Python scripts for version dependencies. --- contrib/ciabot/ciabot.py | 8 +++- contrib/fast-import/import-zips.py | 7 ++- contrib/hg-to-git/hg-to-git.py | 5 + contrib/p4impor

[PATCH] Remove the suggestion to use parsecvs, which is currently broken.

2012-12-28 Thread Eric S. Raymond
The parsecvs code has been neglected for a long time, and the only public version does not even build correctly. I have been handed control of the project and intend to fix this, but until I do it cannot be recommended. Also, the project URL given for Subversion needed to be updated to follow the

Re: Lockless Refs? (Was [PATCH] refs: do not use cached refs in repack_without_ref)

2012-12-28 Thread Martin Fick
On Thursday, December 27, 2012 04:11:51 pm Martin Fick wrote: > On Wednesday, December 26, 2012 01:24:39 am Michael > Haggerty > > wrote: > > ... lots of discussion about ref locking... > > It concerns me that git uses any locking at all, even for > refs since it has the potential to leave around

Re: [PATCH v2] wt-status: Show ignored files in untracked dirs

2012-12-28 Thread Antoine Pelisse
Hey Peff, I actually have an issue with the behavior we discussed (referenced as 1.A.) Using the example from Michael's mail, I end up having this: $ git status --porcelain --ignored ?? .gitignore ?? x ?? y/ !! x.ignore-me !! y/ y/ is referred as untracked, because it contains untracked files, an

Re: Installation Plan

2012-12-28 Thread Enrico Weigelt
> 7) Clone new repository for development and testing on Windows. (Do I > need the shared drive any more?) Not necessarily, depending on how to connect your local repo to the remote one (your central repo). I'd suggest using ssh protocol: in this case your windows box will connect to the linux bo