{"thread":{"id":"33958","subject":"[PATCH 0/5] Trivial patches","startedAt":"2013-05-28T12:54:26Z","lastAt":"2013-05-29T17:11:25Z","messageCount":13,"participants":["Felipe Contreras","Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"218646","messageId":"1369745671-22418-1-git-send-email-felipe.contreras@gmail.com","threadId":"33958","inReplyTo":null,"subject":"[PATCH 0/5] Trivial patches","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-28T12:54:26Z","receivedAt":"2013-05-28T12:54:26Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nHere's a bunch of trivial patches.\n\nFelipe Contreras (5):\n  remote: trivial style cleanup\n  sequencer: trivial fix\n  test: trivial cleanups\n  test: improve rebase -q test\n  test: rebase: fix --interactive test\n\n remote.c                      |  3 +--\n sequencer.c                   |  7 +++++--\n t/t3400-rebase.sh             |  1 +\n t/t3403-rebase-skip.sh        |  7 ++++---\n t/t3404-rebase-interactive.sh |  2 +-\n t/t3505-cherry-pick-empty.sh  | 18 +++++-------------\n 6 files changed, 17 insertions(+), 21 deletions(-)\n\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218647","messageId":"1369745671-22418-2-git-send-email-felipe.contreras@gmail.com","threadId":"33958","inReplyTo":"1369745671-22418-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 1/5] remote: trivial style cleanup","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-28T12:54:27Z","receivedAt":"2013-05-28T12:54:27Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n remote.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/remote.c b/remote.c\nindex 68eb99b..e71f66d 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -1474,8 +1474,7 @@ struct branch *branch_get(const char *name)\n \t\tret->remote = remote_get(ret->remote_name);\n \t\tif (ret->merge_nr) {\n \t\t\tint i;\n-\t\t\tret->merge = xcalloc(sizeof(*ret->merge),\n-\t\t\t\t\t     ret->merge_nr);\n+\t\t\tret->merge = xcalloc(ret->merge_nr, sizeof(*ret->merge));\n \t\t\tfor (i = 0; i < ret->merge_nr; i++) {\n \t\t\t\tret->merge[i] = xcalloc(1, sizeof(**ret->merge));\n \t\t\t\tret->merge[i]->src = xstrdup(ret->merge_name[i]);\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218648","messageId":"1369745671-22418-3-git-send-email-felipe.contreras@gmail.com","threadId":"33958","inReplyTo":"1369745671-22418-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 2/5] sequencer: trivial fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-28T12:54:28Z","receivedAt":"2013-05-28T12:54:28Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"We should free objects before leaving.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n sequencer.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/sequencer.c b/sequencer.c\nindex ab6f8a7..7eeae2f 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -626,12 +626,15 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)\n \t\trerere(opts->allow_rerere_auto);\n \t} else {\n \t\tint allow = allow_empty(opts, commit);\n-\t\tif (allow < 0)\n-\t\t\treturn allow;\n+\t\tif (allow < 0) {\n+\t\t\tres = allow;\n+\t\t\tgoto leave;\n+\t\t}\n \t\tif (!opts->no_commit)\n \t\t\tres = run_git_commit(defmsg, opts, allow);\n \t}\n \n+leave:\n \tfree_message(&msg);\n \tfree(defmsg);\n \n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218649","messageId":"1369745671-22418-4-git-send-email-felipe.contreras@gmail.com","threadId":"33958","inReplyTo":"1369745671-22418-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 3/5] test: trivial cleanups","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-28T12:54:29Z","receivedAt":"2013-05-28T12:54:29Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"No functional changes.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n t/t3403-rebase-skip.sh       |  7 ++++---\n t/t3505-cherry-pick-empty.sh | 18 +++++-------------\n 2 files changed, 9 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh\nindex 826500b..3968020 100755\n--- a/t/t3403-rebase-skip.sh\n+++ b/t/t3403-rebase-skip.sh\n@@ -64,10 +64,11 @@ test_expect_success 'rebase with --merge' '\n \n test_expect_success 'rebase --skip with --merge' '\n \tgit rebase --skip\n-\t'\n+'\n \n-test_expect_success 'merge and reference trees equal' \\\n-\t'test -z \"`git diff-tree skip-merge skip-reference`\"'\n+test_expect_success 'merge and reference trees equal' '\n+\ttest -z \"`git diff-tree skip-merge skip-reference`\"\n+'\n \n test_expect_success 'moved back to branch correctly' '\n \ttest refs/heads/skip-merge = $(git symbolic-ref HEAD)\ndiff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh\nindex a0c6e30..fbdc47c 100755\n--- a/t/t3505-cherry-pick-empty.sh\n+++ b/t/t3505-cherry-pick-empty.sh\n@@ -28,29 +28,21 @@ test_expect_success setup '\n '\n \n test_expect_success 'cherry-pick an empty commit' '\n-\tgit checkout master && {\n-\t\tgit cherry-pick empty-branch^\n-\t\ttest \"$?\" = 1\n-\t}\n+\tgit checkout master &&\n+\ttest_expect_code 1 git cherry-pick empty-branch^\n '\n \n test_expect_success 'index lockfile was removed' '\n-\n \ttest ! -f .git/index.lock\n-\n '\n \n test_expect_success 'cherry-pick a commit with an empty message' '\n-\tgit checkout master && {\n-\t\tgit cherry-pick empty-branch\n-\t\ttest \"$?\" = 1\n-\t}\n+\tgit checkout master &&\n+\ttest_expect_code 1 git cherry-pick empty-branch\n '\n \n test_expect_success 'index lockfile was removed' '\n-\n \ttest ! -f .git/index.lock\n-\n '\n \n test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '\n@@ -101,7 +93,7 @@ test_expect_success 'cherry-pick a no-op with --keep-redundant' '\n \tgit reset --hard &&\n \tgit checkout fork^0 &&\n \tgit cherry-pick --keep-redundant-commits master &&\n-\tgit show -s --format='%s' >actual &&\n+\tgit show -s --format=%s >actual &&\n \techo \"add file2 on master\" >expect &&\n \ttest_cmp expect actual\n '\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218651","messageId":"1369745671-22418-5-git-send-email-felipe.contreras@gmail.com","threadId":"33958","inReplyTo":"1369745671-22418-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 4/5] test: improve rebase -q test","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-28T12:54:30Z","receivedAt":"2013-05-28T12:54:30Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Let's show the output so it's clear why it failed.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n t/t3400-rebase.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex b58fa1a..fb39531 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -185,6 +185,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' '\n test_expect_success 'rebase -q is quiet' '\n \tgit checkout -b quiet topic &&\n \tgit rebase -q master >output.out 2>&1 &&\n+\tcat output.out &&\n \ttest ! -s output.out\n '\n \n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218650","messageId":"1369745671-22418-6-git-send-email-felipe.contreras@gmail.com","threadId":"33958","inReplyTo":"1369745671-22418-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 5/5] test: rebase: fix --interactive test","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-28T12:54:31Z","receivedAt":"2013-05-28T12:54:31Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n t/t3404-rebase-interactive.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex a58406d..79e8d3c 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -692,7 +692,7 @@ test_expect_success 'rebase -i can copy notes' '\n \ttest_commit n2 &&\n \ttest_commit n3 &&\n \tgit notes add -m\"a note\" n3 &&\n-\tgit rebase --onto n1 n2 &&\n+\tgit rebase -i --onto n1 n2 &&\n \ttest \"a note\" = \"$(git notes show HEAD)\"\n '\n \n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218679","messageId":"7v38t72fyi.fsf@alter.siamese.dyndns.org","threadId":"33958","inReplyTo":"1369745671-22418-2-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH 1/5] remote: trivial style cleanup","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-28T17:04:53Z","receivedAt":"2013-05-28T17:04:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>  remote.c | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n>\n> diff --git a/remote.c b/remote.c\n> index 68eb99b..e71f66d 100644\n> --- a/remote.c\n> +++ b/remote.c\n> @@ -1474,8 +1474,7 @@ struct branch *branch_get(const char *name)\n>  \t\tret->remote = remote_get(ret->remote_name);\n>  \t\tif (ret->merge_nr) {\n>  \t\t\tint i;\n> -\t\t\tret->merge = xcalloc(sizeof(*ret->merge),\n> -\t\t\t\t\t     ret->merge_nr);\n> +\t\t\tret->merge = xcalloc(ret->merge_nr, sizeof(*ret->merge));\n\nYeah, calloc is nmemb first and then size, so this makes sense.\n\n>  \t\t\tfor (i = 0; i < ret->merge_nr; i++) {\n>  \t\t\t\tret->merge[i] = xcalloc(1, sizeof(**ret->merge));\n>  \t\t\t\tret->merge[i]->src = xstrdup(ret->merge_name[i]);\n"},{"id":"218680","messageId":"7vvc6311dr.fsf@alter.siamese.dyndns.org","threadId":"33958","inReplyTo":"1369745671-22418-5-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH 4/5] test: improve rebase -q test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-28T17:05:04Z","receivedAt":"2013-05-28T17:05:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Let's show the output so it's clear why it failed.\n>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>  t/t3400-rebase.sh | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\n> index b58fa1a..fb39531 100755\n> --- a/t/t3400-rebase.sh\n> +++ b/t/t3400-rebase.sh\n> @@ -185,6 +185,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' '\n>  test_expect_success 'rebase -q is quiet' '\n>  \tgit checkout -b quiet topic &&\n>  \tgit rebase -q master >output.out 2>&1 &&\n> +\tcat output.out &&\n>  \ttest ! -s output.out\n>  '\n\nIt is one thing to avoid squelching output that naturally comes out\nof command being tested unnecessarily, so that \"./txxxx-*.sh -v\"\noutput can be used for debugging.  I however am not sure if adding\n\"cat\" to random places like this is a productive direction for us to\ngo in.\n\nA more preferrable alternative may be adding something like this to\ntest-lib.sh and call it from here and elsewhere (there are about 50\nplaces that do \"test ! -s <filename>\"), perhaps?\n\n        test_must_be_an_empty_file () {\n                if test -s \"$1\"\n                then\n                        cat \"$1\"\n                        false\n                fi\n        }\n"},{"id":"218684","messageId":"20130528171907.GA28153@google.com","threadId":"33958","inReplyTo":"7vvc6311dr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 4/5] test: improve rebase -q test","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-28T17:19:07Z","receivedAt":"2013-05-28T17:19:07Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> A more preferrable alternative may be adding something like this to\n> test-lib.sh and call it from here and elsewhere (there are about 50\n> places that do \"test ! -s <filename>\"), perhaps?\n>\n>         test_must_be_an_empty_file () {\n>                 if test -s \"$1\"\n>                 then\n>                         cat \"$1\"\n>                         false\n>                 fi\n>         }\n\nI generally just use the two-liner\n\n\t>empty &&\n\ttest_cmp empty output\n\ndirectly in cases like this.\n\nThanks,\nJonathan\n"},{"id":"218686","messageId":"7vfvx710a9.fsf@alter.siamese.dyndns.org","threadId":"33958","inReplyTo":"20130528171907.GA28153@google.com","subject":"Re: [PATCH 4/5] test: improve rebase -q test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-28T17:28:46Z","receivedAt":"2013-05-28T17:28:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>\n>> A more preferrable alternative may be adding something like this to\n>> test-lib.sh and call it from here and elsewhere (there are about 50\n>> places that do \"test ! -s <filename>\"), perhaps?\n>>\n>>         test_must_be_an_empty_file () {\n>>                 if test -s \"$1\"\n>>                 then\n>>                         cat \"$1\"\n>>                         false\n>>                 fi\n>>         }\n>\n> I generally just use the two-liner\n>\n> \t>empty &&\n> \ttest_cmp empty output\n>\n> directly in cases like this.\n\nThat would work, too.\n"},{"id":"218713","messageId":"51a56a31947d6_807b33e1899765@nysa.mail","threadId":"33958","inReplyTo":"7vvc6311dr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 4/5] test: improve rebase -q test","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-29T02:38:41Z","receivedAt":"2013-05-29T02:38:41Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Junio C Hamano wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n> \n> > Let's show the output so it's clear why it failed.\n> >\n> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> > ---\n> >  t/t3400-rebase.sh | 1 +\n> >  1 file changed, 1 insertion(+)\n> >\n> > diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\n> > index b58fa1a..fb39531 100755\n> > --- a/t/t3400-rebase.sh\n> > +++ b/t/t3400-rebase.sh\n> > @@ -185,6 +185,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' '\n> >  test_expect_success 'rebase -q is quiet' '\n> >  \tgit checkout -b quiet topic &&\n> >  \tgit rebase -q master >output.out 2>&1 &&\n> > +\tcat output.out &&\n> >  \ttest ! -s output.out\n> >  '\n> \n> It is one thing to avoid squelching output that naturally comes out\n> of command being tested unnecessarily, so that \"./txxxx-*.sh -v\"\n> output can be used for debugging.  I however am not sure if adding\n> \"cat\" to random places like this is a productive direction for us to\n> go in.\n> \n> A more preferrable alternative may be adding something like this to\n> test-lib.sh and call it from here and elsewhere (there are about 50\n> places that do \"test ! -s <filename>\"), perhaps?\n> \n>         test_must_be_an_empty_file () {\n>                 if test -s \"$1\"\n>                 then\n>                         cat \"$1\"\n>                         false\n>                 fi\n>         }\n\nPerhaps, but I'm not interested. I'm tired of obvious fixes getting rejected\nfor hypothetical \"ideal\" situations that we'll never reach.\n\n-- \nFelipe Contreras\n"},{"id":"218852","messageId":"7vr4gpvic7.fsf@alter.siamese.dyndns.org","threadId":"33958","inReplyTo":"51a56a31947d6_807b33e1899765@nysa.mail","subject":"Re: [PATCH 4/5] test: improve rebase -q test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-29T16:52:56Z","receivedAt":"2013-05-29T16:52:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>> \n>> > Let's show the output so it's clear why it failed.\n>> >\n>> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n>> > ---\n>> >  t/t3400-rebase.sh | 1 +\n>> >  1 file changed, 1 insertion(+)\n>> >\n>> > diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\n>> > index b58fa1a..fb39531 100755\n>> > --- a/t/t3400-rebase.sh\n>> > +++ b/t/t3400-rebase.sh\n>> > @@ -185,6 +185,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' '\n>> >  test_expect_success 'rebase -q is quiet' '\n>> >  \tgit checkout -b quiet topic &&\n>> >  \tgit rebase -q master >output.out 2>&1 &&\n>> > +\tcat output.out &&\n>> >  \ttest ! -s output.out\n>> >  '\n>> \n>> It is one thing to avoid squelching output that naturally comes out\n>> of command being tested unnecessarily, so that \"./txxxx-*.sh -v\"\n>> output can be used for debugging.  I however am not sure if adding\n>> \"cat\" to random places like this is a productive direction for us to\n>> go in.\n>> \n>> A more preferrable alternative may be adding something like this to\n>> test-lib.sh and call it from here and elsewhere (there are about 50\n>> places that do \"test ! -s <filename>\"), perhaps?\n>> \n>>         test_must_be_an_empty_file () {\n>>                 if test -s \"$1\"\n>>                 then\n>>                         cat \"$1\"\n>>                         false\n>>                 fi\n>>         }\n>\n> Perhaps, but I'm not interested. I'm tired of obvious fixes getting rejected\n> for hypothetical \"ideal\" situations that we'll never reach.\n\nThat's too bad.  Addition of \"cat\" where there does not need one is\nclearly not an obvious fix anyway.\n"},{"id":"218856","messageId":"CAMP44s2S7_D+MavyqpQJWBQwBKS=QnFT+KUGHCPxN96jg+zMNw@mail.gmail.com","threadId":"33958","inReplyTo":"7vr4gpvic7.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 4/5] test: improve rebase -q test","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-29T17:11:25Z","receivedAt":"2013-05-29T17:11:25Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, May 29, 2013 at 11:52 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> Junio C Hamano wrote:\n>>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>>>\n>>> > Let's show the output so it's clear why it failed.\n>>> >\n>>> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n>>> > ---\n>>> >  t/t3400-rebase.sh | 1 +\n>>> >  1 file changed, 1 insertion(+)\n>>> >\n>>> > diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\n>>> > index b58fa1a..fb39531 100755\n>>> > --- a/t/t3400-rebase.sh\n>>> > +++ b/t/t3400-rebase.sh\n>>> > @@ -185,6 +185,7 @@ test_expect_success 'default to @{upstream} when upstream arg is missing' '\n>>> >  test_expect_success 'rebase -q is quiet' '\n>>> >    git checkout -b quiet topic &&\n>>> >    git rebase -q master >output.out 2>&1 &&\n>>> > +  cat output.out &&\n>>> >    test ! -s output.out\n>>> >  '\n>>>\n>>> It is one thing to avoid squelching output that naturally comes out\n>>> of command being tested unnecessarily, so that \"./txxxx-*.sh -v\"\n>>> output can be used for debugging.  I however am not sure if adding\n>>> \"cat\" to random places like this is a productive direction for us to\n>>> go in.\n>>>\n>>> A more preferrable alternative may be adding something like this to\n>>> test-lib.sh and call it from here and elsewhere (there are about 50\n>>> places that do \"test ! -s <filename>\"), perhaps?\n>>>\n>>>         test_must_be_an_empty_file () {\n>>>                 if test -s \"$1\"\n>>>                 then\n>>>                         cat \"$1\"\n>>>                         false\n>>>                 fi\n>>>         }\n>>\n>> Perhaps, but I'm not interested. I'm tired of obvious fixes getting rejected\n>> for hypothetical \"ideal\" situations that we'll never reach.\n>\n> That's too bad.  Addition of \"cat\" where there does not need one is\n> clearly not an obvious fix anyway.\n\nIf you are an actual real user of this code; a developer that is\nrunning the test; and the test finally achieves it's designed goal of\ndetecting a failure, you would be left scratching your head wondering\nwhat's the problem if running './test -v' doesn't show anything, even\nafter you have added debugging code to narrow down the issue.\n\nI had to add that cat line not once, but more than two times in\ndifferent lines of development.\n\nSo yeah, a cat is needed, and the fact you don't see that amazes me,\nspecially after you have reprimanded me for using 'grep -q' instead of\n'grep' for this very reason.\n\n-- \nFelipe Contreras\n"}]}