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

2017-10-06 Thread Junio C Hamano
Paolo Bonzini writes: > 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

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: [RFC PATCH 0/4] interpret-trailers: introduce "move" action

2017-10-06 Thread Christian Couder
On Fri, Oct 6, 2017 at 2:39 PM, Paolo Bonzini wrote: > 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

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

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

2017-10-06 Thread Christian Couder
On Fri, Oct 6, 2017 at 12:40 PM, Paolo Bonzini wrote: > On 06/10/2017 12:30, Christian Couder wrote: >> Did you try using `--where end --if-exists replace --trailer "$sob"`? > > Yes, it's a different behavior; "--if-exists replace" matches on others' > SoB as well, so it

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 tag: >> >>

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

2017-10-06 Thread Christian Couder
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 tag: > > #! /bin/sh > them=$(git log -i -1

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,>.*,>,') >> them=$(git log -i

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

2017-10-06 Thread Junio C Hamano
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. For example say I have a script > that adds a Reviewed-by tag: > > #! /bin/sh > them=$(git log -i -1 --pretty='format:%an <%ae>'

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

2017-10-05 Thread Paolo Bonzini
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 tag: #! /bin/sh them=$(git log -i -1 --pretty='format:%an <%ae>' --author="$*") trailer="Reviewed-by: $them" git log -1