Re: [GIT PULL] Please pull mergetool.git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Theodore Ts'o <tytso@xxxxxxx> wrote:
> +    base_mode=`git ls-files -u -- "$path" | awk '{if ($3==1) print $1;}'`
> +    local_mode=`git ls-files -u -- "$path" | awk '{if ($3==2) print $1;}'`
> +    remote_mode=`git ls-files -u -- "$path" | awk '{if ($3==3) print $1;}'`
> +
> +    base_present   && git cat-file blob ":1:$path" > "$BASE" 2>/dev/null
> +    local_present  && git cat-file blob ":2:$path" > "$LOCAL" 2>/dev/null
> +    remote_present && git cat-file blob ":3:$path" > "$REMOTE" 2>/dev/null

Why not use `git checkout-index --stage=all "$path"` ?
E.g.:

	git checkout-index --stage=all "$path" |
	read base_temp local_temp remote_temp path

I'm not trying to nitpick, I'm just curious about why this particular
feature of checkout-index was not useful here.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]