Re: git 2.6.0 apply --cached failed

2015-09-30 Thread Junio C Hamano
It probably is this one: http://thread.gmane.org/gmane.comp.version-control.git/270370/focus=270501 Older Git was loose and did not notice it, but the second hunk of your patch is judged to be broken, with no added or deleted line whatsoever, by the latest version. -- To unsubscribe from this

git 2.6.0 apply --cached failed

2015-09-30 Thread 乙酸鋰
Hi, Using git 2.6.0 on Linux 64-bit git apply --cached failed Please test with command with the repository inside the attached tarball. With git 2.6, git apply --cached < patch.patch fatal: corrupt patch at line 27 Expected result: no error Step to reproduce: Please run the following shell s

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Max Kirillov
On Wed, Sep 30, 2015 at 10:28:14PM +0300, Max Kirillov wrote: > On Mon, Sep 28, 2015 at 09:44:57PM +0200, Johannes Schindelin wrote: >> -if (option_dissociate) >> +if (option_dissociate) { >> +struct packed_git *p; >> + >> +for (p = packed_git; p; p = p->next) { >> +

message not appear in mailing list

2015-09-30 Thread 乙酸鋰
Hi, Why the message not appear in mailing list for many hours? There is no reject reply message. I sent the mail in plain text with a tarball attachment. http://dir.gmane.org/gmane.comp.version-control.git -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message t

[BUG?] applypatch-msg hook no-longer thinks stdin is a tty

2015-09-30 Thread Chris Packham
Hi, I have a applypatch-msg hook that implements some policy for acceptable commit messages and reject non-conformant patches. It also is able to prompt me to override it's rejection. The prompting only happens when stdin is a tty (as determined by pythons sys.stdin.isatty()) For example this wou

[PATCH/RFC 0/2] close packs files when they are not needed

2015-09-30 Thread Max Kirillov
> The right approach may to have a helper in sha1_file.c that closes > and cleans up _all_ packs, and call it from here, instead of having > builtin/clone.c even know about implementation details such as > packed_git is a linked list, etc. Like this? Note I did not test it to actually work for t

[PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-09-30 Thread Max Kirillov
When a builtin has done its job, but waits for pager or not waited by its caller and still hanging it keeps pack files opened. This can cause a number of issues, for example on Windows git gc cannot remove the packs. Fix this by explicitly closing all pack files and unmapping memory from the packs

[PATCH/RFC 2/2] sha1_file: set packfile to O_CLOEXEC at open

2015-09-30 Thread Max Kirillov
Windows does not support setting O_CLOEXEC by fcntl, but there is an open flag O_NOINHERIT which results in same behaviour. Use it in git_open_noatime() and also bring setting O_CLOEXEC there also to make it consistent. Rename the function to git_open_noatime_cloexec(), to avoid confusion. Signed-

Re: [PATCH 41/68] init: use strbufs to store paths

2015-09-30 Thread Jeff King
On Wed, Sep 30, 2015 at 01:00:56PM -0700, Junio C Hamano wrote: > > Wow, my patch isn't even close to reasonable. I didn't realize because > > we do not compile this code at all for non-Mac platforms. Sorry. > > Perhaps the way we completely stub out the platform specific helpers > contributes to

[PATCHv6 4/8] strbuf: add strbuf_read_once to read without blocking

2015-09-30 Thread Stefan Beller
The new call will read from a file descriptor into a strbuf once. The underlying call xread_nonblock is meant to execute without blocking if the file descriptor is set to O_NONBLOCK. It is a bug to call strbuf_read_once on a file descriptor which would block. Signed-off-by: Stefan Beller Signed-o

[PATCHv6 3/8] xread_nonblock: add functionality to read from fds without blocking

2015-09-30 Thread Stefan Beller
Provide a wrapper to read(), similar to xread(), that restarts on EINTR but not EAGAIN (or EWOULDBLOCK). This enables the caller to handle polling itself, possibly polling multiple sockets or performing some other action. Helped-by: Jacob Keller Helped-by: Jeff King , Helped-by: Junio C Hamano S

[PATCHv6 7/8] fetch_populated_submodules: use new parallel job processing

2015-09-30 Thread Stefan Beller
In a later patch we enable parallel processing of submodules, this only adds the possibility for it. So this change should not change any user facing behavior. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule.c | 128 --

[PATCHv6 6/8] run-command: add an asynchronous parallel child processor

2015-09-30 Thread Stefan Beller
This allows to run external commands in parallel with ordered output on stderr. If we run external commands in parallel we cannot pipe the output directly to the our stdout/err as it would mix up. So each process's output will flow through a pipe, which we buffer. One subprocess can be directly pi

[PATCHv6 8/8] submodules: allow parallel fetching, add tests and documentation

2015-09-30 Thread Stefan Beller
This enables the work of the previous patches. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 7 +++ builtin/fetch.c | 6 +- builtin/pull.c | 6 ++ submodule.c | 3 +-- submodu

[PATCHv6 5/8] sigchain: add command to pop all common signals

2015-09-30 Thread Stefan Beller
The new method removes all common signal handlers that were installed by sigchain_push. CC: Jeff King Signed-off-by: Stefan Beller --- sigchain.c | 9 + sigchain.h | 1 + 2 files changed, 10 insertions(+) diff --git a/sigchain.c b/sigchain.c index faa375d..2ac43bb 100644 --- a/sigchain

[PATCHv6 0/8] fetch submodules in parallel

2015-09-30 Thread Stefan Beller
This replaces sb/submodule-parallel-fetch once again. Changes are only in patch 5,6,7 (5: reverse popping, 6: see below, 7: adapt to changes of 6). Junio wrote: > > + if (pp->return_value(pp->data, &pp->children[i].process, > > + &pp->children[i].err, c

[PATCHv6 1/8] submodule.c: write "Fetching submodule " to stderr

2015-09-30 Thread Stefan Beller
From: Jonathan Nieder The "Pushing submodule " progress output correctly goes to stderr, but "Fetching submodule " is going to stdout by mistake. Fix it to write to stderr. Noticed while trying to implement a parallel submodule fetch. When this particular output line went to a different file d

[PATCHv6 2/8] xread: poll on non blocking fds

2015-09-30 Thread Stefan Beller
>From the man page: EAGAIN The file descriptor fd refers to a file other than a socket and has been marked nonblocking (O_NONBLOCK), and the read would block. EAGAIN or EWOULDBLOCK The file descriptor fd refers to a socket and has been marked nonblocking (O_NONBLOCK), a

What's cooking in git.git (Sep 2015, #07; Wed, 30)

2015-09-30 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'. Git 2.6.0 was released a few days ago. I'll do 2.6.1 early next week, together with updates to a few older maintenance tracks, and we'll start

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> +pick|p|drop|d|reword|r|edit|e|squash|s|fixup|f) >> +if ! check_commit_sha "${rest%% *}" "$lineno" "$1" > > This does not pass my "tabs" test, as it parses the sha1 out of the line > assuming it's separated with a

[PATCH v2] rebase-i: loosen over-eager check_bad_cmd check

2015-09-30 Thread Matthieu Moy
804098bb (git rebase -i: add static check for commands and SHA-1, 2015-06-29) tried to check all insns before running any in the todo list, but it did so by implementing its own parser that is a lot stricter than necessary. We used to allow lines that are indented (including comment lines), and we

Re: [PATCH] rebase-i: loosen over-eager check_bad_cmd check

2015-09-30 Thread Eric Sunshine
On Wed, Sep 30, 2015 at 4:01 PM, Matthieu Moy wrote: > 804098bb (git rebase -i: add static check for commands and SHA-1, > 2015-06-29) tried to check all insns before running any in the todo > list, but it did so by implementing its own parser that is a lot > stricter than necessary. We used to a

[PATCH] rebase-i: loosen over-eager check_bad_cmd check

2015-09-30 Thread Matthieu Moy
804098bb (git rebase -i: add static check for commands and SHA-1, 2015-06-29) tried to check all insns before running any in the todo list, but it did so by implementing its own parser that is a lot stricter than necessary. We used to allow lines that are indented (including comment lines), and we

Re: [PATCH 41/68] init: use strbufs to store paths

2015-09-30 Thread Junio C Hamano
Jeff King writes: > On Tue, Sep 29, 2015 at 04:50:39PM -0700, Michael Blume wrote: > >> I see compile errors on my mac: >> >> First a whole bunch of >> >> ./compat/precompose_utf8.h:30:45: warning: declaration of 'struct >> strbuf' will not be visible outside of this function [-Wvisibility] >>

[PATCH] gitk: add missing accelerators

2015-09-30 Thread Beat Bolli
In d99b4b0de27a ("gitk: Accelerators for the main menu", 2015-09-09), accelerators were added to allow efficient keyboard navigation. One instance of the strings "Edit view..." and "Delete view" were left without the ampersand. Add the missing ampersand characters to unbreak our international user

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Matthieu Moy
Junio C Hamano writes: > + pick|p|drop|d|reword|r|edit|e|squash|s|fixup|f) > + if ! check_commit_sha "${rest%% *}" "$lineno" "$1" This does not pass my "tabs" test, as it parses the sha1 out of the line assuming it's separated with a space. It's used in other plac

[PATCH v2] am: configure gpg at startup

2015-09-30 Thread Renee Margaret McConahy
The new builtin am ignores the user.signingkey variable: gpg is being called with the committer details as the key ID, which may not be correct. git_gpg_config is responsible for handling that variable and is expected to be called on initialization by any modules that use gpg. Perhaps git_gpg_conf

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Junio C Hamano
Max Kirillov writes: >> +if (option_dissociate) { >> +struct packed_git *p; >> + >> +for (p = packed_git; p; p = p->next) { >> +close_pack_windows(p); >> +close_pack_index(p); >> +} >> dissociate_from_ref

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Junio C Hamano
Matthieu Moy writes: > Sounds good, yes. I'll send a patch with this and my updated tests. Thanks. I think our mails crossed, so I'd discard my copy that lacks the new test you wrote. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.ke

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Max Kirillov
On Mon, Sep 28, 2015 at 09:44:57PM +0200, Johannes Schindelin wrote: > When `git clone` is asked to dissociate the repository from the > reference repository whose objects were used, it is quite possible that > the pack files need to be repacked. In that case, the pack files need to > be deleted th

Re: [PATCH] am: configure gpg at startup

2015-09-30 Thread Junio C Hamano
Renee Margaret McConahy writes: > The new builtin am ignores the user.signingkey variable: gpg is being > called with the committer details as the key ID, which may not be > correct. git_gpg_config is responsible for handling that variable and is > expected to be called on initialization by any m

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Junio C Hamano
Junio C Hamano writes: > I am actually tempted to say that we should revert 804098b, which is > the simplest fix. > > If we want "check everything before doing a single thing" mode, the > right way to do it would be to base the check on the same loop as > transform_todo_ids (one way to do so woul

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> With Git <2.0.6, 'git rebase' used to accept lines starting with >> whitespaces followed with '#' as a comment. This was broken by >> 804098b (git rebase -i: add static check for commands and SHA-1, >> 2015-06-29), which introduced additional ch

Re: [PATCH] Provide a dirname() function when NO_LIBGEN_H=YesPlease

2015-09-30 Thread Ramsay Jones
Hi Johannes, On 30/09/15 15:50, Johannes Schindelin wrote: > When there is no `libgen.h` to our disposal, we miss the `dirname()` > function. > > So far, we only had one user of that function: credential-cache--daemon > (which was only compiled when Unix sockets are available, anyway). But > now

Re: [PATCH] am: configure gpg at startup

2015-09-30 Thread Eric Sunshine
On Wed, Sep 30, 2015 at 1:49 PM, Renee Margaret McConahy wrote: > The new builtin am ignores the user.signingkey variable: gpg is being > called with the committer details as the key ID, which may not be > correct. git_gpg_config is responsible for handling that variable and is > expected to be ca

[PATCH] am: configure gpg at startup

2015-09-30 Thread Renee Margaret McConahy
The new builtin am ignores the user.signingkey variable: gpg is being called with the committer details as the key ID, which may not be correct. git_gpg_config is responsible for handling that variable and is expected to be called on initialization by any modules that use gpg. Perhaps git_gpg_conf

Re: [PATCH 6/8] run-command: add an asynchronous parallel child processor

2015-09-30 Thread Junio C Hamano
Junio C Hamano writes: > I may have comments on other parts of this patch, but I noticed this > a bit hard to read while reading the end result. > ... I finished reading the remainder. Other than the above all look sensible. Will replace what had been queued. Thanks. -- To unsubscribe from th

Re: [PATCH 6/8] run-command: add an asynchronous parallel child processor

2015-09-30 Thread Stefan Beller
On Tue, Sep 29, 2015 at 8:12 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> + while (1) { >> + int i; >> + int output_timeout = 100; >> + int spawn_cap = 4; >> + >> + if (!no_more_task) { >> + for (i = 0; i < spawn_ca

Re: [PATCH] Provide a dirname() function when NO_LIBGEN_H=YesPlease

2015-09-30 Thread Junio C Hamano
Johannes Schindelin writes: > I stumbled over the compile warning when upgrading Git for Windows > to 2.6.0. There was a left-over NO_LIBGEN_H=YesPlease (which we > no longer need in Git for Windows 2.x), but it did point to the > fact that we use `dirname()` in builtin/am

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Junio C Hamano
Matthieu Moy writes: > With Git <2.0.6, 'git rebase' used to accept lines starting with > whitespaces followed with '#' as a comment. This was broken by > 804098b (git rebase -i: add static check for commands and SHA-1, > 2015-06-29), which introduced additional checks on the TODO-list using > "g

Re: [PATCH] git-send-email.perl: Fixed sending of many/huge changes/patches

2015-09-30 Thread Junio C Hamano
Lars Wendler writes: > It seems to me that there is a size limit, after cutting down the patch > to ~16K, sending started to work. I cut it twice, once by removing lines > from the head and once from the bottom, in both cases at the size of > around 16K I could send the patch. > > See also origin

[PATCH] Provide a dirname() function when NO_LIBGEN_H=YesPlease

2015-09-30 Thread Johannes Schindelin
When there is no `libgen.h` to our disposal, we miss the `dirname()` function. So far, we only had one user of that function: credential-cache--daemon (which was only compiled when Unix sockets are available, anyway). But now we also have `builtin/am.c` as user, so we need it. Since `dirname()` i

Re: Gitk cannot start in the latest version when using --all

2015-09-30 Thread Alexander Rettig
Konstantin Khomoutov 007spb.ru> writes: > > On Tue, 29 Sep 2015 15:51:46 +0200 > Christophe COEVOET notk.org> wrote: > > > >> I'm installing git and gitk from the Ubuntu PPA maintained by the > > >> Git team. I received the Git 2.6 update today. > > >> Since this update, I'm unable to launch g

Re: gitk crashes with german translation

2015-09-30 Thread Konstantin Khomoutov
On Wed, 30 Sep 2015 09:58:14 + (UTC) Peter Vasil wrote: > When I try to run "gitk --all" on Mac with German language settings I > get the following error: > Error in startup script: bad menu entry index "Ansicht bearbeiten ..." > while executing > ".bar.view entryconf [mca "Edit view..."]

gitk crashes with german translation

2015-09-30 Thread Peter Vasil
Hi list, When I try to run "gitk --all" on Mac with German language settings I get the following error: Error in startup script: bad menu entry index "Ansicht bearbeiten ..." while executing ".bar.view entryconf [mca "Edit view..."] -state normal" invoked from within "if {$cmdline_files n

Re: [PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Remi Galan Alfonso
Matthieu Moy writes: > With Git <2.0.6, 'git rebase' used to accept lines starting with > whitespaces followed with '#' as a comment. This was broken by > 804098b (git rebase -i: add static check for commands and SHA-1, > 2015-06-29), which introduced additional checks on the TODO-list using > "gi

Re: [PATCH] git-send-email.perl: Fixed sending of many/huge changes/patches

2015-09-30 Thread Johannes Schindelin
Hi Lars, On 2015-09-30 09:26, Lars Wendler wrote: > From: Stefan Agner > > Sometimes sending huge patches/commits fail with > > [Net::SMTP::SSL] Connection closed at /usr/lib/git-core/git-send-email > line 1320. > > Running the command with --smtp-debug=1 yields to > > Net::SMTP::SSL: Net::Cm

[PATCH] rebase: accept indented comments (fixes regression)

2015-09-30 Thread Matthieu Moy
With Git <2.0.6, 'git rebase' used to accept lines starting with whitespaces followed with '#' as a comment. This was broken by 804098b (git rebase -i: add static check for commands and SHA-1, 2015-06-29), which introduced additional checks on the TODO-list using "git stripspaces" which only strips

[PATCH] git-send-email.perl: Fixed sending of many/huge changes/patches

2015-09-30 Thread Lars Wendler
From: Stefan Agner Sometimes sending huge patches/commits fail with [Net::SMTP::SSL] Connection closed at /usr/lib/git-core/git-send-email line 1320. Running the command with --smtp-debug=1 yields to Net::SMTP::SSL: Net::Cmd::datasend(): unexpected EOF on command channel: at /usr/lib/git-core/