git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Fix tail option problem in test
@ 2007-04-23 23:56 A Large Angry SCM
  2007-04-24  0:09 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: A Large Angry SCM @ 2007-04-23 23:56 UTC (permalink / raw
  To: Junio C Hamano, git

The tail command on my system complains:

	tail: cannot open `8192' for reading: No such file or directory

if there is any whitespace between the '-c' option and the byte count.

Signed-off-by: A Large Angry SCM <Gitzilla@gmail.com>
---

 t/t5302-pack-index.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 232e5f1..b7870a8 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -16,7 +16,7 @@ test_expect_success \
          test-genrandom "$i" 8192 >>file_$i &&
          git-update-index --add file_$i || return 1
      done &&
-     echo 101 >file_101 && tail -c 8192 file_100 >>file_101 &&
+     echo 101 >file_101 && tail -c8192 file_100 >>file_101 &&
      git-update-index --add file_101 &&
      tree=`git-write-tree` &&
      commit=`git-commit-tree $tree </dev/null` && {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix tail option problem in test
  2007-04-23 23:56 [PATCH] Fix tail option problem in test A Large Angry SCM
@ 2007-04-24  0:09 ` Junio C Hamano
  2007-04-24  0:29   ` A Large Angry SCM
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2007-04-24  0:09 UTC (permalink / raw
  To: gitzilla; +Cc: git

A Large Angry SCM <gitzilla@gmail.com> writes:

> The tail command on my system complains:
>
> 	tail: cannot open `8192' for reading: No such file or directory
>
> if there is any whitespace between the '-c' option and the byte count.
>
> Signed-off-by: A Large Angry SCM <Gitzilla@gmail.com>
> ---
>
>  t/t5302-pack-index.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
> index 232e5f1..b7870a8 100755
> --- a/t/t5302-pack-index.sh
> +++ b/t/t5302-pack-index.sh
> @@ -16,7 +16,7 @@ test_expect_success \
>           test-genrandom "$i" 8192 >>file_$i &&
>           git-update-index --add file_$i || return 1
>       done &&
> -     echo 101 >file_101 && tail -c 8192 file_100 >>file_101 &&
> +     echo 101 >file_101 && tail -c8192 file_100 >>file_101 &&
>       git-update-index --add file_101 &&
>       tree=`git-write-tree` &&
>       commit=`git-commit-tree $tree </dev/null` && {

I do not like using tail to do a byte-oriented thing like this
to begin with.  How about using the plain old trustworthy and
portable program, "dd", instead?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix tail option problem in test
  2007-04-24  0:09 ` Junio C Hamano
@ 2007-04-24  0:29   ` A Large Angry SCM
  2007-04-24  5:02     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: A Large Angry SCM @ 2007-04-24  0:29 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Junio C Hamano wrote:
> A Large Angry SCM <gitzilla@gmail.com> writes:
> 
>> The tail command on my system complains:
>>
>> 	tail: cannot open `8192' for reading: No such file or directory
>>
>> if there is any whitespace between the '-c' option and the byte count.
>>
>> Signed-off-by: A Large Angry SCM <Gitzilla@gmail.com>
>> ---
>>
>>  t/t5302-pack-index.sh |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
>> index 232e5f1..b7870a8 100755
>> --- a/t/t5302-pack-index.sh
>> +++ b/t/t5302-pack-index.sh
>> @@ -16,7 +16,7 @@ test_expect_success \
>>           test-genrandom "$i" 8192 >>file_$i &&
>>           git-update-index --add file_$i || return 1
>>       done &&
>> -     echo 101 >file_101 && tail -c 8192 file_100 >>file_101 &&
>> +     echo 101 >file_101 && tail -c8192 file_100 >>file_101 &&
>>       git-update-index --add file_101 &&
>>       tree=`git-write-tree` &&
>>       commit=`git-commit-tree $tree </dev/null` && {
> 
> I do not like using tail to do a byte-oriented thing like this
> to begin with.  How about using the plain old trustworthy and
> portable program, "dd", instead?

It's not as easy to get the last X bytes of a file with dd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix tail option problem in test
  2007-04-24  0:29   ` A Large Angry SCM
@ 2007-04-24  5:02     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2007-04-24  5:02 UTC (permalink / raw
  To: gitzilla; +Cc: git

A Large Angry SCM <gitzilla@gmail.com> writes:

> It's not as easy to get the last X bytes of a file with dd.

Fair enough.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-24  5:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 23:56 [PATCH] Fix tail option problem in test A Large Angry SCM
2007-04-24  0:09 ` Junio C Hamano
2007-04-24  0:29   ` A Large Angry SCM
2007-04-24  5:02     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).