Re: [PATCH v4 0/3] Make update refs more atomic

2014-04-15 Thread Michael Haggerty
On 04/14/2014 08:29 PM, Ronnie Sahlberg wrote: refs.c:ref_transaction_commit() intermingles doing updates and checks with actually applying changes to the refs in loops that abort on error. This is done one ref at a time and means that if an error is detected that will fail the operation

Re: [PATCH v3 16/25] commit_lock_file(): die() if called for unlocked lockfile object

2014-04-15 Thread Johannes Sixt
Am 4/14/2014 15:54, schrieb Michael Haggerty: diff --git a/lockfile.c b/lockfile.c index 664b0c3..1453a7a 100644 --- a/lockfile.c +++ b/lockfile.c @@ -292,6 +292,9 @@ int commit_lock_file(struct lock_file *lk) if (lk-fd = 0 close_lock_file(lk)) return -1; + if

Re: [PATCH v3 18/25] struct lock_file: declare some fields volatile

2014-04-15 Thread Johannes Sixt
Am 4/14/2014 15:54, schrieb Michael Haggerty: The function remove_lock_file_on_signal() is used as a signal handler. It is not realistic to make the signal handler conform strictly to the C standard, which is very restrictive about what a signal handler is allowed to do. But let's increase

Re: [PATCH v3 19/27] refs: add a concept of a reference transaction

2014-04-15 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: In retrospect, you might have been objecting more to the misleading docstring than to the behavior as implemented at the time. Yeah, I was reacting to the comment that said create can delete ;-) The docstring implied that create could actually

[PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Erik Faye-Lund
From: Erik Faye-Lund kusmab...@googlemail.com On Windows, absolute paths might start with a DOS drive prefix, which this check fails to recognize. Unfortunately, we cannot simply use the file_name_is_absolute helper in File::Spec::Functions, because Git for Windows has an MSYS-based Perl, where

Re: [PATCH 1/2] Makefile: use curl-config to determine curl flags

2014-04-15 Thread Dave Borowitz
On Mon, Apr 14, 2014 at 4:22 PM, Junio C Hamano gits...@pobox.com wrote: Dave Borowitz dborow...@google.com writes: curl-config should always be installed alongside a curl distribution, and its purpose is to provide flags for building against libcurl, so use it instead of guessing flags and

Re: [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Johannes Sixt
Am 4/15/2014 10:44, schrieb Erik Faye-Lund: From: Erik Faye-Lund kusmab...@googlemail.com On Windows, absolute paths might start with a DOS drive prefix, which this check fails to recognize. Unfortunately, we cannot simply use the file_name_is_absolute helper in File::Spec::Functions,

[PATCH v2 2/2] Makefile: allow static linking against libcurl

2014-04-15 Thread Dave Borowitz
This requires more flags than can be guessed with the old-style CURLDIR and related options, so is only supported when curl-config is present. Signed-off-by: Dave Borowitz dborow...@google.com --- Makefile | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH v2 1/2] Makefile: use curl-config to determine curl flags

2014-04-15 Thread Dave Borowitz
curl-config should always be installed alongside a curl distribution, and its purpose is to provide flags for building against libcurl, so use it instead of guessing flags and dependent libraries. Allow overriding CURL_CONFIG to a custom path to curl-config, to compile against a curl installation

Re: [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Erik Faye-Lund
On Tue, Apr 15, 2014 at 12:32 PM, Johannes Sixt j.s...@viscovery.net wrote: Am 4/15/2014 10:44, schrieb Erik Faye-Lund: From: Erik Faye-Lund kusmab...@googlemail.com On Windows, absolute paths might start with a DOS drive prefix, which this check fails to recognize. Unfortunately, we cannot

Re: [PATCH v4 1/3] refs.c: split writing and commiting a ref into two separate functions

2014-04-15 Thread Michael Haggerty
See my comment to your cover letter where I suggest using ref transactions instead of making callers deal with even more of the details of updating references. But I will comment on these patches anyway, in case you'd rather leave them closer to the current form. On 04/14/2014 08:29 PM, Ronnie

[PATCH] hook for git status

2014-04-15 Thread Suvorov Ivan
From 0f435feee87dc96b2e4890a5a5de7b1d0c0befe1 Mon Sep 17 00:00:00 2001 From: magisterRab sv...@inbox.ru Date: Tue, 1 Apr 2014 17:02:10 +0400 Subject: [PATCH] hook for git status Signed-off-by: Ivan Suvorov sv...@inbox.ru --- hook for git status allows you to display additional fields when you run

Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc

2014-04-15 Thread Delcypher
What is the problem you are trying to solve? The problem I was trying to solve is I wanted my authentication details to be in a hgrc local to the repository. The problem is git-remote-hg will parse ``.git/hg/origin/clone/.hg/hgrc`` but will ignore any settings in it (this seems a little silly).

Re: [PATCH v4 0/3] Make update refs more atomic

2014-04-15 Thread Ronnie Sahlberg
On Mon, Apr 14, 2014 at 1:24 PM, Junio C Hamano gits...@pobox.com wrote: Thanks; will queue. Junio, Please defer queuing for now. I think we should convert more of the external callers to use transactions first. Once that is done and everything uses transactions I will re-send an updated

Re: What's cooking in git.git (Apr 2014, #03; Fri, 11)

2014-04-15 Thread Junio C Hamano
Ramsay Jones ram...@ramsay1.demon.co.uk writes: On 11/04/14 23:22, Junio C Hamano wrote: [...] [New Topics] * nd/index-pack-one-fd-per-thread (2014-04-09) 1 commit - index-pack: work around thread-unsafe pread() Enable threaded index-pack on platforms without thread-unsafe pread()

Re: [PATCH 1/2] Makefile: use curl-config to determine curl flags

2014-04-15 Thread Junio C Hamano
Dave Borowitz dborow...@google.com writes: My end goal is to statically link git on Mac OS X (10.9) against a newer version of libcurl than ships with the OS. The normal CURLDIR approach should work with system libcurl: $ /usr/bin/curl-config --libs -lcurl But it gets a bit more

Re* [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com writes: Here's a patch that we've been running with a variation of in Git for Windows for a while. That version wasn't quite palatable, as it recognized DOS drive-prefixes on all platforms. Did you consider patching msysgit's lib/perl5/5.8.8/File/Spec.pm by

Re: [PATCH v4 2/3] refs.c: split delete_ref_loose() into a separate flag-for-deletion and commit phase

2014-04-15 Thread Michael Haggerty
On 04/14/2014 08:29 PM, Ronnie Sahlberg wrote: Change delete_ref_loose()) to just flag that a ref is to be deleted but do not actually unlink the files. Change commit_ref_lock() so that it will unlink refs that are flagged for deletion. Change all callers of delete_ref_loose() to explicitely

Re: [PATCH v3 00/25] Lockfile correctness and refactoring

2014-04-15 Thread Torsten Bögershausen
refs.c: int close_ref(struct ref_lock *lock) { if (close_lock_file(lock-lk)) return -1; lock-lock_fd = -1; return 0; } When the close() fails, fd is still = 0, even if the file is closed. Could it be written like this ? int close_ref(struct ref_lock

Re: [PATCH] Unicode: update of combining code points

2014-04-15 Thread Peter Krefting
Torsten Bögershausen: diff --git a/utf8.c b/utf8.c index a831d50..77c28d4 100644 --- a/utf8.c +++ b/utf8.c Is there a script that generates this code from the Unicode database files, or did you hand-update it? -- \\// Peter - http://www.softwolves.pp.se/ -- To unsubscribe from this list:

Re: wrong handling of text git attribute leading to files incorrectly reported as modified

2014-04-15 Thread Brandon McCaig
Frank: On Sat, Apr 12, 2014 at 7:29 AM, Frank Ammeter g...@ammeter.ch wrote: I don’t see that argument. I don’t know why at the time of a commit git should read unstaged files from my working tree - that affect my commit. .gitignore works the exact same way. If you modify .gitignore then git

Re: [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Erik Faye-Lund
On Tue, Apr 15, 2014 at 12:42 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, Apr 15, 2014 at 12:32 PM, Johannes Sixt j.s...@viscovery.net wrote: Am 4/15/2014 10:44, schrieb Erik Faye-Lund: From: Erik Faye-Lund kusmab...@googlemail.com On Windows, absolute paths might start with a DOS

Re: [PATCH v4 0/3] Make update refs more atomic

2014-04-15 Thread Michael Haggerty
On 04/15/2014 06:33 PM, Ronnie Sahlberg wrote: On Mon, Apr 14, 2014 at 11:36 PM, Michael Haggerty mhag...@alum.mit.edu wrote: [...] I wonder, however, whether your approach of changing callers from lock = lock_ref_sha1_basic() (or varient of) write_ref_sha1(lock) to lock =

Re: Re* [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Thanks, both. I'd expect another round then? -- 8 -- From: Erik Faye-Lund kusmab...@googlemail.com On Windows, absolute paths might start with a DOS drive prefix, which these checks fail to recognize. Use file_name_is_absolute from

Re: Re* [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Erik Faye-Lund
On Tue, Apr 15, 2014 at 10:37 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Thanks, both. I'd expect another round then? -- 8 -- From: Erik Faye-Lund kusmab...@googlemail.com On Windows, absolute paths might start with a DOS drive prefix, which

Re: Re* [PATCH] send-email: recognize absolute path on Windows

2014-04-15 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com writes: ... But, ugh. Modifying File::Spec into thinking msys is Win32 doesn't seems to work, OK, I'll drop the tentative version and wait for a proper reroll. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: wrong handling of text git attribute leading to files incorrectly reported as modified

2014-04-15 Thread Junio C Hamano
Brandon McCaig bamcc...@gmail.com writes: That is for your benefit, and for easily sharing that configuration with collaborators. Git only cares that the file exists in your working tree at run-time. It is a lot more than for sharing. If you made .gitignore only effective after it gets

Re: [PATCH v9 0/6] transport-helper: fixes

2014-04-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Felipe Contreras felipe.contre...@gmail.com writes: These patches add support for remote helpers --force, --dry-run, and reporting forced update. Changes since v8: --- a/transport-helper.c +++ b/transport-helper.c @@ -734,7 +734,7 @@ static int

Re: [PATCH 0/5] transport-helper: serious crash fix

2014-04-15 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: One of the most serious recurring issues[1][2][3] with remote helpers is that marks get out of sync. The way to analize and reproduce these wasn't trivial, but the culprit seems to be a crash while doing `git push`. It has been known already

What's cooking in git.git (Apr 2014, #04; Tue, 15)

2014-04-15 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'. The number of topics cooking in 'next' has been shrinking, and the cycle is getting long. Hopefully we will have -rc0 late this week to close

Re: [PATCH] git-gui: show staged submodules regardless of ignore config

2014-04-15 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Currently setting submodule.name.ignore and/or diff.ignoreSubmodules to all suppresses all output of submodule changes for git-gui. This is really confusing, as even when the user chooses to record a new commit for an ignored submodule by adding it

Re: [PATCH] gitk: show staged submodules regardless of ignore config

2014-04-15 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Currently setting submodule.name.ignore and/or diff.ignoreSubmodules to all suppresses all output of submodule changes for gitk. This is really confusing, as even when the user chooses to record a new commit for an ignored submodule by adding it

Re: What's cooking in git.git (Apr 2014, #03; Fri, 11)

2014-04-15 Thread Duy Nguyen
On Tue, Apr 15, 2014 at 11:45 PM, Junio C Hamano gits...@pobox.com wrote: Ramsay Jones ram...@ramsay1.demon.co.uk writes: On 11/04/14 23:22, Junio C Hamano wrote: [...] [New Topics] * nd/index-pack-one-fd-per-thread (2014-04-09) 1 commit - index-pack: work around thread-unsafe pread()

[PATCH 1/2] sequencer.c: check for lock failure and bail early in fast_forward_to

2014-04-15 Thread Ronnie Sahlberg
Change fast_forward_to() to check if locking the ref failed, print a nice error message and bail out early. The old code did not check if ref_lock was NULL and relied on the fact that the write_ref_sha1() would safely detect this condition and set the return variable ret to indicate an error.

[PATCH 0/2] Check for lock failures early

2014-04-15 Thread Ronnie Sahlberg
Callers outside of refs.c use either lock_ref_sha1() or lock_any_ref_for_update() to lock a ref during an update. Two of these places we do not immediately check the lock for failure making reading the code harder. One place we do some unrelated string manipulation fucntions before we check for

[PATCH 2/2] commit.c: check for lock error and return early

2014-04-15 Thread Ronnie Sahlberg
Move the check for the lock failure to happen immediately after lock_any_ref_for_update(). Previously the lock and the check-if-lock-failed was separated by a handful of string manipulation statements. Moving the check to occur immediately after the failed lock makes the code slightly easier to

Re: [PATCH 1/2] sequencer.c: check for lock failure and bail early in fast_forward_to

2014-04-15 Thread Brandon Casey
On Tue, Apr 15, 2014 at 4:46 PM, Ronnie Sahlberg sahlb...@google.com wrote: snip well-worded commit message Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- sequencer.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sequencer.c b/sequencer.c index bde5f04..6aa3b50 100644

Re: [PATCH 1/3] rebase: avoid non-function use of return on FreeBSD

2014-04-15 Thread Kyle J. McKay
On Apr 14, 2014, at 15:51, Junio C Hamano wrote: I think we would want to see the actual change formatted this way (without needing to pass -w to git show), as it will make it clear that this artificial extra level of define the whole thing inside a function and then make a single call to it is

Re: [PATCH] Unicode: update of combining code points

2014-04-15 Thread Torsten Bögershausen
On 15.04.14 21:10, Peter Krefting wrote: Torsten Bögershausen: diff --git a/utf8.c b/utf8.c index a831d50..77c28d4 100644 --- a/utf8.c +++ b/utf8.c Is there a script that generates this code from the Unicode database files, or did you hand-update it? Some of the code points which