git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GIT PULL] Please pull mergetool.git

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 14, 2007, 05:59 UTC
Message-ID
<20070314055923.GA20978@spearce.org>
In-Reply-To
<E1HRI5K-0008T9-9e@candygram.thunk.org>
Theodore Ts'o <tytso@mit.edu> wrote:
Show 7 quoted lines
> +    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.
Previous: Theodore Ts'oNext: Theodore Tso
Message 2 of 6 in “[GIT PULL] Please pull mergetool.git”
  1. Theodore Ts'oMar 14, 2007
  2. Shawn O. PearceMar 14, 2007
  3. Theodore TsoMar 14, 2007
  4. Junio C HamanoMar 14, 2007
  5. Junio C HamanoMar 14, 2007
  6. Alex RiesenMar 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.