Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathon Mah <me@JonathonMah.com>
Cc: git@vger.kernel.org, Charles Bailey <charles@hashpling.org>
Subject: Re: [PATCH 2/2] mergetool: Don't assume paths are unmerged
Date: Wed, 22 Jun 2011 14:33:12 -0700	[thread overview]
Message-ID: <7v1uyl5z6v.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <92B6FB42-FE0D-48DC-ABD0-BA1903D842D2@JonathonMah.com> (Jonathon Mah's message of "Tue, 21 Jun 2011 19:46:28 -0700")

Jonathon Mah <me@JonathonMah.com> writes:

>  if test $# -eq 0 ; then
>      cd_to_toplevel
>  
>      if test -e "$GIT_DIR/MERGE_RR"
>      then
> +	files=$(git rerere remaining)
> +    else
> +	files=$(git ls-files -u | sed -e 's/^[^	]*	//' | sort -u)
>      fi
>  else
>      while test $# -gt 0; do
> +	matches=$(git ls-files -u -- "$1" | sed -e 's/^[^	]*	//' | sort -u)
> +	if test -n "$matches"; then
> +	    if test -z "$files"; then
> +		files=$matches
> +	    else
> +		files=$(printf "%s\n%s" "$files" "$matches")
> +	    fi
>  	fi
>  	shift
>      done
> +    files=$(printf "%s" "$files" | sort -u)
>  fi

Why do you need a loop here in the else clause, instead of just a single:

	files=$(git ls-files -u -- "$@" |...)

      parent reply	other threads:[~2011-06-22 21:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  2:46 [PATCH 2/2] mergetool: Don't assume paths are unmerged Jonathon Mah
2011-06-22 21:26 ` Junio C Hamano
2011-06-22 21:33 ` Junio C Hamano [this message]

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=7v1uyl5z6v.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=charles@hashpling.org \
    --cc=git@vger.kernel.org \
    --cc=me@JonathonMah.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