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

Re: [PATCH] mergetool: Replace use of "echo -n" with printf(3) to be more portable

From
Theodore Tso <tytso@mit.edu>
Date
Mar 29, 2007, 17:09 UTC
Message-ID
<20070329170914.GA9435@thunk.org>
In-Reply-To
<20070329155741.GA18413@moooo.ath.cx>
On Thu, Mar 29, 2007 at 05:57:41PM +0200, Matthias Lederhofer wrote:
> The subject should probably refer to printf(1) instead of printf(3).
Yep.
> Theodore Ts'o <tytso@mit.edu> wrote:
> > +	printf  "'$path' was deleted"
> Here is one space too much after printf.
This was fixed in a later patch.
> > +	printf "'$path' is a symlink containing '"
> You should use printf "'%s' [..]" "$path" as you do in some other
> places (in case $path contains conversion specifiers).
This was also obsoleted in a later patch, but you're right.
> > +    printf "Hit return to start merge resolution tool ($merge_tool): "
> Here it is much more unlikely that $merge_tool contains a conversion
> specifier but anyway I'd prefer to use %s.
Yep, agreed.

Junio, I've prepared an alterate patch series. If you haven't pulled from repo.or.cz, I'd appreciate it if you could pull from the mergetool branch (instead of master) instead:

	http://repo.or.cz/w/git/mergetool.git

The differences between the patch series in the master and mergetool branch are:

	* Change the description of the printf patch to say: 
		printf(3)->printf(1)
	* Fix the double space after printf and symlink %s conversion
		earlier in the patch series (only to have it disappear
		in the last patch, so this is a no-op at the end of
		the day, but more of an excuse to go play with stgit
		and in the name of anal-rententive correctness)
	* Use a %s printf conversion for the "Hit return to start merge..."
		statement as noted above in the last patch.
Thanks!!

(Apparently there's no way to forcibly reset the pointer of the master head on repo.or.cz, probably for security/sanity reasons, without going through an administrator.)

						- Ted
Previous: Matthias LederhoferNext: Junio C Hamano
Message 17 of 19 in “[GIT PULL] git mergetool fixes”
  1. Theodore Ts'oMar 29, 2007
  2. Fix minor formatting issue in man page for git-mergetoolTheodore Ts'o, Mar 29, 2007
  3. mergetool: Replace use of "echo -n" with printf(3) to be more portableTheodore Ts'o, Mar 29, 2007
  4. mergetool: Don't error out in the merge case where the local file is deletedTheodore Ts'o, Mar 29, 2007
  5. mergetool: portability fix: don't assume true is in /binTheodore Ts'o, Mar 29, 2007
  6. mergetool: portability fix: don't use reserved word functionTheodore Ts'o, Mar 29, 2007
  7. mergetool: factor out common codeTheodore Ts'o, Mar 29, 2007
  8. mergetool: Remove spurious error message if merge.tool config option not setTheodore Ts'o, Mar 29, 2007
  9. mergetool: Fix abort command when resolving symlinks and deleted filesTheodore Ts'o, Mar 29, 2007
  10. mergetool: Add support for Apple Mac OS X's opendiff commandTheodore Ts'o, Mar 29, 2007
  11. mergetool: Make git-rm quiet when resolving a deleted file conflictTheodore Ts'o, Mar 29, 2007
  12. mergetool: Clean up description of files and prompts for merge resolutionsTheodore Ts'o, Mar 29, 2007
  13. Matthias LederhoferMar 29, 2007
  14. Theodore TsoMar 30, 2007
  15. Randal L. SchwartzMar 30, 2007
  16. Matthias LederhoferMar 29, 2007
  17. Theodore TsoMar 29, 2007
  18. Junio C HamanoMar 29, 2007
  19. Theodore TsoMar 29, 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.