Re: poll() emulation in git

2012-09-05 Thread Paolo Bonzini
Il 05/09/2012 13:24, Joachim Schmitz ha scritto: However: this poll implementation, while compiling OK, doesn't work properly. Because it uses recv(...,MSG_PEEK), it works on sockets only (returns ENOTSOCK on anything else), while the real poll() works on all kind if file descriptors, at

Re: poll() emulation in git

2012-09-05 Thread Paolo Bonzini
Il 05/09/2012 15:36, Joachim Schmitz ha scritto: Does your system have a working FIONREAD ioctl for pipes? It does have FIONREAD ioctl. Whether it works properly is to be determined... I'll test if you could show me how? Oh, now I see what you aimed at, but no, that Mac OS X method

Re: poll() emulation in git

2012-09-06 Thread Paolo Bonzini
Il 06/09/2012 16:02, Joachim Schmitz ha scritto: But is there something that could be done to make git work even without poll()? It is used in 5 places: $ grep -n poll\( *.c */*.c credential-cache--daemon.c:175: if (poll(pfd, 1, 1000 * wakeup) 0) { daemon.c:1018: if (poll(pfd,

Re: poll() emulation in git

2012-09-06 Thread Paolo Bonzini
Il 06/09/2012 16:44, Joachim Schmitz ha scritto: Yes, it's an usleep(autocorrect * 10) basically (poll takes milliseconds, not micro). OK, it is _supposed_ to do this usleep(), but is does not, as poll() returns early with EFAULT in this case: /* EFAULT is not necessary to implement,

Re: poll() emulation in git

2012-09-07 Thread Paolo Bonzini
Il 07/09/2012 09:39, Joachim Schmitz ha scritto: I suppose it works to always handle ENOTSOCK that way, even on non-__TANDEM systems. Will you be fixing this in gnulib? How? I don't have access to the system, so it's best if you post the patches yourself to bug-gnulib and git mailing lists

[PATCH 1/2] git-send-email: delay creation of MIME headers

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com After the next patch, git-send-email will sometimes modify existing Content-Transfer-Encoding headers. Delay the addition of the header to @xh until just before sending. Do the same for MIME-Version, to avoid adding it twice. Signed-off-by: Paolo Bonzini

[PATCH 0/2] git-send-email: add --transfer-encoding option for conversion to specified encoding

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com The thread at http://thread.gmane.org/gmane.comp.version-control.git/257392 details problems when applying patches with git am in a repository with CRLF line endings. In the example in the thread, the repository originated from git-svn so

[PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com This series adds a --message-id option to git-mailinfo and git-am. git-am also gets an am.messageid configuration key to set the default, and a --no-message-id option to override the configuration key. (I'm not sure of the usefulness of a mailinfo.messageid

[PATCH 2/2] git-send-email: add --transfer-encoding option

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com The thread at http://thread.gmane.org/gmane.comp.version-control.git/257392 details problems when applying patches with git am in a repository with CRLF line endings. In the example in the thread, the repository originated from git-svn so

[PATCH 1/2] git-mailinfo: add --message-id

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com This option adds the content of the Message-Id header at the end of the commit message prepared by git-mailinfo. This is useful in order to associate commit messages automatically with mailing list discussions. Signed-off-by: Paolo Bonzini pbonz

[PATCH 2/2] git-am: add --message-id/--no-message-id

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com Parse the option and pass it directly to git-mailinfo. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Documentation/git-am.txt | 11 +++ git-am.sh| 21 +++-- t/t4150-am.sh| 23

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-25 Thread Paolo Bonzini
On 25/11/2014 17:27, Christian Couder wrote: From: Paolo Bonzini pbonz...@redhat.com This series adds a --message-id option to git-mailinfo and git-am. git-am also gets an am.messageid configuration key to set the default, and a --no-message-id option to override the configuration key

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-25 Thread Paolo Bonzini
On 25/11/2014 19:33, Junio C Hamano wrote: If both --message-id and -s are specified, the Signed-off-by goes last. This is coming out more or less naturally out of the git-am implementation, but is also tested in t4150-am.sh. Nice. So if you apply a message whose last sign-off is

Re: [PATCH 2/2] git-am: add --message-id/--no-message-id

2014-11-25 Thread Paolo Bonzini
On 26/11/2014 00:34, Junio C Hamano wrote: ... makes the result look questionable. The variable is initialized to empty; when it is written out to $dotest/messageid and later read back here, that empty value is not covered by this case statement. Perhaps clearing messageid= upon seeing

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-26 Thread Paolo Bonzini
On 25/11/2014 22:21, Christian Couder wrote: On Tue, Nov 25, 2014 at 6:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 25/11/2014 17:27, Christian Couder wrote: From: Paolo Bonzini pbonz...@redhat.com This series adds a --message-id option to git-mailinfo and git-am. git-am also gets

[PATCH 1/3] request-pull: fix expected format in tests

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com tag foo in requests has been replaced with tags/foo (commit f032d66, request-pull: do not emit tag before the tagname, 2011-12-19). Adjust the parsing script to match; since the new format does not have spaces, doing nothing is fine. Signed-off-by: Paolo

[PATCH 3/3] request-pull: find matching tag or branch name on remote side

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com If the third argument is not passed to git request-pull, the find_matching_ref script will look for HEAD in the remote side which does not work. Instead, default to the ref names found via git show-ref or git tag. Signed-off-by: Paolo Bonzini pbonz

[PATCH 0/3] request-pull: do something if $3 is passed

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com After updating to git 2.3.0, git request-pull is stubbornly complaining that I lack a matching tag on the remote side unless I pass the third argument. But I did prepare and push a signed tag. This looks like a bug to me; when $3 is not passed git

[PATCH 2/3] request-pull: use git tag --points-at to detect local tags

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini pbonz...@redhat.com If the third argument is not passed, git show-ref --tags HEAD will never return anything and git-request-pull will never detect a tag name. Instead, git tag --points-at can find it. Use it if git show-ref fails. Signed-off-by: Paolo Bonzini pbonz

Re: [PATCH 0/3] request-pull: do something if $3 is passed

2015-02-17 Thread Paolo Bonzini
On 17/02/2015 20:57, Junio C Hamano wrote: Sorry, I was asking what you mean by complains (i.e. the exact error message). I was and am guessing it is something like this: warn: No match for commit 3188ab3... found at url warn: Are you sure you pushed 'HEAD' there? Yes, it is.

Re: [PATCH 0/3] request-pull: do something if $3 is passed

2015-02-17 Thread Paolo Bonzini
On 16/02/2015 20:47, Junio C Hamano wrote: Paolo Bonzini bonz...@gnu.org writes: From: Paolo Bonzini pbonz...@redhat.com After updating to git 2.3.0, git request-pull is stubbornly complaining that I lack a matching tag on the remote side unless I pass the third argument. But I did

Re: [PATCH 0/3] request-pull: do something if $3 is passed

2015-02-17 Thread Paolo Bonzini
On 17/02/2015 21:42, Linus Torvalds wrote: when $3 is not passed git will try to use HEAD as the default but it cannot be resolved to a tag, neither locally (patch 2) nor remotely (patch 3) which makes absolutely no sense. Indeed, that's why I wrote patches even though I did find the

Re: [PATCH 0/3] request-pull: do something if $3 is passed

2015-02-17 Thread Paolo Bonzini
Looking for HEAD in git ls-remote? Perfectly sensible: [torvalds@i7 linux]$ git ls-remote origin | grep HEAD cc4f9c2a91b7be7b3590bb1cbe8148873556aa3f HEAD that's the default thing when you don't specify any particular branch or tag. Sure. But if I got a pull request saying

Re: [PATCH 01/12] t4150: am.messageid really adds the message id

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 20:16, Paul Tan wrote: Since a078f73 (git-am: add --message-id/--no-message-id, 2014-11-25), the am.messageid setting determines whether the --message-id option is set by default. Add a test for this. Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paul Tan pyoka

[PATCH v4 2/4] trailers: introduce struct new_trailer_item

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> This will provide a place to store the current state of the --where, --if-exists and --if-missing options. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- builtin/interpret-trailers.c | 41 +---

[PATCH v4 0/4] interpret-trailers: add --where, --if-exists, --if-missing

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> These options are useful to experiment with "git interpret-trailers" without having to tinker with .gitconfig (Junio said git should ahve done this first and only added configuration afterwards). It can be useful in the case where you

[PATCH v4 4/4] interpret-trailers: fix documentation typo

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Self-explanatory... trailer.ifexists is documented with the right name, but after a while it switches to ifexist. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- Documentation/git-interpret-trailers.txt | 4 ++-- 1 file changed,

[PATCH v4 3/4] interpret-trailers: add options for actions

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Allow using non-default values for trailers without having to set them up in .gitconfig first. For example, if you have the following configuration trailer.signed-off-by.where = end you may use "--where before" when a patch au

[PATCH v4 1/4] trailers: export action enums and corresponding lookup functions

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Separate the mechanical changes out of the next patch. The functions are changed to take a pointer to enum, because struct conf_info is not going to be public. Set the default values explicitly in default_conf_info, since they are not anymore

Re: [PATCH v4 0/4] interpret-trailers: add --where, --if-exists, --if-missing

2017-08-14 Thread Paolo Bonzini
On 01/08/2017 11:03, Paolo Bonzini wrote: > From: Paolo Bonzini <pbonz...@redhat.com> > > These options are useful to experiment with "git interpret-trailers" > without having to tinker with .gitconfig (Junio said git should ahve > done this first and only added con

Re: [PATCH v2 0/3] interpret-trailers: add --where, --if-exists, --if-missing

2017-07-12 Thread Paolo Bonzini
On 13/07/2017 01:02, Junio C Hamano wrote: > Paolo Bonzini <bonz...@gnu.org> writes: > >> From: Paolo Bonzini <pbonz...@redhat.com> >> >> These options are useful to experiment with "git interpret-trailers" >> without having to tinker with .gitc

Re: [PATCH 0/3] interpret-trailers: add --where, --if-exists, --if-missing

2017-07-12 Thread Paolo Bonzini
On 12/07/2017 16:47, Christian Couder wrote: > On Wed, Jul 12, 2017 at 3:46 PM, Paolo Bonzini <bonz...@gnu.org> wrote: >> >> These options are useful to experiment with "git interpret-trailers" >> without having to tinker with .gitconfig. It can also be us

[PATCH 3/3] interpret-trailers: add options for actions

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Allow using non-default values for trailers without having to set them up in .gitconfig first. For example, if you have the following configuration trailer.signed-off-by.where = end you may use "--where before" when a patch au

[PATCH 1/3] trailers: create struct trailer_opts

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Pass the command-line arguments as a pointer to a new struct. This will be extended soon to include more options. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- builtin/interpret-trailers.c | 13 ++--- trailer.c

[PATCH 0/3] interpret-trailers: add --where, --if-exists, --if-missing

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> These options are useful to experiment with "git interpret-trailers" without having to tinker with .gitconfig. It can also be useful in the oddball case where you want a different placement for the trailer. The case that stimula

[PATCH 2/3] trailers: export action enums and corresponding lookup functions

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Separate the mechanical changes out of the next patch. The functions are changed to take a pointer to enum, because struct conf_info is not going to be public. Write down the defaults explicitly in default_conf_info, since they are not anymore

[PATCH v3 3/3] interpret-trailers: add options for actions

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Allow using non-default values for trailers without having to set them up in .gitconfig first. For example, if you have the following configuration trailer.signed-off-by.where = end you may use "--where before" when a patch au

[PATCH v3 1/3] trailers: export action enums and corresponding lookup functions

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Separate the mechanical changes out of the next patch. The functions are changed to take a pointer to enum, because struct conf_info is not going to be public. Set the default values explicitly in default_conf_info, since they are not anymore

[PATCH v3 2/3] trailers: introduce struct new_trailer_item

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> This will provide a place to store the current state of the --where, --if-exists and --if-missing options. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- builtin/interpret-trailers.c | 41 +---

[PATCH v3 0/3] interpret-trailers: add --where, --if-exists, --if-missing

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> These options are useful to experiment with "git interpret-trailers" without having to tinker with .gitconfig (Junio said git should ahve done this first and only added configuration afterwards). It can be useful in the case where you

[PATCH v2 3/3] interpret-trailers: add options for actions

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Allow using non-default values for trailers without having to set them up in .gitconfig first. For example, if you have the following configuration trailer.signed-off-by.where = end you may use "--where before" when a patch au

[PATCH v2 1/3] trailers: create struct trailer_opts

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Pass the command-line arguments as a pointer to a new struct. This will be extended in the next patch to include more options. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- v1->v2: constify builtin/interpret-

[PATCH v2 0/3] interpret-trailers: add --where, --if-exists, --if-missing

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> These options are useful to experiment with "git interpret-trailers" without having to tinker with .gitconfig. It can also be useful in the oddball case where you want a different placement for the trailer. Compared to "git -c&q

[PATCH v2 2/3] trailers: export action enums and corresponding lookup functions

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini <pbonz...@redhat.com> Separate the mechanical changes out of the next patch. The functions are changed to take a pointer to enum, because struct conf_info is not going to be public. Set the default values explicitly in default_conf_info, since they are not anymore

Re: [PATCH 3/3] interpret-trailers: add options for actions

2017-07-12 Thread Paolo Bonzini
On 12/07/2017 23:10, Jonathan Tan wrote: > When I would expect the last 2 commands to produce the same output. Maybe > invoke set_where(where, NULL) when "unset" is true? And change set_where() > accordingly. Same for the other two option parsing functions. Sounds good, and I'll also add a test

Re: [PATCH] send-email: new option to walkaround email server limits

2017-05-02 Thread Paolo Bonzini
On 29/04/2017 14:26, xiaoqiang zhao wrote: > Some email server(e.g. smtp.163.com) limits a fixed number emails to be send > per > session(connection) and this will lead to a send faliure. > With --split option, a auto reconnection will occur when number of > sended > email reaches and the

Re: [RFC PATCH 0/4] interpret-trailers: introduce "move" action

2017-10-06 Thread Paolo Bonzini
On 06/10/2017 15:19, Christian Couder wrote: > Now it would be strange to have "moveIfClosest" without having "move" > first and I don't see how "move" would be different from the existing > "replace". > Or maybe "move" means "replaceIfIdentical", in this case I think it > would help users to just

Re: git send-email does not work with Google anymore?!

2017-10-05 Thread Paolo Bonzini
On 05/10/2017 12:52, Lars Schneider wrote: > Hi, > > I used to use the Google SMTP server to send my patches to the list with > the following config: > > [sendemail] > smtpencryption = tls > smtpserver = smtp.gmail.com > smtpuser = larsxschnei...@gmail.com >

[RFC PATCH 0/4] interpret-trailers: introduce "move" action

2017-10-05 Thread Paolo Bonzini
$them" git log -1 --pretty=format:%B | \ git interpret-trailers --where end --if-exists doNothing --trailer "$trailer" | \ git commit --amend -F- Now, this script will leave my Signed-off-by line in a non-canonical place, like Signed-off-by: Paolo Bonzini <pbonz

[PATCH 3/4] trailer: create a new function to handle adding trailers

2017-10-05 Thread Paolo Bonzini
that the conditions for "scan backwards" and "add after" are the same. This simplifies find_same_and_apply_arg so that it does exactly what the name says. apply_arg_if_missing can also use the new function; before, it was redoing add_arg_to_input_list's job in a slightly differen

[PATCH 4/4] trailer: add "move" configuration for trailer.ifExists

2017-10-05 Thread Paolo Bonzini
ifExists = move Though this of course makes the most sense if the last Signed-off-by is from the committer itself, and thus is not necessarily a good idea for everyone. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- Documentation/git-interpret-trailers.txt | 13 --- t

[PATCH 2/4] trailer: simplify check_if_different

2017-10-05 Thread Paolo Bonzini
The check_all argument is pointless, because the function degenerates to !same_trailer when check_all==0 (if same_trailer fails, it always ends up returning 1). Remove it, switching the check_all==0 caller to use same_trailer directly. Signed-off-by: Paolo Bonzini <pbonz...@redhat.

[PATCH 1/4] trailer: push free_arg_item up

2017-10-05 Thread Paolo Bonzini
All callees of process_trailers_lists are calling free_arg_item. Just do it in process_trailers_lists itself. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- trailer.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/trailer.c b/trailer.c index 3ba

Re: git send-email does not work with Google anymore?!

2017-10-05 Thread Paolo Bonzini
On 05/10/2017 16:21, ankostis wrote: > > But this seems to have stopped working; I clicked the link in the page below > https://support.google.com/accounts/answer/6010255?hl=en > and for my account it tells me "less secure apps" access is unavailable :-( It says for me "This setting is not

Re: [RFC PATCH 0/4] interpret-trailers: introduce "move" action

2017-10-06 Thread Paolo Bonzini
On 06/10/2017 08:44, Junio C Hamano wrote: > Paolo Bonzini <pbonz...@redhat.com> writes: >> The purpose of this action is for scripts to be able to keep the >> user's Signed-off-by at the end. >> >> #! /bin/sh >> me=$(git var GIT_COMMITTER_IDENT | s

Re: [RFC PATCH 0/4] interpret-trailers: introduce "move" action

2017-10-06 Thread Paolo Bonzini
On 06/10/2017 12:30, Christian Couder wrote: > On Thu, Oct 5, 2017 at 3:22 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: >> The purpose of this action is for scripts to be able to keep the >> user's Signed-off-by at the end. For example say I have a script >>

Re: [Bug/Solution] Git hangs in compat/poll/poll.c on HPE NonStop

2017-09-29 Thread Paolo Bonzini
ts output with zero. Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Paolo > "Randall S. Becker" <rsbec...@nexbridge.com> writes: > >> After a whole lot of investigating, we (it is a large "we") have discovered >> the reason for the hang we oc

Re: [RFC PATCH 0/4] interpret-trailers: introduce "move" action

2017-10-06 Thread Paolo Bonzini
On 06/10/2017 14:33, Christian Couder wrote: > Ok. I think you might want something called for example > "replaceIfIdenticalClose" where "IdenticalClose" means: "there is a > trailer with the same (, ) pair above or below the line > where the replaced trailer will be put when ignoring trailers