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

Re: Re* [PATCH] allow git-am to run in a subdirectory

From
Jeff King <peff@peff.net>
Date
Mar 3, 2008, 06:58 UTC
Message-ID
<20080303065808.GA22810@coredump.intra.peff.net>
In-Reply-To
<7vlk50joe0.fsf_-_@gitster.siamese.dyndns.org>
On Sun, Mar 02, 2008 at 10:46:31PM -0800, Junio C Hamano wrote:
> > The problem is that I need to turn the original "$@" into a new "$@"
> > that is correctly prefixed, which requires proper quoting.
> 
> Perhaps like this?

Yes. For some reason I didn't think of doing 'set "$@" "$new"' to rebuild the list one by one.

Show 18 quoted lines
> +	if test -n "$prefix" && test $# != 0
> +	then
> +		first=t
> +		for arg
> +		do
> +			test -n "$first" && {
> +				set x
> +				first=
> +			}
> +			case "$arg" in
> +			/*)
> +				set "$@" "$arg" ;;
> +			*)
> +				set "$@" "$prefix$arg" ;;
> +			esac
> +		done
> +		shift
> +	fi

This handles the mailbox parameters. The only other file parameter is $dotest. If I do "cd t && git am --dotest=.foo", then should it be "t/.foo" or ".foo"?

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 11 in “allow git-am to run in a subdirectory”
  1. allow git-am to run in a subdirectoryJeff King, Mar 1, 2008
  2. Junio C HamanoMar 1, 2008
  3. Jeff KingMar 1, 2008
  4. Junio C HamanoMar 1, 2008
  5. Jeff KingMar 1, 2008
  6. Jay SoffianMar 3, 2008
  7. Re* [PATCH] allow git-am to run in a subdirectoryJunio C Hamano, Mar 3, 2008
  8. Jeff KingMar 3, 2008
  9. Junio C HamanoMar 3, 2008
  10. Johannes SchindelinMar 3, 2008
  11. Junio C HamanoMar 3, 2008

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.