[PATCH 0/2] wincred makefile changes

2014-05-13 Thread Stepan Kasal
Hello again, I revisited a patch that is present in msysgit since Oct 2012. Dropping the cosmetic changes, there are two separate parts: Pat Thoyts (2): wincred: add install target wincred: avoid overwriting configured variables wincred: add install target Git for Windows does contain

[PATCH 1/2] wincred: add install target

2014-05-13 Thread Stepan Kasal
From: Pat Thoyts pattho...@users.sourceforge.net Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts pattho...@users.sourceforge.net Signed-off-by: Stepan Kasal ka...@ucw.cz --- contrib/credential/wincred/Makefile | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-13 Thread Stepan Kasal
From: Pat Thoyts pattho...@users.sourceforge.net Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts pattho...@users.sourceforge.net Signed-off-by: Stepan Kasal ka...@ucw.cz --- contrib/credential/wincred/Makefile | 4 1 file changed, 4 deletions(-) diff --git

Bash prompt namespace issue

2014-05-13 Thread szeder
Hi, Commit 59d3924fb (prompt: fix missing file errors in zsh) added the helper function eread() to git-prompt.sh. That function should be in the git namespace, i.e. prefixed with __git_, otherwise it might collide with a function of the same name in the user's environment. It's already

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 8:01 AM, Stepan Kasal ka...@ucw.cz wrote: From: Pat Thoyts pattho...@users.sourceforge.net Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts pattho...@users.sourceforge.net Signed-off-by: Stepan Kasal ka...@ucw.cz ---

[PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-13 Thread Stepan Kasal
From: Pat Thoyts pattho...@users.sourceforge.net Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts pattho...@users.sourceforge.net Signed-off-by: Stepan Kasal ka...@ucw.cz --- Hi kusma, On Tue, May 13, 2014 at 08:34:36AM +0200, Erik Faye-Lund wrote: Would it be better to set

Returning error message from custom smart http server

2014-05-13 Thread Ákos, Tajti
Dear List, we implemented our own git smart http server to be able to check permissions and other thing before pushes. It works fine, however, the error messages we generate on the server side are not displayed by the command line client. On the server we generate error messages like this:

Re: Error using git-remote-hg

2014-05-13 Thread Charles Brossollet
Le 12 mai 2014 à 21:37, Felipe Contreras felipe.contre...@gmail.com a écrit : Torsten Bögershausen wrote: I'm using git 1.9.3 on Mac OS X 10.9.2, with hg 3.0 installed with brew. It used to work before, on this same repository, since then git and hg were both upgraded. In short: The

[PATCH] git format-patch --signature string | file

2014-05-13 Thread Jeremiah Mahler
Improved format-patch --signature option so that it can read from a file as well as from a string. # from a string $ git format-patch --signature from a string origin # or from a file $ git format-patch --signature ~/.signature origin Now signatures with newlines or other special

Re: [BUG] git-gui regression in 2.0rcX within submodule

2014-05-13 Thread Chris Packham
Hi, On 13/05/14 11:45, Yann Dirson wrote: In 2.0rc2, git-gui is unable to work inside submodules, where 1.9.2 did not show such a problem: yann@home:~$ cd /tmp/ yann@home:tmp$ mkdir foo yann@home:tmp$ cd foo/ yann@home:foo$ git init Initialized empty Git repository in /tmp/foo/.git/

Re: Bug - Git reset --quiet not quiet

2014-05-13 Thread Erik Faye-Lund
On Mon, May 12, 2014 at 9:16 PM, Thomas-Louis Laforest tllafor...@arbault.ca wrote: Good afternoon, When running this command on Git for Windows (version 1.9.2-preview20140411) git reset --quiet --hard with one file having read/write lock git ask this question : Unlink of file ''

Re: Bug - Git reset --quiet not quiet

2014-05-13 Thread Johannes Sixt
Am 5/13/2014 11:09, schrieb Erik Faye-Lund: On Mon, May 12, 2014 at 9:16 PM, Thomas-Louis Laforest tllafor...@arbault.ca wrote: When running this command on Git for Windows (version 1.9.2-preview20140411) git reset --quiet --hard with one file having read/write lock git ask this question :

Re: Bug - Git reset --quiet not quiet

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 11:38 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/13/2014 11:09, schrieb Erik Faye-Lund: On Mon, May 12, 2014 at 9:16 PM, Thomas-Louis Laforest tllafor...@arbault.ca wrote: When running this command on Git for Windows (version 1.9.2-preview20140411) git reset

[PATCH 1/8] read-cache: allow to keep mmap'd memory after reading

2014-05-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 3 +++ read-cache.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index c6b7770..6549e02 100644 --- a/cache.h +++ b/cache.h @@ -290,10 +290,13 @@ struct index_state {

[PATCH 0/8] Speed up cache loading time

2014-05-13 Thread Nguyễn Thái Ngọc Duy
On Fri, May 9, 2014 at 5:27 PM, Duy Nguyen pclo...@gmail.com wrote: The below patch implements such a daemon to cache the index. It takes 91ms and 377ms to load a 25MB index with and without the daemon. I use share memory instead of pipe, but the format is still on disk not in memory for

[PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Nguyễn Thái Ngọc Duy
--- .gitignore | 1 + Makefile | 6 ++ config.mak.uname | 1 + git-compat-util.h | 8 +++ read-cache--daemon.c (new) | 167 + 5 files changed, 183 insertions(+) create mode 100644

[PATCH 3/8] daemonize: set a flag before exiting the main process

2014-05-13 Thread Nguyễn Thái Ngọc Duy
This allows signal handlers and atexit functions to realize this situation and not clean up. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/gc.c | 2 +- cache.h | 2 +- daemon.c | 2 +- setup.c | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff

[PATCH 2/8] unix-socket: stub impl. for platforms with no unix socket support

2014-05-13 Thread Nguyễn Thái Ngọc Duy
With this we can make unix_stream_* calls without #ifdef. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Makefile | 2 ++ unix-socket.h | 18 ++ 2 files changed, 20 insertions(+) diff --git a/Makefile b/Makefile index 028749b..d0a2b4b 100644 --- a/Makefile +++

[PATCH 3/3] read-cache: try index data from shared memory

2014-05-13 Thread Nguyễn Thái Ngọc Duy
--- read-cache.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/read-cache.c b/read-cache.c index 9e742c7..3100a59 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1462,6 +1462,35 @@ static struct cache_entry *create_from_disk(struct ondisk_cache_entry

[PATCH 6/8] read-cache--daemon: do not read index from shared memory

2014-05-13 Thread Nguyễn Thái Ngọc Duy
It does not hurt doing that. But it does not help anybody either. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- read-cache--daemon.c | 1 + read-cache.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/read-cache--daemon.c b/read-cache--daemon.c index

[PATCH 5/8] read-cache: try index data from shared memory

2014-05-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/config.txt | 4 cache.h | 1 + config.c | 12 environment.c| 1 + read-cache.c | 43 +++ submodule.c

[PATCH 4/8] Add read-cache--daemon for caching index and related stuff

2014-05-13 Thread Nguyễn Thái Ngọc Duy
The name of the shared memory folows the template /git-index-SHA1 where SHA1 is the trailing SHA-1 of the index file. If such a shared memory exists, it contains the same index content as on disk. The content is already validated by the daemon. Note that it does not necessarily use the same format

[PATCH 7/8] read-cache: skip verifying trailing SHA-1 on cached index

2014-05-13 Thread Nguyễn Thái Ngọc Duy
The daemon is responsible for verifying the index before putting it in the shared memory. No need to redo it again. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- read-cache.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/read-cache.c b/read-cache.c index

[PATCH 8/8] read-cache: inform the daemon that the index has been updated

2014-05-13 Thread Nguyễn Thái Ngọc Duy
The daemon would immediately load the new index in memory in background. Next time Git needs to read the index again, everything is ready. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 + read-cache.c | 53 - 2

[PATCH 9/8] even faster loading time with index version 254

2014-05-13 Thread Nguyễn Thái Ngọc Duy
This dirty (and likely buggy) patch shows a direction of lowering load time even more. Basically the shared memory now contains a clean memory dump that a git process could use with little preparation (which also means it's tied to C Git, other implementations can't use this) Memory is actually

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: diff --git a/Makefile b/Makefile index 028749b..98d22de 100644 --- a/Makefile +++ b/Makefile @@ -1502,6 +1502,12 @@ ifdef HAVE_DEV_TTY BASIC_CFLAGS += -DHAVE_DEV_TTY endif +ifdef HAVE_SHM +

Re: [PATCH 4/8] Add read-cache--daemon for caching index and related stuff

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: diff --git a/Documentation/git-read-cache--daemon.txt b/Documentation/git-read-cache--daemon.txt new file mode 100644 index 000..1b05be4 --- /dev/null +++ b/Documentation/git-read-cache--daemon.txt @@ -0,0

Re: [PATCH 2/8] unix-socket: stub impl. for platforms with no unix socket support

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: With this we can make unix_stream_* calls without #ifdef. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Makefile | 2 ++ unix-socket.h | 18 ++ 2 files changed, 20 insertions(+)

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Duy Nguyen
On Tue, May 13, 2014 at 6:52 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: diff --git a/Makefile b/Makefile index 028749b..98d22de 100644 --- a/Makefile +++ b/Makefile @@ -1502,6 +1502,12 @@ ifdef HAVE_DEV_TTY

Re: [PATCH 2/8] unix-socket: stub impl. for platforms with no unix socket support

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 1:59 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: With this we can make unix_stream_* calls without #ifdef. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Makefile | 2

Re: [PATCH 5/8] read-cache: try index data from shared memory

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/config.txt | 4 cache.h | 1 + config.c | 12 environment.c| 1 +

Re: [PATCH 8/8] read-cache: inform the daemon that the index has been updated

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 1:15 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: The daemon would immediately load the new index in memory in background. Next time Git needs to read the index again, everything is ready. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h |

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Duy Nguyen
What do you think is a good replacement for unix socket on Windows? It's only used to refresh the cache in the daemon, no sensitive data sent over, so security is not a problem. I'm thinking maybe just TCP/IP server, but that's going to be a system-wide daemon.. Perhaps the windows daemon could

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-13 Thread Felipe Contreras
On Tue, May 13, 2014 at 1:34 AM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 8:01 AM, Stepan Kasal ka...@ucw.cz wrote: From: Pat Thoyts pattho...@users.sourceforge.net Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts pattho...@users.sourceforge.net

[PATCH] contrib: completion: fix 'eread()' namespace

2014-05-13 Thread Felipe Contreras
Otherwise it might collide with a function of the same name in the user's environment. Suggested-by: SZEDER Gábor sze...@ira.uka.de Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/completion/git-prompt.sh | 16 1 file changed, 8 insertions(+), 8

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 3:01 PM, Duy Nguyen pclo...@gmail.com wrote: What do you think is a good replacement for unix socket on Windows? It's only used to refresh the cache in the daemon, no sensitive data sent over, so security is not a problem. I'm thinking maybe just TCP/IP server, but

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Duy Nguyen
On Tue, May 13, 2014 at 8:37 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 3:01 PM, Duy Nguyen pclo...@gmail.com wrote: What do you think is a good replacement for unix socket on Windows? It's only used to refresh the cache in the daemon, no sensitive data sent over, so

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-13 Thread Stepan Kasal
Hello, On Tue, May 13, 2014 at 08:18:26AM -0500, Felipe Contreras wrote: Set by whom? If it's by the environment you should be running 'make -e'. ... or on command line (through recursive make, prehaps). But these both take precedence over makefile assignments. Another issue is the interaction

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 3:49 PM, Duy Nguyen pclo...@gmail.com wrote: On Tue, May 13, 2014 at 8:37 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 3:01 PM, Duy Nguyen pclo...@gmail.com wrote: What do you think is a good replacement for unix socket on Windows? It's only

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Duy Nguyen
On Tue, May 13, 2014 at 9:06 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 3:49 PM, Duy Nguyen pclo...@gmail.com wrote: On Tue, May 13, 2014 at 8:37 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 3:01 PM, Duy Nguyen pclo...@gmail.com wrote: What

Re: [PATCH 2/3] Add read-cache--daemon

2014-05-13 Thread Erik Faye-Lund
On Tue, May 13, 2014 at 4:10 PM, Duy Nguyen pclo...@gmail.com wrote: On Tue, May 13, 2014 at 9:06 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Tue, May 13, 2014 at 3:49 PM, Duy Nguyen pclo...@gmail.com wrote: On Tue, May 13, 2014 at 8:37 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On

Re: [PATCH 0/8] Speed up cache loading time

2014-05-13 Thread Stefan Beller
That is clocked at 800 MHz. A repository at this size deserves a better CPU. At 2.5 GHz we spend 183.228ms on loading the index. A reasonable number to me. If we scale other parts of git-status as well as this, we should be able to make git status within 1 or 2 seconds. Which harddrive do

Re: [PATCH 0/8] Speed up cache loading time

2014-05-13 Thread Duy Nguyen
On Tue, May 13, 2014 at 9:24 PM, Stefan Beller stefanbel...@gmail.com wrote: That is clocked at 800 MHz. A repository at this size deserves a better CPU. At 2.5 GHz we spend 183.228ms on loading the index. A reasonable number to me. If we scale other parts of git-status as well as this, we

Re: Error using git-remote-hg

2014-05-13 Thread Torsten Bögershausen
(Please use reply-all and don't snip the important stuff) On 2014-05-13 09.54, Charles Brossollet wrote: Le 12 mai 2014 à 21:37, Felipe Contreras felipe.contre...@gmail.com a écrit : Torsten Bögershausen wrote: I'm using git 1.9.3 on Mac OS X 10.9.2, with hg 3.0 installed with brew. It

Re: [PATCH] git format-patch --signature string | file

2014-05-13 Thread Jonathan Nieder
Hi, Jeremiah Mahler wrote: # from a string $ git format-patch --signature from a string origin # or from a file $ git format-patch --signature ~/.signature origin Interesting. But... what if I want my patch to end with -- /home/jrnieder/.signature ? It seems

Re: Error using git-remote-hg

2014-05-13 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: I did some testing with Git 2.0-rc3 + 58aee0864adeeb5363f. The remote-helper tests for hg-git worked OK with both hg version 2.9 and 3.0 under both Mac OS and Linux. Should we consider 58aee086 to be included in Git 2.0 ? It is way too late for Git

Re: [PATCH v1 1/2] Remove 'git archimport'

2014-05-13 Thread Martin Langhoff
On Thu, May 8, 2014 at 9:33 PM, Felipe Contreras felipe.contre...@gmail.com wrote: No updates since 2010, and no tests. NAK. IMHO, this is quite unfriendly. Is this removal based on your opinion, or Junio's position (or consensus from maintainers from the list)? If there is a clear consensus

Re: [PATCH v2 01/17] contrib: remove outdated README

2014-05-13 Thread Martin Langhoff
On Fri, May 9, 2014 at 5:54 PM, Felipe Contreras felipe.contre...@gmail.com wrote: You are once more twisting the sequence of events. Found this gem looking for background to the proposed removal to code of mine. Felipe, if you are wanting to have a war of words with Junio, go have it, with

Re: [PATCH v1 1/2] Remove 'git archimport'

2014-05-13 Thread Felipe Contreras
Martin Langhoff wrote: On Thu, May 8, 2014 at 9:33 PM, Felipe Contreras felipe.contre...@gmail.com wrote: No updates since 2010, and no tests. NAK. IMHO, this is quite unfriendly. Is this removal based on your opinion, or Junio's position (or consensus from maintainers from the

Re: [PATCH v1 1/2] Remove 'git archimport'

2014-05-13 Thread Martin Langhoff
On Fri, May 9, 2014 at 1:44 PM, Junio C Hamano gits...@pobox.com wrote: Eric Wong normalper...@yhbt.net writes: Felipe Contreras felipe.contre...@gmail.com wrote: No updates since 2010, and no tests. Who benefits from this removal? Is this causing a maintenance burden for Junio? No. See

Re: [PATCH v1 1/2] Remove 'git archimport'

2014-05-13 Thread Martin Langhoff
On Tue, May 13, 2014 at 2:05 PM, Felipe Contreras felipe.contre...@gmail.com wrote: This tool doesn't even work anyway. It doesn't? Bug report / more info please? cheers, m -- martin.langh...@gmail.com - ask interesting questions - don't get distracted with shiny stuff - working code

Re: [PATCH v1 1/2] Remove 'git archimport'

2014-05-13 Thread Junio C Hamano
Martin Langhoff mar...@laptop.org writes: On Thu, May 8, 2014 at 9:33 PM, Felipe Contreras felipe.contre...@gmail.com wrote: No updates since 2010, and no tests. NAK. IMHO, this is quite unfriendly. Is this removal based on your opinion, or Junio's position (or consensus from

Re: [PATCH v2 01/17] contrib: remove outdated README

2014-05-13 Thread Junio C Hamano
Martin Langhoff martin.langh...@gmail.com writes: On Fri, May 9, 2014 at 5:54 PM, Felipe Contreras felipe.contre...@gmail.com wrote: You are once more twisting the sequence of events. Found this gem looking for background to the proposed removal to code of mine. Felipe, if you are wanting

Re: Error using git-remote-hg

2014-05-13 Thread Felipe Contreras
Junio C Hamano wrote: It is time to catch regressions by asking wider audiences who do not normally follow Git development (i.e. those who are not the ones that follow 'master' and rebuild/install it once or twice a week for their daily use). And you have one of those regressions in Git

Re: [PATCH v1 1/2] Remove 'git archimport'

2014-05-13 Thread Felipe Contreras
Martin Langhoff wrote: On Tue, May 13, 2014 at 2:05 PM, Felipe Contreras felipe.contre...@gmail.com wrote: This tool doesn't even work anyway. It doesn't? Bug report / more info please? Show me that it does. The documentation is lacking, and there's no tests at all. So it's hard to say is

[PATCH] Documentation: mention config sources for @{upstream}

2014-05-13 Thread W. Trevor King
The earlier documentation made vague references to is set to build on. Flesh that out with references to the config settings, so folks can use git-config(1) to get more detail on what @{upstream} means. For example, @{upstream} does not care about remote.pushdefault or branch.name.pushremote.

Re: Error using git-remote-hg

2014-05-13 Thread William Giokas
On Tue, May 13, 2014 at 10:30:26AM -0700, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: I did some testing with Git 2.0-rc3 + 58aee0864adeeb5363f. The remote-helper tests for hg-git worked OK with both hg version 2.9 and 3.0 under both Mac OS and Linux. Should we

Re: Bash prompt namespace issue

2014-05-13 Thread Junio C Hamano
sze...@ira.uka.de writes: Commit 59d3924fb (prompt: fix missing file errors in zsh) added the helper function eread() to git-prompt.sh. That function should be in the git namespace, i.e. prefixed with __git_, otherwise it might collide with a function of the same name in the user's

Re: [PATCH v2 01/17] contrib: remove outdated README

2014-05-13 Thread Felipe Contreras
Junio C Hamano wrote: Martin Langhoff martin.langh...@gmail.com writes: On Fri, May 9, 2014 at 5:54 PM, Felipe Contreras felipe.contre...@gmail.com wrote: You are once more twisting the sequence of events. Found this gem looking for background to the proposed removal to code of

[PATCH] remote-hg: getbundle changed in mercurial 3.0

2014-05-13 Thread William Giokas
In mercurial 3.0, getbundle was moved to the changegroup module, and gained a new argument. Due to this we cannot simply start using getbundle(...) imported from either one unconditionally, as that would cause errors in mercurial 3.0 without changing the syntax, and errors in mercurial 3.0 if we

Re: [PATCH v2 2/2] t: git-show: adapt tests to fixed 'git show'

2014-05-13 Thread Junio C Hamano
Max Kirillov m...@max630.net writes: 'git show' used to print extra newline after merge commit, and it was recorded so into the test reference data. Now when the behavior is fixed, the tests should be updated. Signed-off-by: Max Kirillov m...@max630.net --- Hmph. Having these as two

Re: [PATCH v2] contrib/subtree bugfix: Can't `add` annotated tag

2014-05-13 Thread Junio C Hamano
James Denholm nod.h...@gmail.com writes: cmd_add_commit() is passed FETCH_HEAD by cmd_add_repository, which is then rev-parsed into an object ID. However, if the user is fetching a tag rather than a branch HEAD, such as by executing: $ git subtree add -P oldGit https://github.com/git/git.git

Re: Error using git-remote-hg

2014-05-13 Thread Felipe Contreras
William Giokas wrote: On Tue, May 13, 2014 at 10:30:26AM -0700, Junio C Hamano wrote: Why do we import changegroup unconditionally, even though it is only used in the new codepath meant only for version 3.0 or higher, not inside the if block that decides if we need that

Re: Error using git-remote-hg

2014-05-13 Thread William Giokas
On Tue, May 13, 2014 at 02:09:55PM -0500, Felipe Contreras wrote: William Giokas wrote: On Tue, May 13, 2014 at 10:30:26AM -0700, Junio C Hamano wrote: Why do we import changegroup unconditionally, even though it is only used in the new codepath meant only for version 3.0 or

Re: [PATCH v2 2/2] t: git-show: adapt tests to fixed 'git show'

2014-05-13 Thread Max Kirillov
On Tue, May 13, 2014 at 12:26:42PM -0700, Junio C Hamano wrote: Hmph. Having these as two separate commits would mean that 1/2 alone will break the test, hurting bisectability a little bit. The necessary adjustments in this patch is small enough that we may be better off squashing them into

Re: [PATCH v2 1/2] git-show: fix 'git show -s' to not add extra terminator after merge commit

2014-05-13 Thread Max Kirillov
On Tue, May 13, 2014 at 07:57:08AM +0200, Johannes Sixt wrote: Am 5/13/2014 1:10, schrieb Max Kirillov: --- a/t/t7007-show.sh +++ b/t/t7007-show.sh @@ -25,6 +25,7 @@ test_expect_success 'set up a bit of history' ' git checkout -b side HEAD^^ test_commit side2 test_commit

[PATCH v2] remote-hg: getbundle changed in mercurial 3.0

2014-05-13 Thread William Giokas
In mercurial 3.0, getbundle was moved to the changegroup module, and gained a new argument. Due to this we cannot simply start using getbundle(...) imported from either one unconditionally, as that would cause errors in mercurial 3.0 without changing the syntax, and errors in mercurial 3.0 if we

Re: [PATCH v6 00/42] Use ref transactions for all ref updates

2014-05-13 Thread Jonathan Nieder
Hi, Ronnie Sahlberg wrote: This patch series is based on next and expands on the transaction API. Sorry to take so long to get to this. For the future, it's easier to review patches based on some particular branch that got merged into next, since next is a moving target (series come and go

[GUILT v2 00/29] Teach guilt import-commit how to create legal patch names, and more

2014-05-13 Thread Per Cederqvist
This is version two of the patch series I sent back on 21 Mar 2014. I have addressed all feedback to date, updated the coding style, and added signed-off-by lines from Jeff Sipek for those commits that I have received an explicit approval from him (but only if I have not made any other change to

[GUILT v2 01/29] The tests should not fail if guilt.diffstat is set.

2014-05-13 Thread Per Cederqvist
Explicitly set guilt.diffstat to its default value. Without this, the 027 test (and possibly others) fail if guilt.diffstat is set to true in ~/.gitconfig. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/scaffold | 1 + 1

[GUILT v2 02/29] Allow guilt delete -f to run from a dir which contains spaces.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-delete b/guilt-delete index 3e394f8..967ac10 100755 --- a/guilt-delete +++ b/guilt-delete @@ -49,7

[GUILT v2 03/29] Added test case for guilt delete -f.

2014-05-13 Thread Per Cederqvist
Ensure that the file really is deleted. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-026.out | 15 +++ regression/t-026.sh | 5 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git

[GUILT v2 04/29] Allow guilt import-commit to run from a dir which contains spaces.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-import-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index 20dcee2..f14647c 100755 --- a/guilt-import-commit +++ b/guilt-import-commit @@ -23,7 +23,7 @@ if !

[GUILT v2 06/29] Fix the do_get_patch function.

2014-05-13 Thread Per Cederqvist
A patch file consists of: (1) the description (2) optional diffstat (3) the patches When extracting the patch, we only want part 3. The do_get_patch used to give us part 2 and part 3. That made for instance this series of operations fail if guilt.diffstat is true: guilt push empty-1

[GUILT v2 05/29] guilt new: Accept more than 4 arguments.

2014-05-13 Thread Per Cederqvist
The argument parser arbitrarily refused to accept more than 4 arguments. That made it impossible to run guilt new -f -s -m msg patch. Removed the checks for the number of arguments from the guilt new parser -- the other checks that are already there are enough to catch all errors. Give a better

[GUILT v2 08/29] Added more test cases for guilt new: empty patches.

2014-05-13 Thread Per Cederqvist
Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-020.out | 250 +++ regression/t-020.sh | 60 + 2 files

[GUILT v2 07/29] Added test cases for guilt fold.

2014-05-13 Thread Per Cederqvist
Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty.) Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-035.out | 467 +++

Re: [PATCH] remote-hg: getbundle changed in mercurial 3.0

2014-05-13 Thread Junio C Hamano
William Giokas 1007...@gmail.com writes: In mercurial 3.0, getbundle was moved to the changegroup module, and gained a new argument. Due to this we cannot simply start using getbundle(...) imported from either one unconditionally, as that would cause errors in mercurial 3.0 without changing

[GUILT v2 09/29] Test suite: properly check the exit status of commands.

2014-05-13 Thread Per Cederqvist
The cmd and shouldfail functions checked the exit status of the replace_path function instead of the actual command that was running. (The $? construct checks the exit status of the last command in a pipeline, not the first command.) Updated t-032.sh, which used shouldfail instead of cmd in one

[GUILT v2 13/29] Check that guilt header '.*' fails.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-028.out | 7 +++ regression/t-028.sh | 4 2 files changed, 11 insertions(+) diff --git a/regression/t-028.out b/regression/t-028.out index 1564c09..ea72a3a 100644 --- a/regression/t-028.out +++ b/regression/t-028.out @@

[GUILT v2 11/29] test suite: remove pointless redirection.

2014-05-13 Thread Per Cederqvist
The shouldfail function already redirects stderr to stdout, so there is no need to do the same in t-028.sh and t-021.sh. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +-

[GUILT v2 10/29] Run test_failed if the exit status of a test script is bad.

2014-05-13 Thread Per Cederqvist
There were two problems with the old code: - Since set -e is in effect (that is set in scaffold) the run-test script exited immediately if a t-*.sh script failed. This is not nice, as we want the error report that test_failed prints. - The code ran cd - between running the t-*.sh script

[GUILT v2 12/29] guilt header: more robust header selection.

2014-05-13 Thread Per Cederqvist
If you run something like guilt header '.*' the command would crash, because the grep comand that tries to ensure that the patch exist would detect a match, but the later code expected the match to be exact. Fixed by comparing exact strings. And as a creeping feature guilt header will now try to

Re: Error using git-remote-hg

2014-05-13 Thread Felipe Contreras
William Giokas wrote: On Tue, May 13, 2014 at 02:09:55PM -0500, Felipe Contreras wrote: William Giokas wrote: On Tue, May 13, 2014 at 10:30:26AM -0700, Junio C Hamano wrote: Why do we import changegroup unconditionally, even though it is only used in the new codepath meant

[GUILT v2 14/29] Use git check-ref-format to validate patch names.

2014-05-13 Thread Per Cederqvist
The valid_patchname now lets git check-ref-format do its job instead of trying (and failing) to implement the same rules. See git-check-ref-format(1) for a list of the rules. Refer to the git-check-ref-format(1) man page in the error messages produced when valid_patchname indicates that the name

[GUILT v2 15/29] Produce legal patch names in guilt-import-commit.

2014-05-13 Thread Per Cederqvist
Try harder to create patch names that adhere to the rules in git-check-ref-format(1) when deriving a patch name from the commit message. Verify that the derived name using git check-ref-format, and as a final fallback simply use the patch name x (to ensure that the code is future-proof in case

[GUILT v2 16/29] Fix backslash handling when creating names of imported patches.

2014-05-13 Thread Per Cederqvist
The 'echo %s' construct sometimes processes escape sequences. (This happens, for instance, under Ubuntu 14.04 when /bin/sh is actually dash.) We don't want that to happen when we are importing commits, so use 'printf %s $s' instead. (The -E option of bash that explicitly disables backslash

[GUILT v2 17/29] guilt graph no longer loops when no patches are applied.

2014-05-13 Thread Per Cederqvist
Give an error message if no patches are applied. Added a test case that never terminates unless this fix is applied. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-graph | 9 +++-- regression/t-033.out | 3 +++ regression/t-033.sh | 13 + 3 files changed,

[GUILT v2 19/29] Check that guilt graph works when working on a branch with a comma.

2014-05-13 Thread Per Cederqvist
git branch names can contain commas. Check that guilt graph works even in that case. Signed-off-by: Per Cederqvist ced...@opera.com --- regression/t-033.out | 65 regression/t-033.sh | 39 +++ 2 files changed, 104

[GUILT v2 20/29] guilt graph: Handle patch names containing quotes.

2014-05-13 Thread Per Cederqvist
Quote quotes with a backslash in the guilt graph output. Otherwise, the dot file could contain syntax errors. Added a test case. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-graph | 2 ++ regression/t-033.out | 22 ++ regression/t-033.sh | 9

[GUILT v2 18/29] guilt-graph: Handle commas in branch names.

2014-05-13 Thread Per Cederqvist
This fix relies on the fact that git branch names can not contain :. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index

[GUILT v2 25/29] guilt push now fails when there are no more patches to push.

2014-05-13 Thread Per Cederqvist
This makes it easier to script operations on the entire queue, for example run the test suite on each patch in the queue: guilt pop -a;while guilt push; do make test||break; done This brings guilt push in line with the push operation in Mercurial Queues (hg qpush), which fails when there are

[GUILT v2 27/29] Minor testsuite fix.

2014-05-13 Thread Per Cederqvist
Fix remove_topic() in t-061.sh so that it doesn't print a git hash. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-061.out | 1 - regression/t-061.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[GUILT v2 26/29] guilt pop now fails when there are no more patches to pop.

2014-05-13 Thread Per Cederqvist
This is analogous to how guilt push now fails when there are no more patches to push. Like push, the --all argument still succeeds even if there was no need to pop anything. Updated the test suite. Signed-off-by: Per Cederqvist ced...@opera.com --- guilt-pop| 17 +++--

[GUILT v2 22/29] The log.decorate setting should not influence patchbomb.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-patchbomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-patchbomb b/guilt-patchbomb index 1231418..164b10c 100755 --- a/guilt-patchbomb +++

[GUILT v2 23/29] The log.decorate setting should not influence guilt rebase.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-rebase b/guilt-rebase index fd28e48..a1714a0 100755 --- a/guilt-rebase +++ b/guilt-rebase @@ -66,7

[GUILT v2 21/29] The log.decorate setting should not influence import-commit.

2014-05-13 Thread Per Cederqvist
Use --no-decorate in the call to git log that tries to read the commit message to produce patch names. Otherwise, if the user has set log.decorate to short or full, the patch name will be less useful. Modify the t-034.sh test case to demonstrate that this is needed. Signed-off-by: Per

[GUILT v2 24/29] disp no longer processes backslashes.

2014-05-13 Thread Per Cederqvist
Only one invocation of disp or _disp actually needed backslash processing. In quite a few instances, it was wrong to do backslash processing, as the message contained data derived from the user. Created the new function disp_e that should be used when backslash processing is required, and

[GUILT v2 28/29] Added guilt.reusebranch configuration option.

2014-05-13 Thread Per Cederqvist
When the option is true (the default), Guilt does not create a new Git branch when patches are applied. This way, you can switch between Guilt 0.35 and the current version of Guilt with no issues. At a future time, maybe a year after Guilt with guilt.reusebranch support is released, the default

[GUILT v2 29/29] Added a short style guide, and Emacs settings.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com --- .dir-locals.el | 3 +++ Documentation/Contributing | 15 +++ 2 files changed, 18 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 000..50ef2b7

  1   2   >