[PATCH v2 4/5] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer

2012-11-15 Thread Brandon Casey
recognize the "(cherry picked from ..." string as part of the footer. Plus mark the test in t3511 as fixed. Signed-off-by: Brandon Casey --- Declare cherry_picked_prefix variable as static. This is the only change with respect to v1. -Brandon sequencer

Re: [PATCH] Unify appending signoff in format-patch, commit and sequencer

2012-11-15 Thread Brandon Casey
On Thu, Nov 15, 2012 at 4:32 AM, Nguyễn Thái Ngọc Duy wrote: > There are two implementations of append_signoff in log-tree.c and > sequencer.c, which do more or less the same thing. This patch > > - teaches sequencer.c's append_signoff() not to append the signoff if >it's already there but no

[PATCH 6/5] sequencer.c: refrain from adding duplicate s-o-b lines

2012-11-15 Thread Brandon Casey
Detect whether the s-o-b already exists in the commit footer and refrain from adding a duplicate. Update t3511 to test new behavior. Signed-off-by: Brandon Casey --- Hi Duy, How about this patch on top of my series as a base for your patch to unify the code paths that append signoff in

Re: [PATCH 2/5] t/t3511: demonstrate breakage in cherry-pick -s

2012-11-15 Thread Brandon Casey
On Thu, Nov 15, 2012 at 5:58 PM, Junio C Hamano wrote: > Brandon Casey writes: > >> The cherry-pick -s functionality is currently broken in two ways. >> >>1. handling of rfc2822 continuation lines has a bug, and the >> continuation lines are not hand

Re: [PATCH 6/5] sequencer.c: refrain from adding duplicate s-o-b lines

2012-11-16 Thread Brandon Casey
On Thu, Nov 15, 2012 at 6:03 PM, Junio C Hamano wrote: > Brandon Casey writes: > >> Detect whether the s-o-b already exists in the commit footer and refrain >> from adding a duplicate. > > If you are trying to forbid > > git cherry-pick -s $other > > f

[PATCH 00/11] alternative unify appending of sob

2012-11-25 Thread Brandon Casey
From: Brandon Casey I hate to have the battle of the patches, but I kinda prefer the append_signoff code in sequencer.c over the code in log-tree.c as a foundation to build on. So, this series is similar to Duy's "unification" series, but it goes in the opposite direction and b

[PATCH 01/11] sequencer.c: remove broken support for rfc2822 continuation in footer

2012-11-25 Thread Brandon Casey
line. Since a commit message is not governed by the line length limits imposed by rfc2822 for email messages, and it does not seem like this functionality would produce "better" commit messages anyway, let's remove this broken functionality. Signed-off-by: Brandon Casey ---

[PATCH 02/11] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2012-11-25 Thread Brandon Casey
The part of test_commit() may not be appropriate for a tag name. So let's allow test_commit to accept a fourth argument to specify the tag name. Signed-off-by: Brandon Casey --- t/test-lib-functions.sh | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/tes

[PATCH 03/11] t/t3511: add some tests of 'cherry-pick -s' functionality

2012-11-25 Thread Brandon Casey
detects a non-conforming footer containing a mix of s-o-b like elements and s-o-b elements. (marked "expect failure") Signed-off-by: Brandon Casey --- t/t3511-cherry-pick-x.sh | 111 +++ 1 file changed, 111 insertions(+) create mode 10

[PATCH 04/11] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer

2012-11-25 Thread Brandon Casey
gned-off-by: A U Thor (cherry picked from da39a3ee5e6b4b0d3255bfef95601890afd80709) Signed-off-by: C O Mitter Signed-off-by: Brandon Casey --- sequencer.c | 42 t/t3511-cherry-pick-x.sh | 55 2 files cha

[PATCH 05/11] sequencer.c: always separate "(cherry picked from" from commit body

2012-11-25 Thread Brandon Casey
Start treating the "(cherry picked from" line added by cherry-pick -x the same way that the s-o-b lines are treated. Namely, separate them from the main commit message body with an empty line. Introduce tests to test this functionality. Signed-off-by: Brandon Casey --- s

