Re: What's cooking in git.git (Sep 2013, #03; Wed, 11)

2013-09-12 Thread Johannes Sixt
Am 9/12/2013 1:32, schrieb Junio C Hamano: * jc/ref-excludes (2013-09-03) 2 commits - document --exclude option - revision: introduce --exclude=glob to tame wildcards People often wished a way to tell git log --branches (and git log --remotes --not --branches) to exclude some local

RE: This is sequel to your non-response of my earlier letter to you

2013-09-12 Thread Barr Brenda Hoffman
Dear Friend After five years of waiting the crown (British government) has given me the power to contact you so that you become the beneficiary to total amount £15,000,000.00 GBP in the intent of the deceased who died without a will. I am contacting you because I believe you are related. Please

Re: Re-Transmission of blobs?

2013-09-12 Thread Josef Wolf
On Mi, Sep 11, 2013 at 10:14:54 -0700, Junio C Hamano wrote: Josef Wolf j...@raven.inka.de writes: On Di, Sep 10, 2013 at 10:51:02 -0700, Junio C Hamano wrote: Consider this simple history with only a handful of commits (as usual, time flows from left to right): E

Re: [PATCH] Windows: Do not redefine _WIN32_WINNT

2013-09-12 Thread Sebastian Schuberth
On Wed, Sep 11, 2013 at 11:51 PM, Junio C Hamano gits...@pobox.com wrote: It seems that compat/poll/poll.c also defines _WIN32_WINNT (but only with _MSC_VER defined). The change to git-compat-util.h in this patch avoids redefinition for both MinGW and MSVC case. Do you also need to have

[PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Jiang Xin
Tvangeste found that the relative_path function could not work properly on Windows if in and prefix have dos driver prefix. ($gmane/234434) e.g., When execute: test-path-utils relative_path C:/a/b D:/x/y, should return C:/a/b, but returns ../../C:/a/b, which is wrong. So make relative_path honor

Re: Re-Transmission of blobs?

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 09:42:41AM +0200, Josef Wolf wrote: There are some work being done to optimize this further using various techniques, but they are not ready yet. And this still stands. Do you have a pointer or something? I'd like to check out whether I can contribute to

[PATCH] git-gui: Modify push dialog to support Gerrit review

2013-09-12 Thread Joergen Edelbo
Problem: It is not possible to push for Gerrit review as you will always try to push to refs/heads/... on the remote. Changes done: Add an option in the Push dialog to select Gerrit review and a corresponding entry for a branch name. If this option is selected, push the changes to

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Sebastian Schuberth
On Wed, Sep 11, 2013 at 11:41 PM, Jeff King p...@peff.net wrote: I'm on Windows using MSYS / MinGW. Since MinGW runtime version 4.0, string.h contains the following code (see [1]): #ifndef __NO_INLINE__ __CRT_INLINE int __cdecl __MINGW_NOTHROW strncasecmp (const char * __sz1, const char *

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Tvangeste
Thank you, this fixes the problem with `git svn rebase` on Windows for me. --Tvangeste On Thu, Sep 12, 2013 at 11:12 AM, Jiang Xin worldhello@gmail.com wrote: Tvangeste found that the relative_path function could not work properly on Windows if in and prefix have dos driver prefix.

Re: [PATCH 1/2] wt-status: turn advice_status_hints into a field of wt_status

2013-09-12 Thread Matthieu Moy
Jeff King p...@peff.net writes: On Wed, Sep 11, 2013 at 11:08:58AM +0200, Matthieu Moy wrote: No behavior change in this patch, but this makes the display of status hints more flexible as they can be enabled or disabled for individual calls to commit.c:run_status(). [...] +static void

Re: [PATCH 1/2] wt-status: turn advice_status_hints into a field of wt_status

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 11:44:30AM +0200, Matthieu Moy wrote: That is clean, but a bit long and it is essentially duplicated between status and commit. I went another way: put all the similar code in a common function status_init_config: static void status_init_config(struct wt_status *s,

[PATCH] urlmatch: append_normalized_escapes can reallocate norm.buf

2013-09-12 Thread Thomas Rast
The calls to strbuf_add* within append_normalized_escapes() can reallocate the buffer passed to it. Therefore, the seg_start pointer into the string cannot be kept across such calls. The actual bug is from 3402a8d (config: add helper to normalize and match URLs, 2013-07-31). It can first be

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread John Keeping
On Thu, Sep 12, 2013 at 11:36:56AM +0200, Sebastian Schuberth wrote: Just wondering if that is the root of the problem, or if maybe there is something else subtle going on. Also, does __CRT_INLINE just turn into inline, or is there perhaps some other pre-processor magic going on? This is

[PATCH 1/4] pack v4: avoid strlen() in tree_entry_prefix

2013-09-12 Thread Nguyễn Thái Ngọc Duy
We do know the length of the path name of an tree entry from the tree dictionary. On an unoptimized build, this cuts down git rev-list --objects v1.8.4's time from 6.2s to 5.8s. This difference is less on optimized builds. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- packv4-parse.c

[PATCH 4/4] pack v4: make use of cached v4 trees when unpacking

2013-09-12 Thread Nguyễn Thái Ngọc Duy
git rev-list --objects v1.8.4 time is reduced from 29s to 10s with this patch. But it is still a long way to catch up with v2: 4s. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- The problem I see with decode_entries() is that given n copy sequences, it re-reads the same base n times.

[PATCH 3/4] pack v4: cache flattened v4 trees in delta base cache

2013-09-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- The memmove in pv4_get_tree() may look inefficient. I added a heuristics to avoid moving if nb_entries takes 2 bytes (most common, I think), but it does not improve much. So memmove() is probably ok. packv4-parse.c | 60

[PATCH 2/4] pack v4: add v4_size to struct delta_base_cache_entry

2013-09-12 Thread Nguyễn Thái Ngọc Duy
The intention is to store flat v4 trees in delta base cache to avoid repeatedly expanding copy sequences in v4 trees. When the user needs to unpack a v4 tree and the tree is found in the cache, the tree will be converted back to canonical format. Future tree_desc interface may skip canonical

Re: Re-Transmission of blobs?

2013-09-12 Thread Josef Wolf
On Do, Sep 12, 2013 at 05:23:40 -0400, Jeff King wrote: On Thu, Sep 12, 2013 at 09:42:41AM +0200, Josef Wolf wrote: I think Junio is referring to the reachability bitmap work. We may know that the other side has commit E (and therefore every object reachable from it), but we do not walk the

[PATCH v2 2/3] wt-status: turn advice_status_hints into a field of wt_status

2013-09-12 Thread Matthieu Moy
No behavior change in this patch, but this makes the display of status hints more flexible as they can be enabled or disabled for individual calls to commit.c:run_status(). Signed-off-by: Matthieu Moy matthieu@imag.fr --- No real change since v1, just a slight adaptation after the PATCH 1.

[PATCH v2 3/3] commit: disable status hints when writing to COMMIT_EDITMSG

2013-09-12 Thread Matthieu Moy
This turns the template COMMIT_EDITMSG from e.g # [...] # Changes to be committed: # (use git reset HEAD file... to unstage) # # modified: builtin/commit.c # # Untracked files: # (use git add file... to include in what will be committed) # # t/foo # to #

[PATCH v2 1/3] commit: factor status configuration is a helper function

2013-09-12 Thread Matthieu Moy
cmd_commit and cmd_status use very similar code to initialize the wt_status structure. Factor this code into a function to ensure future changes will keep both versions consistent. Signed-off-by: Matthieu Moy matthieu@imag.fr --- New patch, as discussed with Peff. builtin/commit.c | 18

RE: Re-Transmission of blobs?

2013-09-12 Thread Pyeron, Jason J CTR (US)
-Original Message- From: Jeff King Sent: Thursday, September 12, 2013 5:24 AM On Thu, Sep 12, 2013 at 09:42:41AM +0200, Josef Wolf wrote: There are some work being done to optimize this further using various techniques, but they are not ready yet. And this still

[PATCH 5/4] pack v4: convert v4 tree to canonical format if found in base cache

2013-09-12 Thread Nguyễn Thái Ngọc Duy
git log --stat -1 v1.4.8 /dev/null takes 13s with v4 (8s with v2). Of course we could do better when v4-aware tree-diff interface is in place.. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Oops.. forgot this and broke git. Another option is change cache_or_unpack_entry() to

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Torsten Bögershausen
On 2013-09-12 11.12, Jiang Xin wrote: Tvangeste found that the relative_path function could not work properly on Windows if in and prefix have dos driver prefix. ($gmane/234434) e.g., When execute: test-path-utils relative_path C:/a/b D:/x/y, should return C:/a/b, but returns ../../C:/a/b,

[PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Kyle J. McKay
On Sep 12, 2013, at 02:57, Thomas Rast wrote: The calls to strbuf_add* within append_normalized_escapes() can reallocate the buffer passed to it. Therefore, the seg_start pointer into the string cannot be kept across such calls. Thanks for finding this. It went undetected for a while

Re: What's cooking in git.git (Sep 2013, #03; Wed, 11)

2013-09-12 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes: Am 9/12/2013 1:32, schrieb Junio C Hamano: * jc/ref-excludes (2013-09-03) 2 commits - document --exclude option - revision: introduce --exclude=glob to tame wildcards People often wished a way to tell git log --branches (and git log --remotes

Re: [PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Thomas Rast
Kyle J. McKay mack...@gmail.com writes: Also some nits. The patch description should be imperative mood (cf. Documentation/SubmittingPatches). Heh. Serves me right to go away for a while and get SubmittingPatches cited at me on return ;-) Thanks for the updated patch. I agree with the

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Thu, Sep 12, 2013 at 11:36:56AM +0200, Sebastian Schuberth wrote: Just wondering if that is the root of the problem, or if maybe there is something else subtle going on. Also, does __CRT_INLINE just turn into inline, or is there perhaps some other

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-12 Thread Nicolas Pitre
On Tue, 10 Sep 2013, Duy Nguyen wrote: On Mon, Sep 9, 2013 at 10:01 PM, Nicolas Pitre n...@fluxnic.net wrote: However this means that the progress meter will now be wrong and that's terrible ! Users *will* complain that the meter doesn't reach 100% and they'll protest for being denied the

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Karsten Blees
Am 12.09.2013 11:12, schrieb Jiang Xin: Tvangeste found that the relative_path function could not work properly on Windows if in and prefix have dos driver prefix. ($gmane/234434) e.g., When execute: test-path-utils relative_path C:/a/b D:/x/y, should return C:/a/b, but returns

Re: Specifying a private key when connecting to a remote SSH repo

2013-09-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: We already have GIT_SSH, so I would expect: GIT_SSH='ssh -i $HOME/.ssh/id_for_example_com' git push to work. But sadly, GIT_SSH does not use the shell, unlike most other configure git commands. :( You read me correctly ;-) We could consider it a

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: +static int have_same_root(const char *path1, const char *path2) +{ +int is_abs1, is_abs2; + +is_abs1 = is_absolute_path(path1); +is_abs2 = is_absolute_path(path2); +return (is_abs1 is_abs2 !strncasecmp(path1, path2, 1)) ||

Re: [PATCH 00/21] np/pack-v4 updates

2013-09-12 Thread Nicolas Pitre
On Thu, 12 Sep 2013, Duy Nguyen wrote: On Wed, Sep 11, 2013 at 11:25 PM, Nicolas Pitre n...@fluxnic.net wrote: On Wed, 11 Sep 2013, Duy Nguyen wrote: Nico, if you have time you may want to look into this. The result v4 pack from pack-objects on git.git for me is 35MB (one branch) while

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Johannes Sixt
Am 12.09.2013 16:13, schrieb Torsten Bögershausen: On 2013-09-12 11.12, Jiang Xin wrote: +static int have_same_root(const char *path1, const char *path2) +{ +int is_abs1, is_abs2; + +is_abs1 = is_absolute_path(path1); +is_abs2 = is_absolute_path(path2); +return (is_abs1

Re: [PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Junio C Hamano
Thanks, both. -- 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] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 08:37:08AM -0700, Junio C Hamano wrote: I wonder if GCC has changed it's behaviour to more closely match C99. Clang as a compatibility article about this sort of issue: http://clang.llvm.org/compatibility.html#inline Interesting. The ways the page suggests

[PATCH-v4] Allow git-filter-branch to process large repositories with lots of branches.

2013-09-12 Thread Lee Carver
As noted in several forums, a recommended way to move trees between repositories is to use git-filter-branch to revise the history for a single tree: http://gbayer.com/development/moving-files-from-one-git-repository-to-anoth er-preserving-history/

Re: Specifying a private key when connecting to a remote SSH repo

2013-09-12 Thread Breck Yunits
Thanks very much for the feedback and implementation suggestions. If the only thing you are interested in supporting is a one-shot invocation, i.e. giving which identity file to use from the command line when you run either git push or git fetch, Yes, this is the new option that could benefit

Re: What's cooking in git.git (Sep 2013, #03; Wed, 11)

2013-09-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: This description is slightly inaccurate since the re-roll. I think it is now: git config did not provide a way to set or access numbers larger than a native int on the platform; it now provides 64-bit signed integers on all platforms. Not a big deal,

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Jonathan Nieder
Junio C Hamano wrote: I think we would want something like below. Looks good to me, but -- 8 -- Subject: [PATCH] mailmap: work around implementations with pure inline strcasecmp On some systems, string.h has _only_ inline definition of strcasecmp Please specify which system we are

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Sep 12, 2013 at 08:37:08AM -0700, Junio C Hamano wrote: I wonder if GCC has changed it's behaviour to more closely match C99. Clang as a compatibility article about this sort of issue: http://clang.llvm.org/compatibility.html#inline

git-svn fails to initialize with submodule setup, when '.git' is a file and not a directory

2013-09-12 Thread Marc-Antoine Ruel
Repro: 1. git clone --recursive a repository with submodules. 2. cd checkout/submoduleA 3. git svn init svn://host/repo Expected: Works as usual Actual: /path/to/checkout/submoduleA/.git/refs: Not a directory init: command returned error: 1 Why: submoduleA/.git is a file, not a directory. $ cat

Re: [PATCH 2/2] Use simpler relative_path when set_git_dir

2013-09-12 Thread Johannes Sixt
Am 12.09.2013 11:12, schrieb Jiang Xin: Using a relative_path as git_dir first appears in v1.5.6-1-g044bbbc. It will make git_dir shorter only if git_dir is inside work_tree, and this will increase performance. But my last refactor effort on relative_path function (commit

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 11:35:21AM -0700, Junio C Hamano wrote: - change it to a statis inline; - remove inline from the definition; - provide an external (non-inline) def somewhere else; - compile with gnu899 dialect. Right, option 3 seems perfectly reasonable to me, as we must

Fwd: git-daemon access-hook race condition

2013-09-12 Thread Eugene Sajine
Hi, We are serving repos in closed netwrok via git protocol. We are using git-daemon access hook (thank you very much for such a great feature) in order to create push notifications for Jenkins. I.e. upon the push the access-hook is called and then the curl command is created and executed. As we

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: Am 12.09.2013 16:13, schrieb Torsten Bögershausen: On 2013-09-12 11.12, Jiang Xin wrote: +static int have_same_root(const char *path1, const char *path2) +{ + int is_abs1, is_abs2; + + is_abs1 = is_absolute_path(path1); + is_abs2 =

Re: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Junio C Hamano
Eugene Sajine eugu...@gmail.com writes: Is it possible to have access-hook to be executed after receive? The whole point of access-hook is to allow it to decide whether the access is allowed or not, so that is a non-starter. A notification _after_ successful push update is usually done via the

[PATCH v2 0/4] submodule trailing slash improvements

2013-09-12 Thread John Keeping
Changes since v1: * Improvements to existing pathspec code to use is_dir_sep instead of comparing against '/' and handle multiple trailing slashes * Remove calls to read_cache() made redundant by a new call in builtin/reset.c::parse_args() John Keeping (4): pathspec: use is_dir_sep() to

[PATCH v2 4/4] reset: handle submodule with trailing slash

2013-09-12 Thread John Keeping
When using tab-completion, a directory path will often end with a trailing slash which currently confuses git reset when dealing with submodules. Now that we have parse_pathspec we can easily handle this by simply adding the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag. To do this, we need to move

[PATCH v2 2/4] pathspec: strip multiple trailing slashes from submodules

2013-09-12 Thread John Keeping
This allows us to replace the submodule path trailing slash removal in builtin/rm.c with the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag to parse_pathspec() without changing the behaviour with respect to multiple trailing slashes. Signed-off-by: John Keeping j...@keeping.me.uk --- pathspec.c | 27

[PATCH v2 1/4] pathspec: use is_dir_sep() to check for trailing slashes

2013-09-12 Thread John Keeping
This allows us to correctly removing trailing backslashes on Windows when checking for submodules. Signed-off-by: John Keeping j...@keeping.me.uk --- pathspec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pathspec.c b/pathspec.c index ad1a9f5..7c6963b 100644 ---

Re: [PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Junio C Hamano
Kyle J. McKay mack...@gmail.com writes: So how about this patch instead... -- 8 -- From: Thomas Rast tr...@inf.ethz.ch Subject: urlmatch.c: recompute pointer after append_normalized_escapes When append_normalized_escapes is called, its internal strbuf_add* calls can cause the strbuf's buf

Re: Re-Transmission of blobs?

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 12:35:32PM +0200, Josef Wolf wrote: I'm not sure I understand correctly. I see that bitmaps can be used to implement set operations. But how comes that walking the graph requires a lot of CPU? Isn't it O(n)? Yes and no. Your n there is the entirety of history. Whereas

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Sebastian Schuberth
On Thu, Sep 12, 2013 at 8:20 PM, Jeff King p...@peff.net wrote: I wonder if GCC has changed it's behaviour to more closely match C99. Clang as a compatibility article about this sort of issue: http://clang.llvm.org/compatibility.html#inline Interesting. The ways the page suggests

[PATCH v2 3/4] rm: re-use parse_pathspec's trailing-slash removal

2013-09-12 Thread John Keeping
Instead of re-implementing the remove trailing slashes loop in builtin/rm.c just pass PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP to parse_pathspec. Signed-off-by: John Keeping j...@keeping.me.uk --- builtin/rm.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git

Re: [PATCH v2 2/4] pathspec: strip multiple trailing slashes from submodules

2013-09-12 Thread John Keeping
On Thu, Sep 12, 2013 at 12:48:10PM -0700, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: This allows us to replace the submodule path trailing slash removal in builtin/rm.c with the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag to parse_pathspec() without changing the behaviour

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 09:46:51PM +0200, Sebastian Schuberth wrote: Right, option 3 seems perfectly reasonable to me, as we must be prepared to cope with a decision not to inline the function, and there has to be _some_ linked implementation. But shouldn't libc be providing an external,

Re: Re-Transmission of blobs?

2013-09-12 Thread Jeff King
On Thu, Sep 12, 2013 at 12:45:44PM +, Pyeron, Jason J CTR (US) wrote: If the rules of engagement are change a bit, the server side can be release from most of its work (CPU/IO). Client does the following, looping as needed: Heads=server-heads(); KnownCommits=Local-AllCommits();

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Junio C Hamano
Sebastian Schuberth sschube...@gmail.com writes: I'm not too happy with the wording either. As I see it, even on MinGW runtime version 4.0 it's not true that string.h has _only_ inline definition of strcasecmp; there's also #define strncasecmp _strnicmp which effectively provides a non-inline

Re: [PATCH v2 1/4] pathspec: use is_dir_sep() to check for trailing slashes

2013-09-12 Thread Johannes Sixt
Am 12.09.2013 21:24, schrieb John Keeping: This allows us to correctly removing trailing backslashes on Windows when checking for submodules. Signed-off-by: John Keeping j...@keeping.me.uk --- pathspec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pathspec.c

RE: Re-Transmission of blobs?

2013-09-12 Thread Pyeron, Jason J CTR (US)
-Original Message- From: Jeff King Sent: Thursday, September 12, 2013 3:57 PM On Thu, Sep 12, 2013 at 12:45:44PM +, Pyeron, Jason J CTR (US) wrote: If the rules of engagement are change a bit, the server side can be release from most of its work (CPU/IO). Client does

Re: [PATCH v2 2/4] pathspec: strip multiple trailing slashes from submodules

2013-09-12 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: This allows us to replace the submodule path trailing slash removal in builtin/rm.c with the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag to parse_pathspec() without changing the behaviour with respect to multiple trailing slashes. Where does

Re: [PATCH] lookup_object: remove hashtable_index() and optimize hash_obj()

2013-09-12 Thread Junio C Hamano
Nicolas Pitre n...@fluxnic.net writes: Maybe it's worth squashing in one or both of the comments below as a warning to anybody who tries to tweak it. Agreed. @Junio: are you willing to squash those in, or do you prefer a resent? I think I've queued it ready to be squashed. No need for

Re: [PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Kyle J. McKay
On Sep 12, 2013, at 11:30, Junio C Hamano wrote: + /* append_normalized_escapes can cause norm.buf to change */ + seg_start = norm.buf + seg_start_off; The change looks good, but I find that this comment is not placed in the right place. It is good if the reader

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: I think there are basically three classes of solution: 1. Declare __NO_INLINE__ everywhere. I'd worry this might affect other environments, who would then not inline and lose performance (but since it's a non-standard macro, we don't really know

Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Eugene Sajine
On Thu, Sep 12, 2013 at 3:15 PM, Junio C Hamano gits...@pobox.com wrote: Eugene Sajine eugu...@gmail.com writes: Is it possible to have access-hook to be executed after receive? The whole point of access-hook is to allow it to decide whether the access is allowed or not, so that is a

Re: [PATCH] lookup_object: remove hashtable_index() and optimize hash_obj()

2013-09-12 Thread Nicolas Pitre
On Wed, 11 Sep 2013, Jeff King wrote: On Tue, Sep 10, 2013 at 06:17:12PM -0400, Nicolas Pitre wrote: Also remove the modulus as this is an expansive operation. The size argument is always a power of 2 anyway, so a simple mask operation provides the same result. On a 'git rev-list

Re: [PATCH v2] remote-bzr: reuse bzrlib transports when possible

2013-09-12 Thread Junio C Hamano
Richard Hansen rhan...@bbn.com writes: Ping? I'd like to merge fc/contrib-bzr.hg-fixes topic to 'next' (and fast track it to 'master' after that), and it would be helpful to get an Ack on the conflict resolution I have. Sorry for the delay. Looks good to me, and the tests still pass.

Re: Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Junio C Hamano
Eugene Sajine eugu...@gmail.com writes: So are you really sure that it is a non-starter to have --before-service/--after-service options for access-hook? Given the definition of --access-hook in git help daemon: --access-hook=path:: Every time a client connects, first run an

Re: Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Eugene Sajine
Junio, Thanks for the clarification! Your solution does look better. For now though i think i will have to delay the notification somehow and let the service finish first then notify the server. Thanks again! Eugene On Thu, Sep 12, 2013 at 5:08 PM, Junio C Hamano gits...@pobox.com wrote:

Re: [PATCH v2] remote-bzr: reuse bzrlib transports when possible

2013-09-12 Thread Richard Hansen
On 2013-09-10 18:01, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Richard Hansen rhan...@bbn.com writes: def do_export(parser): -global parsed_refs, dirname +global parsed_refs, dirname, transports As this has been acked by Felipe who knows the script the best,

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Jonathan Nieder
Sebastian Schuberth wrote: And that's exactly what defining __NO_INLINE__ does. Granted, defining __NO_INLINE__ in the scope of string.h will also add a #define strcasecmp _stricmp; but despite it's name, defining __NO_INLINE__ does not imply a performance hit due to functions not being

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

2013-09-12 Thread Jonathan Nieder
Sebastian Schuberth wrote: I'm not too happy with the wording either. As I see it, even on MinGW runtime version 4.0 it's not true that string.h has _only_ inline definition of strcasecmp; there's also #define strncasecmp _strnicmp I assume you mean #define strcasecmp _stricmp, which is

Converting repo from HG, `git filter-branch --prune-empty -- --all` is extremely slow and errors out.

2013-09-12 Thread John Gietzen
Background: Windows, git version 1.8.3.msysgit.0 bare repo, 54k commits after migration from HG git filter-branch --prune-empty -- --all I'm trying to clean up our repository after migrating it from HG. I'm running the filter-branch command listed above in an effort to clean up all of garbage

Re: [PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Jonathan Nieder
Kyle J. McKay wrote: The longer comment looks good to me. If you think the code will be safe from simplification patches without a comment, that works for me too. I think if we can't trust reviewers to catch this kind of thing, we're in trouble (i.e., moving too fast). :) So FWIW my instinct

Re: Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Eugene Sajine
On Thu, Sep 12, 2013 at 5:16 PM, Eugene Sajine eugu...@gmail.com wrote: Junio, Thanks for the clarification! Your solution does look better. For now though i think i will have to delay the notification somehow and let the service finish first then notify the server. Thanks again! Eugene

Re: [PATCH v2] urlmatch.c: recompute ptr after append_normalized_escapes

2013-09-12 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Kyle J. McKay wrote: The longer comment looks good to me. If you think the code will be safe from simplification patches without a comment, that works for me too. I think if we can't trust reviewers to catch this kind of thing, we're in trouble

[PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread Richard Hansen
The Developer's Certificate of Origin refers to the open source license indicated in the file, but there is no such indication in most files in the Git repository. Update the text to indicate that the license in COPYING should be assumed if a file doesn't excplicitly indicate which license

Re: Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Eugene Sajine eugu...@gmail.com writes: So are you really sure that it is a non-starter to have --before-service/--after-service options for access-hook? Given the definition of --access-hook in git help daemon: --access-hook=path::

Re: [PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread Junio C Hamano
Linus, this is not limited to us, so I am bothering you; sorry about that. My instinct tells me that some competent lawyers at linux-foundation helped you with the wording of DCO, and we amateurs shouldn't be mucking with the text like this patch does at all, but just in case you might find it

Re: [PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread Linus Torvalds
On Thu, Sep 12, 2013 at 3:30 PM, Junio C Hamano gits...@pobox.com wrote: Linus, this is not limited to us, so I am bothering you; sorry about that. My instinct tells me that some competent lawyers at linux-foundation helped you with the wording of DCO, and we amateurs shouldn't be mucking

Re: [PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread Theodore Ts'o
I certainly wouldn't recommend messing with the text of the DCO without first consulting some lawyers. There should also be some centralized coordination about any changes in the text and the version number. - Ted -- To unsubscribe from this list:

Re: [PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread Richard Hansen
On 2013-09-12 18:44, Linus Torvalds wrote: On Thu, Sep 12, 2013 at 3:30 PM, Junio C Hamano gits...@pobox.com wrote: Linus, this is not limited to us, so I am bothering you; sorry about that. My instinct tells me that some competent lawyers at linux-foundation helped you with the wording of

Re: [PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread Linus Torvalds
On Thu, Sep 12, 2013 at 4:15 PM, Richard Hansen rhan...@bbn.com wrote: Is it worthwhile to poke a lawyer about this as a precaution? (If so, who?) Or do we wait for a motivating event? I can poke the lawyer that was originally involved. If people know other lawyers, feel free to poke them

Re: Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Eugene Sajine
On Thu, Sep 12, 2013 at 6:20 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Eugene Sajine eugu...@gmail.com writes: So are you really sure that it is a non-starter to have --before-service/--after-service options for access-hook? Given the definition

Re: Fwd: Fwd: git-daemon access-hook race condition

2013-09-12 Thread Junio C Hamano
Eugene Sajine eugu...@gmail.com writes: So even if we feed the exit status of the service process to the hook script specified by the --post-service-hook, it does not tell the script if the service succeeded in that sense. I see what you're saying. In my particular use case I can work

Re: Converting repo from HG, `git filter-branch --prune-empty -- --all` is extremely slow and errors out.

2013-09-12 Thread Felipe Contreras
On Thu, Sep 12, 2013 at 5:01 PM, John Gietzen jgiet...@woot.com wrote: Background: Windows, git version 1.8.3.msysgit.0 bare repo, 54k commits after migration from HG git filter-branch --prune-empty -- --all I'm trying to clean up our repository after migrating it from HG. I'm running the

Re: [PATCH 0/3] Reject non-ff pulls by default

2013-09-12 Thread Felipe Contreras
On Wed, Sep 11, 2013 at 6:38 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Felipe Contreras felipe.contre...@gmail.com writes: On Tue, Sep 10, 2013 at 3:26 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: So, you insist in asking the user to chose between rebase and merge, but

[PATCH v2 0/2] version-gen: fixes and cleanups

2013-09-12 Thread Felipe Contreras
Felipe Contreras (2): version-gen: cleanup version-gen: avoid messing the version GIT-VERSION-GEN | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) -- 1.8.4-338-gefd7fa6 -- To unsubscribe from this list: send the line unsubscribe git in the body

[PATCH v2 2/2] version-gen: avoid messing the version

2013-09-12 Thread Felipe Contreras
If the version is 'v1.8.4-rc1' that is the version, and there's no need to change it to anything else, like 'v1.8.4.rc1'. If RedHat, or somebody else, needs a specific version, they can use the 'version' file, like everybody else. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com ---

Re: [PATCH v2 2/4] pathspec: strip multiple trailing slashes from submodules

2013-09-12 Thread Duy Nguyen
On Fri, Sep 13, 2013 at 3:21 AM, John Keeping j...@keeping.me.uk wrote: On Thu, Sep 12, 2013 at 12:48:10PM -0700, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: This allows us to replace the submodule path trailing slash removal in builtin/rm.c with the

[PATCH v2 1/2] version-gen: cleanup

2013-09-12 Thread Felipe Contreras
No functional changes. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- GIT-VERSION-GEN | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 06026ea..e96538d 100755 --- a/GIT-VERSION-GEN

Re: [PATCH/RFC] Developer's Certificate of Origin: default to COPYING

2013-09-12 Thread W. Trevor King
On Thu, Sep 12, 2013 at 04:25:03PM -0700, Linus Torvalds wrote: On Thu, Sep 12, 2013 at 4:15 PM, Richard Hansen rhan...@bbn.com wrote: Is it worthwhile to poke a lawyer about this as a precaution? (If so, who?) Or do we wait for a motivating event? I can poke the lawyer that was

Re: [PATCH 00/21] np/pack-v4 updates

2013-09-12 Thread Duy Nguyen
On Thu, Sep 12, 2013 at 11:20 PM, Nicolas Pitre n...@fluxnic.net wrote: On Thu, 12 Sep 2013, Duy Nguyen wrote: On Wed, Sep 11, 2013 at 11:25 PM, Nicolas Pitre n...@fluxnic.net wrote: On Wed, 11 Sep 2013, Duy Nguyen wrote: Nico, if you have time you may want to look into this. The result

Local tag killer

2013-09-12 Thread Michael Haggerty
A colleague of mine discovered, the hard way, that git fetch --tags --prune $REMOTE deletes all local tags that are not present on that particular remote. To me this seems a dangerous and poorly-documented interaction of features and arguably a bug. Granted, it might not be such a good idea

Re: Local tag killer

2013-09-12 Thread Junio C Hamano
When looking into this, I found a test in t5510 that appears to want to verify this very behavior: test_expect_success 'fetch --prune --tags does not delete the remote-tracking branches' ' The title tells me that it wants to make sure when pruning tags it does not touch remote-tracking

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Jiang Xin
2013/9/13 Junio C Hamano gits...@pobox.com: For systems that need POSIX escape hatch for Apollo Domain ;-), we would need a bit more work. When both path1 and path2 begin with a double-dash, we would need to check if they match up to the next slash, so that - //host1/usr/src and

[PATCH v2 0/3] fixes for relative_path

2013-09-12 Thread Jiang Xin
Updates since v1: * New patch 1/3 on t0060, which use umambigous leading path (/foo). * Call tolower instead of strncasecmp in patch 2/3. * Rename simple_relative_path to remove_leading_path in patch 3/3. Jiang Xin (3): test: use unambigous leading path (/foo) for mingw relative_path should

[PATCH v2 1/3] test: use unambigous leading path (/foo) for mingw

2013-09-12 Thread Jiang Xin
In test cases for relative_path, path with one leading character (such as /a, /x) may be recogonized as a:/ or x:/ if there is such doc drive on MINGW platform. Use an umambigous leading path /foo instead. Signed-off-by: Jiang Xin worldhello@gmail.com --- t/t0060-path-utils.sh | 56

[PATCH v2 3/3] Use simpler relative_path when set_git_dir

2013-09-12 Thread Jiang Xin
Using a relative_path as git_dir first appears in v1.5.6-1-g044bbbc. It will make git_dir shorter only if git_dir is inside work_tree, and this will increase performance. But my last refactor effort on relative_path function (commit v1.8.3-rc2-12-ge02ca72) changed that. Always use relative_path as

  1   2   >