git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Shourya Shukla <shouryashukla.oo@gmail.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de
Subject: Re: [PATCH 2/3] t6025: replace pipe with redirection operator
Date: Thu, 16 Jan 2020 14:57:39 -0800	[thread overview]
Message-ID: <xmqqftgff1r0.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200116203622.4694-3-shouryashukla.oo@gmail.com> (Shourya Shukla's message of "Fri, 17 Jan 2020 02:06:21 +0530")

Shourya Shukla <shouryashukla.oo@gmail.com> writes:

> -	echo "120000 $l	symlink" |
> -	git update-index --index-info &&
> +	echo "120000 $l	symlink" >foo &&
> +	git update-index --index-info <foo &&

If we had "git" on the left-hand-side (i.e. upstream) of a pipe, it
would make sense to split the pipeline like this, but this (and the
other one this patch touches) is on the right side, whose exit
status is not lost.  And we are not in the business of preparing for
broken implementation of "echo".

So this rewrite is unnecessary and unwarranted.

By the way, I think the pipeline

	echo ... | git update-index --index-info &&

should be written on a single line in the previous step 1/3.

>  	git commit -m master &&
>  	git checkout b-symlink &&
>  	l=$(printf file-different | git hash-object -t blob -w --stdin) &&
> -	echo "120000 $l	symlink" |
> -	git update-index --index-info &&
> +	echo "120000 $l	symlink" >foo &&
> +	git update-index --index-info <foo &&
>  	git commit -m b-symlink &&
>  	git checkout b-file &&
>  	echo plain-file >symlink &&

  reply	other threads:[~2020-01-16 22:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 20:36 [PATCH 0/3] t6025: updating tests Shourya Shukla
2020-01-16 20:36 ` [PATCH 1/3] t6025: modernize style Shourya Shukla
2020-01-16 21:42   ` Johannes Schindelin
2020-01-16 20:36 ` [PATCH 2/3] t6025: replace pipe with redirection operator Shourya Shukla
2020-01-16 22:57   ` Junio C Hamano [this message]
2020-01-16 20:36 ` [PATCH 3/3] t6025: use helpers to replace test -f <path> Shourya Shukla
2020-01-16 22:58   ` Junio C Hamano
2020-01-17 20:44     ` [PATCH 0/3] t6025: amended changes after suggestions from the community Shourya Shukla
2020-01-17 20:44       ` [PATCH 1/3] t6025: modernize style Shourya Shukla
2020-01-17 21:15         ` Eric Sunshine
2020-01-17 21:28           ` Junio C Hamano
2020-01-17 20:44       ` [PATCH 2/3] t6025: replace pipe with redirection operator Shourya Shukla
2020-01-17 21:24         ` Eric Sunshine
2020-01-18  8:33           ` [PATCH 0/3] t6025: updating tests Shourya Shukla
2020-01-18  8:33             ` [PATCH 1/3] t6025: modernize style Shourya Shukla
2020-01-18  8:33             ` [PATCH 2/3] t6025: replace pipe with redirection operator Shourya Shukla
2020-01-18  8:33             ` [PATCH 3/3] t6025: use helpers to replace test -f <path> Shourya Shukla
2020-01-18  8:33             ` [PATCH v3 0/2] t025: amended changes after suggestions from the community Shourya Shukla
2020-01-18  8:33             ` [PATCH v3 1/2] t6025: modernize style Shourya Shukla
2020-01-21 21:57               ` Junio C Hamano
2020-01-18  8:33             ` [PATCH v3 2/2] t6025: use helpers to replace test -f <path> Shourya Shukla
2020-01-21 21:58               ` Junio C Hamano
2020-01-17 20:44       ` [PATCH 3/3] " Shourya Shukla
2020-01-16 21:46 ` [PATCH 0/3] t6025: updating tests Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqftgff1r0.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=shouryashukla.oo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).