Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 12:25:30AM -0500, Felipe Contreras wrote: I agree with the line of reasoning you laid out in your email, especially: What a shock. Please stop with these unproductive and rude comments. I hadn't thought of the rename idea, and it would address the concerns I

[PATCH v2 06/10] replace: refactor checking ref validity

2014-05-17 Thread Christian Couder
This will be useful in a following commit when we will want to check if the ref already exists before we let the user edit an object. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 31 --- 1 file changed, 20 insertions(+), 11

[PATCH v2 00/10] replace: add option to edit a Git object

2014-05-17 Thread Christian Couder
This patch series comes from what Peff sent in the following thread: http://thread.gmane.org/gmane.comp.version-control.git/243361/focus=243528 The first 4 patches (1/4, 2/4, 3/4 and 4/4) didn't change since v1. I added 6 more small patches to add tests, documentation and a few small

[PATCH v2 05/10] replace: make sure --edit results in a different object

2014-05-17 Thread Christian Couder
It's a bad idea to create a replace ref for an object that points to the original object itself. That's why we have to check if the result from editing the original object is a different object and error out if it isn't. Signed-off-by: Christian Couder chrisc...@tuxfamily.org ---

[PATCH v2 03/10] replace: factor object resolution out of replace_object

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net As we add new options that operate on objects before replacing them, we'll want to be able to feed raw sha1s straight into replace_object. Split replace_object into the object-resolution part and the actual replacement. Signed-off-by: Jeff King p...@peff.net

[PATCH v2 10/10] Documentation: replace: describe new --edit option

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 0a02f70..37d872d 100644 ---

[PATCH v2 02/10] replace: use OPT_CMDMODE to handle modes

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net By using OPT_CMDMODE, the mutual exclusion between modes is taken care of for us. It also makes it easy for us to maintain a single variable with the mode, which makes its intent more clear. We can use a single switch() to make sure we have covered all of the modes.

[PATCH v2 01/10] replace: refactor command-mode determination

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net The git-replace command has three modes: listing, deleting, and replacing. The first two are selected explicitly. If none is selected, we fallback to listing when there are no arguments, and replacing otherwise. Let's figure out up front which operation we are going

[PATCH v2 09/10] replace: add --edit to usage string

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/replace.c b/builtin/replace.c index 4ee3d92..1bb491d 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -16,6 +16,7 @@ static const char * const

[PATCH v2 08/10] replace: add tests for --edit

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 29 + 1 file changed, 29 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 719a116..7609174 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -318,6

Re: GIT, libcurl and GSS-Negotiate

2014-05-17 Thread Jeff King
On Fri, May 16, 2014 at 10:34:10PM +, brian m. carlson wrote: The tricky part is figuring out when to return HTTP_NOAUTH (do not try again, we failed) versus HTTP_REAUTH (get credentials and try again) in handle_curl_result. Right now the decision is based on did we have a username

Re: [PATCH v2 05/10] replace: make sure --edit results in a different object

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:27AM +0200, Christian Couder wrote: It's a bad idea to create a replace ref for an object that points to the original object itself. That's why we have to check if the result from editing the original object is a different object and error out if it isn't. I

Re: [PATCH v2 07/10] replace: die early if replace ref already exists

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:29AM +0200, Christian Couder wrote: If a replace ref already exists for an object, it is much better for the user if we error out before we let the user edit the object, rather than after. Definitely. Code looks fine to me. -Peff -- To unsubscribe from this

Re: [PATCH v2 08/10] replace: add tests for --edit

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:30AM +0200, Christian Couder wrote: Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 29 + 1 file changed, 29 insertions(+) Yay, tests. +test_expect_success 'setup a fake editor' ' + cat

Re: [PATCH v2 10/10] Documentation: replace: describe new --edit option

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:32AM +0200, Christian Couder wrote: @@ -63,6 +64,14 @@ OPTIONS --delete:: Delete existing replace refs for the given objects. +--edit object:: + Launch an editor to let the user change the content of + object, then create a new object of the