[PATCH 06/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2012-11-25 Thread Brandon Casey
Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This is in preparation to unify the append_signoff implementations in log-tree.c and sequencer.c. Fixes test in t3511. Signed-off-by: Brandon Casey --- builtin/commit.c | 2 +- sequencer.c | 43

[PATCH 07/11] sequencer.c: teach append_signoff to avoid adding a duplicate newline

2012-11-25 Thread Brandon Casey
. A following patch will make format-patch use this function rather than the append_signoff implementation inside log-tree.c. Signed-off-by: Brandon Casey --- sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sequencer.c b/sequencer.c index 3062ad4..eb93dd6

[PATCH 08/11] t4014: more tests about appending s-o-b lines

2012-11-25 Thread Brandon Casey
From: Nguyễn Thái Ngọc Duy [bc: fix test 90 "signoff: some random signoff-alike" and mark as failing. Correct behavior should insert a blank line after message body and signed-off-by ] Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- t/t4014-forma

[PATCH 09/11] format-patch: stricter S-o-b detection

2012-11-25 Thread Brandon Casey
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- log-tree.c | 37 +-- t/t4014-format-patch.sh | 95 + 2 files changed, 130 insertions(+), 2 deletions(-) diff --git a/log-tree.c b/log-tree.c index 4f86def.

[PATCH 10/11] format-patch: update append_signoff prototype

2012-11-25 Thread Brandon Casey
From: Nguyễn Thái Ngọc Duy This is a preparation step for merging with append_signoff from sequencer.c Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- builtin/log.c | 13 + log-tree.c| 21 + revision.h| 2 +- 3 files changed, 15

[PATCH 11/11] Unify appending signoff in format-patch, commit and sequencer

2012-11-25 Thread Brandon Casey
tests fixed as appropriate. [Commit message mostly stolen from Nguyễn Thái Ngọc Duy's original unification patch] Signed-off-by: Brandon Casey --- log-tree.c | 122 +--- t/t4014-format-patch.sh | 27 +-- 2 files change

[PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path

2012-11-26 Thread Brandon Casey
From: Brandon Casey This example in the documentation seems to be trying to describe the likely remote tracking branch that will be updated by a push to the "origin" remote with the destination branch 'satellite/master', but it forgot to specify the remote name in the pat

Re: [PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path

2012-11-26 Thread Brandon Casey
On 11/26/2012 5:30 PM, Junio C Hamano wrote: Brandon Casey writes: From: Brandon Casey This example in the documentation seems to be trying to describe the likely remote tracking branch that will be updated by a push to the "origin" remote with the destination branch 'satelli

Re: [PATCH 04/11] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer

2012-11-28 Thread Brandon Casey
On 11/28/2012 4:02 PM, Junio C Hamano wrote: Brandon Casey writes: -static int ends_rfc2822_footer(struct strbuf *sb, int ignore_footer) +static int is_rfc2822_line(const char *buf, int len) +{ + int i; + + for (i = 0; i < len; i++) { + int ch = bu

Re: [PATCH v2 1/4] t4014: more tests about appending s-o-b lines

2012-12-02 Thread Brandon Casey
On Sat, Dec 1, 2012 at 11:06 PM, Torsten Bögershausen wrote: > On 22.11.12 17:38, Nguyễn Thái Ngọc Duy wrote: >> >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- >> t/t4014-format-patch.sh | 145 >> >> 1 file changed, 145 insertions(+) >> + echo

Re: [PATCH 3/4] t4014: do not uese echo -n

2013-01-02 Thread Brandon Casey
On Tue, Jan 1, 2013 at 5:16 PM, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> echo -n is not portable on all systems. >> Use printf instead >> >> Signed-off-by: Torsten Bögershausen >> --- > > Brandon, this comes from 932581b (Unify appending signoff in > format-patch, commit and seq

Re: git filter-branch doesn't dereference annotated tags

2013-01-03 Thread Brandon Casey
On Thu, Jan 3, 2013 at 2:33 AM, Johannes Sixt wrote: > Am 03.01.2013 10:50, schrieb Grégory Pakosz: >>> >>> IOW, if the command was something like >>> >>> git filter-branch ...filter options... -- v1.0 master ... >>> >>> and v1.0 is an annotated tag, then it is reasonable to expect v1.0 to be >>

[PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Brandon Casey
3.00.15 on CentOS 4.x from loading the completion script and breaks test 9902. We can easily work around this by using standard Bash array notation. Signed-off-by: Brandon Casey --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/co

Re: [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Brandon Casey
On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab wrote: > Brandon Casey writes: > >> + array[$(($#array+1))]="$c" > > You don't need $(( )) since the array index is already evaluated as an > arithmethic expression. Ah, I didn'

Re: [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Brandon Casey
On Fri, Jan 18, 2013 at 11:08 AM, Junio C Hamano wrote: > Brandon Casey writes: > >> On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab >> wrote: >>> Brandon Casey writes: >>> >>>> + array[$(($#array+1))]="$c&qu

[PATCH v2] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Brandon Casey
3.00.15 on CentOS 4.x from loading the completion script and breaks test 9902. We can easily work around this by using standard Bash array notation. Signed-off-by: Brandon Casey --- On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab wrote: > Brandon Casey writes: > >> +

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Brandon Casey
On Tue, Jun 11, 2013 at 7:40 AM, Michael Haggerty wrote: > At the risk of being > presumptuous myself, I suggest that you show a copy of your email to > somebody whom you know and respect in the real world, somebody who is > not immersed in the Git community meltdown. For example, somebody like

[PATCH 1/2] builtin/checkout.c: don't leak memory in check_tracking_name

2013-06-17 Thread Brandon Casey
From: Brandon Casey remote_find_tracking() populates the query struct with an allocated string in the dst member. So, we do not need to xstrdup() the string, since we can transfer ownership from the query struct (which will go out of scope at the end of this function) to our callback struct

[PATCH 2/2] t/t9802: explicitly name the upstream branch to use as a base

2013-06-17 Thread Brandon Casey
From: Brandon Casey Prior to commit fa83a33b, the 'git checkout' DWIMery would create a new local branch if the specified branch name did not exist and it matched exactly one ref in the "remotes" namespace. It searched the "remotes" namespace for matching refs us

[PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-17 Thread Brandon Casey
From: Brandon Casey Curl requires that we manage any strings that we pass to it as pointers. So, we should not be overwriting this strbuf after we've passed it to curl. Additionally, it is unnecessary since we only prompt for the user name and password once, so we end up overwriting the s

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Brandon Casey
On Mon, Jun 17, 2013 at 10:19 PM, Jeff King wrote: > On Mon, Jun 17, 2013 at 07:00:40PM -0700, Brandon Casey wrote: > >> Curl requires that we manage any strings that we pass to it as pointers. >> So, we should not be overwriting this strbuf after we've passed it to >&g

Re: [PATCH] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Brandon Casey
On Tue, Jun 18, 2013 at 3:13 PM, Jeff King wrote: > On Tue, Jun 18, 2013 at 12:29:03PM -0700, Brandon Casey wrote: >> > It could be a problem when we have multiple handles in play >> > simultaneously (we invalidate the pointer that another simultaneous >> &g

[PATCH v2] http.c: don't rewrite the user:passwd string multiple times

2013-06-18 Thread Brandon Casey
From: Brandon Casey Curl older than 7.17 (RHEL 4.X provides 7.12 and RHEL 5.X provides 7.15) requires that we manage any strings that we pass to it as pointers. So, we really shouldn't be modifying this strbuf after we have passed it to curl. Our interaction with curl is currently safe (b

Re: git ate my home directory :-(

2013-03-25 Thread Brandon Casey
On Mon, Mar 25, 2013 at 3:13 PM, Jonathan Nieder wrote: > Junio C Hamano wrote: > >>I do not >> know how things will break when the end user sets and exports it to >> the environment, and I do not think we would want to make any >> promis

Re: [PATCH] cherry-pick -x: improve handling of one-liner commit messages

2013-03-29 Thread Brandon Casey
On Fri, Mar 29, 2013 at 10:23 AM, Junio C Hamano wrote: > Miklos Vajna writes: > >> git cherry-pick -x normally just appends the "cherry picked from commit" >> line at the end of the message, which is fine. However, in case the >> original commit message had only one line, first append a newline,

Re: [PATCH 1/3] usage: refactor die-recursion checks

2013-04-15 Thread Brandon Casey
On Mon, Apr 15, 2013 at 4:08 PM, Jeff King wrote: > When any git code calls die(), we chain to a custom > die_routine, which we expect to print a message and exit the > program. To avoid infinite loops, we detect a recursive call > to die() with a simple counter, and break out of the loop by > pri

Re: [PATCH 1/3] usage: refactor die-recursion checks

2013-04-15 Thread Brandon Casey
On Mon, Apr 15, 2013 at 5:42 PM, Jeff King wrote: > On Mon, Apr 15, 2013 at 05:11:36PM -0700, Brandon Casey wrote: > >> > +static void check_die_recursion(const char *fmt, va_list ap) >> > +{ >> > + static int dying; >> > + >> >

Re: [Resend PATCH] t3903 (stash): add failing test for ref of form ^{/message}

2013-04-16 Thread Brandon Casey
On Tue, Apr 16, 2013 at 11:09 AM, Ramkumar Ramachandra wrote: > While a 'git stash show stash^{/quuxery}' works just fine, a 'git > stash pop stash^{/quuxery}' complains with: 'stash^{/quuxery} is not a > stash reference'. I don't think it is appropriate to use the ^{/} notation with stashes. Th

Re: [Resend PATCH] t3903 (stash): add failing test for ref of form ^{/message}

2013-04-16 Thread Brandon Casey
On Tue, Apr 16, 2013 at 12:11 PM, Junio C Hamano wrote: > Brandon Casey writes: > >> The stash is implemented using the reflog. The ^{/} notation >> searches the commit history, not the reflog. So I think it will be >> able to match the first entry in your stash s

Re: [Resend PATCH] t3903 (stash): add failing test for ref of form ^{/message}

2013-04-16 Thread Brandon Casey
On Tue, Apr 16, 2013 at 1:11 PM, Ramkumar Ramachandra wrote: > Brandon Casey wrote: >> # Save another stash here >> >> echo bash >file >> git add file >> git stash save "something" >> >>

Re: receive.denyNonNonFastForwards not denying force update

2012-08-20 Thread Brandon Casey
On Mon, Aug 20, 2012 at 6:22 PM, Junio C Hamano wrote: > Sitaram Chamarty writes: > >> On Mon, Aug 20, 2012 at 10:35 PM, Junio C Hamano wrote: >>> John Arthorne writes: >>> For all the details see this bugzilla, particularly comment #59 where we finally narrowed this down: h

Re: Porting git to HP NonStop

2012-08-22 Thread Brandon Casey
On Wed, Aug 22, 2012 at 9:30 AM, Joachim Schmitz wrote: > OK, so how about this: > /usr/local/bin/diff -EBbu ./compat/mkdir.c.orig ./compat/mkdir.c > --- ./compat/mkdir.c.orig 2012-08-21 05:02:11 -0500 > +++ ./compat/mkdir.c2012-08-21 05:02:11 -0500 > @@ -0,0 +1,24 @@ > +#include "../gi

Re: Porting git to HP NonStop

2012-08-22 Thread Brandon Casey
On Wed, Aug 22, 2012 at 10:00 AM, Brandon Casey wrote: > Also, we have xstrndup. So I think the body of your function can become > something like: > >if (len && dir[len-1] == '/') >dir = tmp_dir = xstrndup(dir, len-1); > >retval = mkdir(di

Re: Porting git to HP NonStop

2012-08-22 Thread Brandon Casey
On Wed, Aug 22, 2012 at 10:18 AM, Joachim Schmitz wrote: >> From: Brandon Casey [mailto:draf...@gmail.com] >> Sent: Wednesday, August 22, 2012 7:01 PM >> To: Joachim Schmitz >> Cc: Junio C Hamano; Shawn Pearce; git@vger.kernel.org; >> rsbec...@nexbridge.com >

Re: Porting git to HP NonStop

2012-08-22 Thread Brandon Casey
On Wed, Aug 22, 2012 at 10:41 AM, Johannes Sixt wrote: > Am 22.08.2012 19:00, schrieb Brandon Casey: >> So I think the body of [compat_mkdir] can become >> something like: >> >>if (len && dir[len-1] == '/') >>dir = tmp_dir = xst

Re: Porting git to HP NonStop

2012-08-22 Thread Brandon Casey
On Wed, Aug 22, 2012 at 11:09 AM, Brandon Casey wrote: > On Wed, Aug 22, 2012 at 10:41 AM, Johannes Sixt wrote: >> Don't use x* wrappers in the compat layer, at least not those that >> allocate memory: They behave unpredictably due to try_to_free_routine >> and may lea

Re: Porting git to HP NonStop

2012-08-22 Thread Brandon Casey
On Wed, Aug 22, 2012 at 11:33 AM, Junio C Hamano wrote: > Brandon Casey writes: > >> Perhaps something like: >> >> diff --git a/usage.c b/usage.c >> index a2a6678..2d0ff35 100644 >> --- a/usage.c >> +++ b/usage.c >> @@ -80,8 +80,15 @@ void NORETURN

Re: Is git mktag supposed to accept git cat-file input?

2012-10-24 Thread Brandon Casey
On Wed, Oct 24, 2012 at 4:39 PM, Anand Kumria wrote: > Hi, > > I am doing some experimenting with git-mktag, and was looking into the > format it expects on input. > > Should this sequence of commands work? Yes, with a slight tweak... > kalki:[/tmp/gittest]% git tag -m "tag-test" tag-test > kalk

Re: signing commits with openssl/PKCS#11

2012-10-25 Thread Brandon Casey
On Mon, Oct 22, 2012 at 6:38 AM, Mat Arge wrote: > Hy! > > I would like to sign each commit with a X.509 certificate and a private key > stored on a PKCS#11 token. I assume that that should be possible somehow using > a hook which calls openssl. Does somebody know a working implementation of > thi

Re: Did we break receive-pack recently?

2012-08-05 Thread Brandon Casey
On Sat, Aug 4, 2012 at 6:55 PM, Junio C Hamano wrote: > I just saw this: > > $ git push ko > ko: Counting objects: 332, done. > Delta compression using up to 4 threads. > Compressing objects: 100% (110/110), done. > Writing objects: 100% (130/130), 32.27 KiB, done. > Total

Re: Did we break receive-pack recently?

2012-08-05 Thread Brandon Casey
On Sun, Aug 5, 2012 at 6:37 PM, Brandon Casey wrote: > On Sat, Aug 4, 2012 at 6:55 PM, Junio C Hamano wrote: >> I just saw this: >> >> $ git push ko >> ko: Counting objects: 332, done. >> Delta compression using up to 4 threads. >> Co

[PATCH 1/2] t/t5400: demonstrate breakage caused by informational message from prune

2012-08-06 Thread Brandon Casey
port channel to the git client which tries to interpret it as part of the pack protocol and then promptly terminates with a complaint about a protocol error. Introduce a test which exercises the auto-gc functionality of receive-pack and demonstrates this breakage. Signed-off-by: Brandon Casey

[PATCH 2/2] prune.c: only print informational message in show_only or verbose mode

2012-08-06 Thread Brandon Casey
e an error. So let's refrain from producing this message unless show_only or verbose is enabled. This fixes the test in t5400. Signed-off-by: Brandon Casey --- builtin/prune.c | 3 ++- t/t5400-send-pack.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/pr

Re: [PATCH 2/2] prune.c: only print informational message in show_only or verbose mode

2012-08-06 Thread Brandon Casey
On Mon, Aug 6, 2012 at 10:34 PM, Junio C Hamano wrote: > Junio C Hamano writes: > > Ok, now a tested patch, on top of your 1/2 On Mon, Aug 6, 2012 at 10:32 PM, Jeff King wrote: > > This seems like a band-aid. The real problem is that auto-gc can > interfere with the pack protocol, which it sho

Re: [PATCH 2/2] prune.c: only print informational message in show_only or verbose mode

2012-08-06 Thread Brandon Casey
On Mon, Aug 6, 2012 at 11:03 PM, Jeff King wrote: > On Mon, Aug 06, 2012 at 10:44:07PM -0700, Brandon Casey wrote: >> Anyone else? :) > > Sorry to gang up on you. :) Heh. :b > I still think your 2/2 is worth doing independently, though. It is silly > that git-prune wi

Re: [PATCH 2/2] prune.c: only print informational message in show_only or verbose mode

2012-08-07 Thread Brandon Casey
On Tue, Aug 7, 2012 at 2:44 PM, Junio C Hamano wrote: > Jeff King writes: > >> I still think your 2/2 is worth doing independently, though. It is silly >> that git-prune will not mention pruned objects without "-v", but will >> mention temporary files. They should be in the same category. > > Ok,

Re: [PATCH v2] INSTALL: git-p4 doesn't support Python 3

2013-01-20 Thread Brandon Casey
On Sun, Jan 20, 2013 at 11:28 AM, John Keeping wrote: > On Sun, Jan 20, 2013 at 10:54:52AM -0800, Junio C Hamano wrote: >> John Keeping writes: >> >>> git-p4 supports Python 2.6 and later versions of Python 2. Since Python >>> 2.8 will never exist [1], it is most concise to just list the support

[PATCH v2 00/10] unify appending of sob

2013-01-21 Thread Brandon Casey
+Reviewed-id: Noone Tested-by: my@house Change-id: Ideadbeef Signed-off-by: C O Mitter -BUG: 1234 +Bug: 1234 EOF cat >expected <<\EOF && 4:Subject: [PATCH] subject 8: 10: -13:Signed-off-by: C O Mitter +14:Signed-off-by: C O Mitter EOF test_cmp expe

[PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-21 Thread Brandon Casey
line. Since a commit message is not governed by the line length limits imposed by rfc2822 for email messages, and it does not seem like this functionality would produce "better" commit messages anyway, let's remove this broken functionality. Signed-off-by: Brandon Casey ---

[PATCH v2 02/10] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2013-01-21 Thread Brandon Casey
The part of test_commit() may not be appropriate for a tag name. So let's allow test_commit to accept a fourth argument to specify the tag name. Signed-off-by: Brandon Casey --- t/test-lib-functions.sh | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/tes

[PATCH v2 03/10] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-21 Thread Brandon Casey
detects a non-conforming footer containing a mix of s-o-b like elements and s-o-b elements. (marked "expect failure") Signed-off-by: Brandon Casey --- t/t3511-cherry-pick-x.sh | 111 +++ 1 file changed, 111 insertions(+) create mode 10

[PATCH v2 04/10] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer

2013-01-21 Thread Brandon Casey
gned-off-by: A U Thor (cherry picked from da39a3ee5e6b4b0d3255bfef95601890afd80709) Signed-off-by: C O Mmitter Signed-off-by: Brandon Casey --- sequencer.c | 46 t/t3511-cherry-pick-x.sh | 55 2

[PATCH v2 05/10] sequencer.c: always separate "(cherry picked from" from commit body

2013-01-21 Thread Brandon Casey
Start treating the "(cherry picked from" line added by cherry-pick -x the same way that the s-o-b lines are treated. Namely, separate them from the main commit message body with an empty line. Introduce tests to test this functionality. Signed-off-by: Brandon Casey --- s

[PATCH v2 06/10] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-21 Thread Brandon Casey
Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This is in preparation to unify the append_signoff implementations in log-tree.c and sequencer.c. Fixes test in t3511. Signed-off-by: Brandon Casey --- builtin/commit.c | 2 +- sequencer.c | 46

[PATCH v2 07/10] sequencer.c: teach append_signoff to avoid adding a duplicate newline

2013-01-21 Thread Brandon Casey
. A following patch will make format-patch use this function rather than the append_signoff implementation inside log-tree.c. Signed-off-by: Brandon Casey --- sequencer.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index d4a2ece

[PATCH v2 08/10] t4014: more tests about appending s-o-b lines

2013-01-21 Thread Brandon Casey
: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- t/t4014-format-patch.sh | 242 1 file changed, 242 insertions(+) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 7fa3647..3868cef 100755 --- a/t/t4014-format-patch.sh

[PATCH v2 10/10] Unify appending signoff in format-patch, commit and sequencer

2013-01-21 Thread Brandon Casey
tests fixed as appropriate. [Commit message mostly stolen from Nguyễn Thái Ngọc Duy's original unification patch] Signed-off-by: Brandon Casey --- log-tree.c | 88 + t/t4014-format-patch.sh | 31 ++--- 2 files change

[PATCH v2 09/10] format-patch: update append_signoff prototype

2013-01-21 Thread Brandon Casey
From: Nguyễn Thái Ngọc Duy This is a preparation step for merging with append_signoff from sequencer.c Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- builtin/log.c | 13 + log-tree.c| 14 ++ revision.h| 2 +- 3 files changed, 12

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Brandon Casey
On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder wrote: > Hi, > > Brandon Casey wrote: > >> --- a/sequencer.c >> +++ b/sequencer.c > [...] >> @@ -1042,13 +1041,8 @@ static int ends_rfc2822_footer(struct strbuf *sb, int >> ignore_footer) > > Git is

Re: [PATCH v2 02/10] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2013-01-22 Thread Brandon Casey
On Tue, Jan 22, 2013 at 12:02 AM, Jonathan Nieder wrote: > Brandon Casey wrote: >> --- a/t/test-lib-functions.sh >> +++ b/t/test-lib-functions.sh >> @@ -135,12 +135,13 @@ test_pause () { >> fi >> } >> >> -# Call test_commit with the argum

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

2013-01-22 Thread Brandon Casey
On Tue, Jan 22, 2013 at 1:49 AM, Jonathan Nieder wrote: > Jonathan Nieder wrote: > >> Here is the loop in master: >> >> int hit = 0; >> [...] >> >> for (i = len - 1; i > 0; i--) { >> if (hit && buf[i] == '\n') >> break; >> hit = (buf[i]

Re: [PATCH v3 2/8] git_remote_helpers: fix input when running under Python 3

2013-01-25 Thread Brandon Casey
t; I was wondering if people would weigh in discussing that in response to >>> [1] but no one has commented on that part of it. As another datapoint, >>> Brandon Casey was suggesting patching git-p4.py to support Python 2.4 >>> [2]. >>> >>>

[PATCH 1/2] git-p4.py: support Python 2.5

2013-01-25 Thread Brandon Casey
used with Python 2.5. Signed-off-by: Brandon Casey --- INSTALL | 2 +- git-p4.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/INSTALL b/INSTALL index 28f34bd..fc723b3 100644 --- a/INSTALL +++ b/INSTALL @@ -131,7 +131,7 @@ Issues of note: use English. Under

[PATCH 0/2] git-p4 support for older python

2013-01-25 Thread Brandon Casey
updated). Brandon Casey (2): git-p4.py: support Python 2.5 git-p4.py: support Python 2.4 INSTALL| 2 +- git-p4.py | 30 ++ t/t9802-git-p4-filetype.sh | 11 ++- 3 files changed, 33 insertions(+), 10 deletions

[PATCH 2/2] git-p4.py: support Python 2.4

2013-01-25 Thread Brandon Casey
a CalledProcessError exception if necessary. The struct.pack_into in t/9802 can be converted into a single struct.pack call which is available in Python 2.4. Signed-off-by: Brandon Casey --- INSTALL| 2 +- git-p4.py | 27 --- t/t9802

Re: [PATCH 1/2] git-p4.py: support Python 2.5

2013-01-26 Thread Brandon Casey
On Sat, Jan 26, 2013 at 4:45 AM, Pete Wyckoff wrote: > draf...@gmail.com wrote on Fri, 25 Jan 2013 12:44 -0800: >> Python 2.5 and older do not accept None as the first argument to >> translate() and complain with: >> >>TypeError: expected a character buffer object >> >> Satisfy this older pyth

Re: [PATCH 2/2] git-p4.py: support Python 2.4

2013-01-26 Thread Brandon Casey
On Sat, Jan 26, 2013 at 4:48 AM, Pete Wyckoff wrote: > draf...@gmail.com wrote on Fri, 25 Jan 2013 12:44 -0800: >> + sys.stdout.write(s); > One stray semicolon. Whoops. Thanks. > In terms of maintenance, I'll not run tests with 2.4 or 2.5 > myself, but maybe you would be willing to check

[PATCH v2 2/2] git-p4.py: support Python 2.4

2013-01-26 Thread Brandon Casey
From: Brandon Casey Python 2.4 lacks the following features: subprocess.check_call struct.pack_into Take a cue from 460d1026 and provide an implementation of the CalledProcessError exception. Then replace the calls to subproccess.check_call with calls to subprocess.call that check the

[PATCH v2 1/2] git-p4.py: support Python 2.5

2013-01-26 Thread Brandon Casey
From: Brandon Casey Python 2.5 and older do not accept None as the first argument to translate() and complain with: TypeError: expected a character buffer object As suggested by Pete Wyckoff, let's just replace the call to translate() with a regex search which should be more clear and

Re: [PATCH v2 03/10] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-27 Thread Brandon Casey
On Tue, Jan 22, 2013 at 12:17 AM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> --- /dev/null >> +++ b/t/t3511-cherry-pick-x.sh > [...] >> +test_expect_failure 'cherry-pick -s inserts blank line after non-conforming >> footer' ' > >

Re: [PATCH v2 06/10] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-27 Thread Brandon Casey
On Tue, Jan 22, 2013 at 12:38 AM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> Teach append_signoff how to detect a duplicate s-o-b in the commit footer. >> This is in preparation to unify the append_signoff implementations in >> log-tree.c and sequencer.c. >

[PATCH v3 00/11] unify appending of sob

2013-01-27 Thread Brandon Casey
Round 3. -Brandon Brandon Casey (9): sequencer.c: rework search for start of footer to improve clarity commit, cherry-pick -s: remove broken support for multiline rfc2822 fields t/test-lib-functions.sh: allow to specify the tag name to test_commit t/t3511: add some tests of 'c

[PATCH v3 01/11] sequencer.c: rework search for start of footer to improve clarity

2013-01-27 Thread Brandon Casey
This code sequence is somewhat difficult to read. Let's rewrite it using more descriptive variable names to try to make it easier to understand. Signed-off-by: Brandon Casey --- sequencer.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequen

[PATCH v3 02/11] commit, cherry-pick -s: remove broken support for multiline rfc2822 fields

2013-01-27 Thread Brandon Casey
hat nobody actually needed multiline fields. Rip out the broken continuation support. There should be no functional change. [Thanks to Jonathan Nieder for the excellent commit message] Signed-off-by: Brandon Casey --- sequencer.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/seq

[PATCH v3 03/11] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2013-01-27 Thread Brandon Casey
The part of test_commit() may not be appropriate for a tag name. So let's allow test_commit to accept a fourth argument to specify the tag name. Signed-off-by: Brandon Casey Reviewed-by: Jonathan Nieder --- t/test-lib-functions.sh | 8 1 file changed, 4 insertions(+), 4 dele

[PATCH v3 04/11] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-27 Thread Brandon Casey
detects a non-conforming footer containing a mix of s-o-b like elements and s-o-b elements. (marked "expect failure") Signed-off-by: Brandon Casey --- t/t3511-cherry-pick-x.sh | 111 +++ 1 file changed, 111 insertions(+) create mode 10

[PATCH v3 05/11] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer

2013-01-27 Thread Brandon Casey
gned-off-by: A U Thor (cherry picked from da39a3ee5e6b4b0d3255bfef95601890afd80709) Signed-off-by: C O Mmitter Signed-off-by: Brandon Casey Acked-by: Jonathan Nieder --- sequencer.c | 46 t/t3511-cherry-pick-x.sh | 55

[PATCH v3 06/11] sequencer.c: always separate "(cherry picked from" from commit body

2013-01-27 Thread Brandon Casey
dified, in addition to being moved. Introduce tests to test this functionality. Signed-off-by: Brandon Casey --- sequencer.c | 120 +-- t/t3511-cherry-pick-x.sh | 53 + 2 files changed, 116 insertions(+), 57 deletions(-) di

[PATCH v3 07/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-27 Thread Brandon Casey
Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This is in preparation to unify the append_signoff implementations in log-tree.c and sequencer.c. Fixes test in t3511. Signed-off-by: Brandon Casey --- builtin/commit.c | 2 +- sequencer.c | 47

[PATCH v3 08/11] sequencer.c: teach append_signoff to avoid adding a duplicate newline

2013-01-27 Thread Brandon Casey
. A following patch will make format-patch use this function rather than the append_signoff implementation inside log-tree.c. Signed-off-by: Brandon Casey --- sequencer.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index 015cb58

[PATCH v3 09/11] t4014: more tests about appending s-o-b lines

2013-01-27 Thread Brandon Casey
: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- t/t4014-format-patch.sh | 242 1 file changed, 242 insertions(+) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 7fa3647..3868cef 100755 --- a/t/t4014-format-patch.sh

[PATCH v3 10/11] format-patch: update append_signoff prototype

2013-01-27 Thread Brandon Casey
From: Nguyễn Thái Ngọc Duy This is a preparation step for merging with append_signoff from sequencer.c Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Brandon Casey --- builtin/log.c | 13 + log-tree.c| 17 + revision.h| 2 +- 3 files changed, 15

[PATCH v3 11/11] Unify appending signoff in format-patch, commit and sequencer

2013-01-27 Thread Brandon Casey
tests fixed as appropriate. [Commit message mostly stolen from Nguyễn Thái Ngọc Duy's original unification patch] Signed-off-by: Brandon Casey --- log-tree.c | 91 + t/t4014-format-patch.sh | 31 ++--- 2 files change

Re: [PATCH v3 05/11] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer

2013-01-27 Thread Brandon Casey
On Sun, Jan 27, 2013 at 6:51 PM, Jonathan Nieder wrote: > Jonathan Nieder wrote: > >> Here's the tweak I suggested last time. I think its behavior is >> slightly better in the "ends with incomplete line" case because it >> limits the characters examined by is_rfc2822_line() and >> is_cherry_picke

Re: [PATCH v3 00/11] unify appending of sob

2013-01-31 Thread Brandon Casey
On Wed, Jan 30, 2013 at 9:37 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Jonathan Nieder writes: >> >>> Brandon Casey wrote: >>> >>>> Round 3. >>> >>> Thanks for a pleasant read. My only remaining observations are &g

Re: [PATCH v2 06/10] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-02-09 Thread Brandon Casey
On 2/9/2013 3:06 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Brandon Casey writes: >> >>> On Tue, Jan 22, 2013 at 12:38 AM, Jonathan Nieder >>> wrote: >>>> Brandon Casey wrote: >>>> >>>>> Teach append_sig

Re: [PATCH v3 06/11] sequencer.c: always separate "(cherry picked from" from commit body

2013-02-10 Thread Brandon Casey
On Sun, Jan 27, 2013 at 6:34 PM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> --- a/sequencer.c >> +++ b/sequencer.c >> @@ -497,6 +558,8 @@ static int do_pick_commit(struct commit *commit, struct >> replay_opts *opts) >> } >>

Re: [PATCH v3 07/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-02-10 Thread Brandon Casey
On Sun, Jan 27, 2013 at 7:14 PM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> --- a/sequencer.c >> +++ b/sequencer.c > [...] >> @@ -1096,10 +1117,16 @@ void append_signoff(struct strbuf *msgbuf, int >> ignore_footer) >> strbuf_addch(&so

Re: [PATCH v3 11/11] Unify appending signoff in format-patch, commit and sequencer

2013-02-10 Thread Brandon Casey
On Sun, Jan 27, 2013 at 7:39 PM, Jonathan Nieder wrote: > Brandon Casey wrote: > >> --- a/log-tree.c >> +++ b/log-tree.c > [...] >> @@ -208,94 +207,6 @@ void show_decorations(struct rev_info *opt, struct >> commit *commit) >> putchar(')

<    1   2   3   >