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

Re: [PATCH] mergetools: Enhance tortoisemerge to work with

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 25, 2013, 18:28 UTC
Message-ID
<7v622l5d87.fsf@alter.siamese.dyndns.org>
In-Reply-To
<5102837C.9000608@tu-clausthal.de>
Sven Strickroth <sven.strickroth@tu-clausthal.de> writes:
>  TortoiseGitMerge and filenames with spaces
??? ECANNOTPARSE.
... ah, wait.  Is this a broken-off tail of your subject line?

It may be a sign that you are doing too many unrelated things in a single patch when your subject does not fit on a single line.

Perhaps this is better done as a two-patch series?
 * mergetools: fix tortoisemerge support for pathnames with SP
 * mergetools: support tortoisegitmerge
Show 43 quoted lines
>  mergetools/tortoisemerge | 51 ++++++++++++++++++++++++++++++++----------------
>  1 file changed, 34 insertions(+), 17 deletions(-)
>
> diff --git a/mergetools/tortoisemerge b/mergetools/tortoisemerge
> index ed7db49..8ee99a5 100644
> --- a/mergetools/tortoisemerge
> +++ b/mergetools/tortoisemerge
> @@ -1,17 +1,34 @@
> -can_diff () {
> -	return 1
> -}
> -
> -merge_cmd () {
> -	if $base_present
> -	then
> -		touch "$BACKUP"
> -		"$merge_tool_path" \
> -			-base:"$BASE" -mine:"$LOCAL" \
> -			-theirs:"$REMOTE" -merged:"$MERGED"
> -		check_unchanged
> -	else
> -		echo "TortoiseMerge cannot be used without a base" 1>&2
> -		return 1
> -	fi
> -}
> +can_diff () {
> +	return 1
> +}
> +
> +merge_cmd () {
> +	if $base_present
> +	then
> +		touch "$BACKUP"
> +		basename="$(basename "$merge_tool_path" .exe)"
> +		if test "$basename" = "tortoisegitmerge"
> +		then
> +			"$merge_tool_path" \
> +				-base "$BASE" -mine "$LOCAL" \
> +				-theirs "$REMOTE" -merged "$MERGED"
> +		else 
> +			"$merge_tool_path" \
> +				-base:"$BASE" -mine:"$LOCAL" \
> +				-theirs:"$REMOTE" -merged:"$MERGED"
Hmph.

How was the support for "names with spaces" added in this new code? I do not spot what is different between this "else" clause and the original body of the merge_cmd (which only supported tortoisemerge).

They seem to be doing exactly the same thing.
Show 16 quoted lines
> +		fi
> +		check_unchanged
> +	else
> +		echo "$merge_tool_path cannot be used without a base" 1>&2
> +		return 1
> +	fi
> +}
> +
> +translate_merge_tool_path() {
> +	if type tortoisegitmerge >/dev/null 2>/dev/null
> +	then
> +		echo tortoisegitmerge
> +	else
> +		echo tortoisemerge
> +	fi
> +}
Previous: Sven StrickrothNext: Sven Strickroth
Message 16 of 31 in “mergetools: Add tortoisegitmerge helper”
  1. mergetools: Add tortoisegitmerge helperSven Strickroth, Jan 20, 2013
  2. Junio C HamanoJan 21, 2013
  3. mergetools: Add tortoisegitmerge helperSven Strickroth, Jan 21, 2013
  4. mergetools: Add tortoisegitmerge helperSven Strickroth, Jan 21, 2013
  5. Sven StrickrothJan 24, 2013
  6. Junio C HamanoJan 24, 2013
  7. Sven StrickrothJan 24, 2013
  8. Junio C HamanoJan 24, 2013
  9. David AguilarJan 25, 2013
  10. Junio C HamanoJan 25, 2013
  11. David AguilarJan 25, 2013
  12. John KeepingJan 25, 2013
  13. mergetools: Enhance tortoisemerge to work withSven Strickroth, Jan 25, 2013
  14. David AguilarJan 25, 2013
  15. mergetools: Enhance tortoisemerge to work withSven Strickroth, Jan 25, 2013
  16. Junio C HamanoJan 25, 2013
  17. Sven StrickrothJan 26, 2013
  18. Sven StrickrothJan 26, 2013
  19. 1/2 mergetools: Added support for TortoiseGitMergeSven Strickroth, Jan 26, 2013
  20. 2/2 mergetools: Make tortoisemerge work withSven Strickroth, Jan 26, 2013
  21. David AguilarJan 26, 2013
  22. Sven StrickrothJan 27, 2013
  23. Junio C HamanoJan 27, 2013
  24. mergetools: Enable tortoisemerge to handle filenames withSven Strickroth, Feb 1, 2013
  25. Sebastian SchuberthFeb 1, 2013
  26. Sven StrickrothFeb 1, 2013
  27. Junio C HamanoFeb 1, 2013
  28. Sven StrickrothFeb 1, 2013
  29. Sven StrickrothFeb 1, 2013
  30. David AguilarFeb 2, 2013
  31. Junio C HamanoFeb 2, 2013

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.