Re: [PATCH v2 00/10] replace: add option to edit a Git object

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:22AM +0200, Christian Couder wrote: This patch series comes from what Peff sent in the following thread: http://thread.gmane.org/gmane.comp.version-control.git/243361/focus=243528 The first 4 patches (1/4, 2/4, 3/4 and 4/4) didn't change since v1. I added 6

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
On Fri, May 16, 2014 at 04:14:45AM -0400, Jeff King wrote: On Thu, May 15, 2014 at 06:31:21PM -0700, Jeremiah Mahler wrote: ... A few questions/comments: +static int signature_file_callback(const struct option *opt, const char *arg, +

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote: We have routines for reading directly into a strbuf, which eliminates the need for this 1024-byte limit. We even have a wrapper that can make this much shorter: struct strbuf buf = STRBUF_INIT;

Re: [PATCH v2 1/2] t4205, t6006: Add failing tests for the case when i18n.logOutputEncoding is set

2014-05-17 Thread Alexey Shumkin
On Fri, May 16, 2014 at 11:49:40AM -0700, Junio C Hamano wrote: Alexey Shumkin alex.crez...@gmail.com writes: Pretty format string %(N,[ml]trunc)%s truncates subject to a given length with an appropriate padding. This works for non-ASCII texts when i18n.logOutputEncoding is UTF-8 only

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 03:42:24AM -0400, Jeff King wrote: On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote: We have routines for reading directly into a strbuf, which eliminates the need for this 1024-byte limit. We even have a wrapper that can make this much shorter:

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote: if (signature) { if (signature_file) die(you cannot specify both a signature and a signature-file); /* otherwise, we already have the value */ } else if (signature_file) { struct strbuf buf =

[PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Anders Kaseorg
The highlighting was pretty, but unfortunately, the failure mode when source-highlight is not installed was that the entire code block disappears. See https://bugs.debian.org/745591, https://bugs.launchpad.net/bugs/1316810. Signed-off-by: Anders Kaseorg ande...@mit.edu ---

Re: [GIT GUI PATCH] git-gui: use vcompare when comparing the git version

2014-05-17 Thread Pat Thoyts
Junio C Hamano gits...@pobox.com writes: Junio C Hamano gits...@pobox.com writes: Jens Lehmann jens.lehm...@web.de writes: Junio, I believe this issue needs to be fixed before 2.0 final. Otherwise git gui will not work inside submodules anymore due to the major version number change from 1

Re: [PATCH v10 13/44] tag.c: use ref transactions when doing updates

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: Change tag.c to use ref transactions for all ref updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/tag.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c

Re: [PATCH v10 22/44] fetch.c: clear errno before calling functions that might set it

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: In s_update_ref there are two calls that when they fail we return an error based on the errno value. In particular we want to return a specific error if ENOTDIR happened. Both these functions do have failure modes where they may return an error

Re: [PATCH v10 24/44] fetch.c: use a single ref transaction for all ref updates

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: Change store_updated_refs to use a single ref transaction for all refs that are updated during the fetch. This makes the fetch more atomic when update failures occur. Since ref update failures will now no longer occur in the code path for

Re: [PATCH v10 24/44] fetch.c: use a single ref transaction for all ref updates

2014-05-17 Thread Michael Haggerty
On 05/17/2014 05:05 PM, Michael Haggerty wrote: On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: [...] disk and thus we would not return STORE_REF_ERROR_DF_CONFLICT for this case. I think this new behaviour is more correct, since if there was a problem we would not even try to commit the

Re: [PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 07:08:55AM -0400, Anders Kaseorg wrote: The highlighting was pretty, but unfortunately, the failure mode when source-highlight is not installed was that the entire code block disappears. See https://bugs.debian.org/745591, https://bugs.launchpad.net/bugs/1316810. I

Re: [PATCH v10 25/44] receive-pack.c: use a reference transaction for updating the refs

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: Wrap all the ref updates inside a transaction to make the update atomic. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/receive-pack.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote: On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote: if (signature) { if (signature_file) die(you cannot specify both a signature and a signature-file); /* otherwise, we already have the value */

[PATCH v3 01/10] replace: refactor command-mode determination

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net The git-replace command has three modes: listing, deleting, and replacing. The first two are selected explicitly. If none is selected, we fallback to listing when there are no arguments, and replacing otherwise. Let's figure out up front which operation we are going

[PATCH v3 02/10] replace: use OPT_CMDMODE to handle modes

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net By using OPT_CMDMODE, the mutual exclusion between modes is taken care of for us. It also makes it easy for us to maintain a single variable with the mode, which makes its intent more clear. We can use a single switch() to make sure we have covered all of the modes.

[PATCH v3 09/10] replace: add --edit to usage string

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/replace.c b/builtin/replace.c index 4ee3d92..1bb491d 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -16,6 +16,7 @@ static const char * const

[PATCH v3 10/10] Documentation: replace: describe new --edit option

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 0a02f70..61461b9 100644 ---

[PATCH v3 03/10] replace: factor object resolution out of replace_object

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net As we add new options that operate on objects before replacing them, we'll want to be able to feed raw sha1s straight into replace_object. Split replace_object into the object-resolution part and the actual replacement. Signed-off-by: Jeff King p...@peff.net

[PATCH v3 04/10] replace: add --edit option

2014-05-17 Thread Christian Couder
From: Jeff King p...@peff.net This allows you to run: git replace --edit SHA1 to get dumped in an editor with the contents of the object for SHA1. The result is then read back in and used as a replace object for SHA1. The writing/reading is type-aware, so you get to edit ls-tree output

[PATCH v3 00/10] replace: add option to edit a Git object

2014-05-17 Thread Christian Couder
This patch series comes from what Peff sent in the following thread: http://thread.gmane.org/gmane.comp.version-control.git/243361/focus=243528 The only changes compared to v2 are in the test (8/10) and documentation patches (10/10). Thanks to Peff. Christian Couder (6): replace: make sure

[PATCH v3 08/10] replace: add tests for --edit

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 719a116..68b3cb2 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -318,6 +318,33

[PATCH v3 06/10] replace: refactor checking ref validity

2014-05-17 Thread Christian Couder
This will be useful in a following commit when we will want to check if the ref already exists before we let the user edit an object. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 31 --- 1 file changed, 20 insertions(+), 11

[PATCH v3 07/10] replace: die early if replace ref already exists

2014-05-17 Thread Christian Couder
If a replace ref already exists for an object, it is much better for the user if we error out before we let the user edit the object, rather than after. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v3] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
v3 patch to add format-patch --signature-file file option. This revision includes changes suggested by Jeff King: - Instead of a custom OPTION_CALLBACK, use OPT_FILENAME which correctly resolves file names which are not evaluated by the shell such as --signature-file=file -

[PATCH v3] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
Added feature that allows a signature file to be used with format-patch. $ git format-patch --signature-file ~/.signature -1 Now signatures with newlines and other special characters can be easily included. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com ---

Re: Problem: staging of an alternative repository

2014-05-17 Thread Pasha Bolokhov
Hi again I've come up with a fix for this. It's just two and a half lines, and required more studying the code than typing. A lot of path-processing work has been implemented in abspath.c and dir.c, including the symlinks and checking whether one path is a subdirectory of another. I

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread Felipe Contreras
Jeff King wrote: On Sat, May 17, 2014 at 12:25:30AM -0500, Felipe Contreras wrote: I agree with the line of reasoning you laid out in your email, especially: What a shock. Please stop with these unproductive and rude comments. I am sorry, but the fact of the matter is that you

commit all the untracked files prior adding them to stage using git add

2014-05-17 Thread Arup Rakshit
Here is the currently added files in my repository : arup@linux-wzza:~/Rails/test_app git status # On branch master # # Initial commit # # Untracked files: # (use git add file... to include in what will be committed) # # .gitignore # Gemfile # Gemfile.lock # README.rdoc

[GIT GUI PATCH v2] git-gui: tolerate major version changes when comparing the git version

2014-05-17 Thread Jens Lehmann
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with the following error: No working directory ../../../path couldn't change working directory to ../../../path: no such file or directory This is because git rev-parse --show-toplevel is only run when git gui

Re: Delaying 2.0 final

2014-05-17 Thread Jiang Xin
2014-05-17 6:45 GMT+08:00 Junio C Hamano gits...@pobox.com: As we seem to have a few regressions we may want to fix, I will not be cutting the 2.0 final today (https://tinyurl.com/gitCal). I queued the following near the bottom of 'pu' (these are also merged to 'next' to keep pu^{/match.next}

Re: [GIT GUI PATCH v2] git-gui: tolerate major version changes when comparing the git version

2014-05-17 Thread Chris Packham
On 18/05/14 07:49, Jens Lehmann wrote: Since git 2.0.0 starting git gui in a submodule using a gitfile fails with the following error: No working directory ../../../path couldn't change working directory to ../../../path: no such file or directory This is because git

Re: Delaying 2.0 final

2014-05-17 Thread Jiang Xin
2014-05-18 8:31 GMT+08:00 Jiang Xin worldhello@gmail.com: 2014-05-17 6:45 GMT+08:00 Junio C Hamano gits...@pobox.com: As we seem to have a few regressions we may want to fix, I will not be cutting the 2.0 final today (https://tinyurl.com/gitCal). I queued the following near the bottom of

Re: [PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Anders Kaseorg
On Sat, 17 May 2014, Jeremiah Mahler wrote: I agree that a broken document is an unacceptable failure mode. But I do not understand why 'source-highlight' is not an install requirement for 'git-doc'. If I install 'source-highlight' on my Debian machine the code looks great. apt-get

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread James Denholm
Felipe Contreras wrote: James Denholm wrote: On Fri, May 16, 2014 at 05:39:42PM -0500, Felipe Contreras wrote: (...) I would venture to say you have never made a package in your life. And you have, Felipe? Let us see the years of experience you surely have in the field. As a

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread Felipe Contreras
James Denholm wrote: Felipe Contreras wrote: James Denholm wrote: On Fri, May 16, 2014 at 05:39:42PM -0500, Felipe Contreras wrote: (...) I would venture to say you have never made a package in your life. And you have, Felipe? Let us see the years of experience you surely have

Re: [GIT GUI PATCH v2] git-gui: tolerate major version changes when comparing the git version

2014-05-17 Thread Eric Sunshine
On Sat, May 17, 2014 at 3:49 PM, Jens Lehmann jens.lehm...@web.de wrote: Since git 2.0.0 starting git gui in a submodule using a gitfile fails with the following error: No working directory ../../../path couldn't change working directory to ../../../path: no such file or

Re: commit all the untracked files prior adding them to stage using git add

2014-05-17 Thread Tanay Abhra
Arup Rakshit aruprakshit at rocketmail.com writes: Now I am looking for a way to add those in stage and commit also in a single line. So I did below :- arup at linux-wzza:~/Rails/test_app git commit -m chapter 19 of Agile Web Development with Rails -a # On branch master # # Initial