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 > Signed-off-by: Pa

Re: [RFC/PATCH] refs: tone down the dwimmery in refname_match() for {heads,tags,remotes}/*

2019-05-27 Thread Paolo Bonzini
On 27/05/19 00:54, Ævar Arnfjörð Bjarmason wrote: > This resulted in a case[1] where someone on LKML did: > > git push kvm +HEAD:tags/for-linus > > Which would have created a new "tags/for-linus" branch in their "kvm" > repository, except because they happened to have an existing > "refs/tags

Re: [RFC/PATCH] refs: tone down the dwimmery in refname_match() for {heads,tags,remotes}/*

2019-05-27 Thread Paolo Bonzini
On 27/05/19 17:39, Junio C Hamano wrote: > I do not think lightweight vs annotated should be the issue. The > tag that the requestor asks to be pulled (from repository ../b) > should be what the requestor has locally when writing the request > (in repository .). Even if both tags at remote and lo

[PATCH 1/2] request-pull: quote regex metacharacters in local ref

2019-05-28 Thread Paolo Bonzini
From: Paolo Bonzini The local part of the third argument of git-request-pull is used in a regular expression without quoting it. Use qr{} and \Q\E to ensure that e.g. a period in a tag name does not match any character on the remote side. Signed-off-by: Paolo Bonzini --- git-request-pull.sh

[PATCH 2/2] request-pull: warn if the remote object is not the same as the local one

2019-05-28 Thread Paolo Bonzini
From: Paolo Bonzini In some cases, git request-pull might be invoked with remote and local objects that differ even though they point to the same commit. For example, the remote object might be a lightweight tag vs. an annotated tag on the local side; or the user might have reworded the tag

[PATCH 0/2] request-pull: warn if the remote object is not the same as the local one

2019-05-28 Thread Paolo Bonzini
From: Paolo Bonzini In some cases, git request-pull might be invoked with remote and local objects that differ even though they point to the same commit. For example, the remote object might be a lightweight tag vs. an annotated tag on the local side, or the user might have reworded the tag

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 pro

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 author forgets his Signed-

[PATCH 1/3] trailers: create struct trailer_opts

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 --- builtin/interpret-trailers.c | 13 ++--- trailer.c| 14 -- trailer.h

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 stimulated the creation of the p

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 close to default_conf_info and

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 wrote: >> >> These options are useful to experiment with "git interpret-trailers" >> without having to tinker with .gitconfig. It can also be useful in the >> od

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 ca

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 --- v1->v2: constify builtin/interpret-trailers.c | 13 ++--- trailer.c|

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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", they are more easily di

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 close to default_conf_info and

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

2017-07-12 Thread Paolo Bonzini
From: Paolo Bonzini 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 author forgets his Signed-

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 writes: > >> From: Paolo Bonzini >> >> These options are useful to experiment with "git interpret-trailers" >> without having to tinker with .gitconfig. It can also be useful in the >> odd

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

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini 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 want a different placeme

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

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini 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 author forgets his Signed-

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

2017-07-24 Thread Paolo Bonzini
From: Paolo Bonzini 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 close to default_conf_info and

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

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

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

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini 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 want a different placeme

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

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

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

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini Self-explanatory... trailer.ifexists is documented with the right name, but after a while it switches to ifexist. Signed-off-by: Paolo Bonzini --- Documentation/git-interpret-trailers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation

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

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini 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 author forgets his Signed-

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

2017-08-01 Thread Paolo Bonzini
From: Paolo Bonzini 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 close to default_conf_info and

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 > > 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).

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

2017-09-29 Thread Paolo Bonzini
the revents output with zero. Reviewed-by: Paolo Bonzini Paolo > "Randall S. Becker" writes: > >> After a whole lot of investigating, we (it is a large "we") have discovered >> the reason for the hang we occasionally get in git-upload-pack on HPE >

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

2017-10-05 Thread Paolo Bonzini
t;Reviewed-by: $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 Bonzin

[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 --- trailer.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/trailer.c b/trailer.c index 3ba157ed0..4ba28ae33 100644 --- a

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

2017-10-05 Thread Paolo Bonzini
s a coincidence 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

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

2017-10-05 Thread Paolo Bonzini
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 --- Documentation/git-interpret-trailers.txt | 13 --- t/t7513-interpret-trailers.sh

[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 --- trailer.c | 15

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 > s

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 avai

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 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 | sed '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 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 >> that adds a Reviewed-by

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 with

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

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

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini 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 --- git-send

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

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini 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 it is

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

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini 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 option, so I

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

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini 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 it is

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

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini 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 --- Documentation/git

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

2014-11-25 Thread Paolo Bonzini
From: Paolo Bonzini Parse the option and pass it directly to git-mailinfo. Signed-off-by: Paolo Bonzini --- Documentation/git-am.txt | 11 +++ git-am.sh| 21 +++-- t/t4150-am.sh| 23 +++ 3 files changed, 53 insertions

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 >> > >> > 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-messag

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

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 seein

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 wrote: >> >> >> On 25/11/2014 17:27, Christian Couder wrote: >>>>> From: Paolo Bonzini >>>>> >>>>> This series adds a --messa

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

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini "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.

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

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini 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 Bon

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

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini 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 will try to

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

2015-02-16 Thread Paolo Bonzini
From: Paolo Bonzini 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 Bon

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 writes: > >> From: Paolo Bonzini >> >> 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 &g

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 > 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 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 fin

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 sayin

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 l

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

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 (

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 im

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 l