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

[PATCH] git-quiltimport: preserve standard input to be able to read user input

From
Gerrit Pape <pape@smarden.org>
Date
Feb 24, 2009, 09:00 UTC
Message-ID
<20090224090006.16998.qmail@c47830338ab2ae.315fe32.mid.smarden.org>

When run without --author and it fails to determine an author, git quiltimport tries `read patch_author` to get user input, but standard input has been redirected to the patch series file. This commit lets quiltimport read the series file through file descriptor 3 so that the standard input is preserved.

Reported by Uwe Kleine-König through
 http://bugs.debian.org/515910
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 git-quiltimport.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index cebaee1..9a6ba2b 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -63,7 +63,7 @@ tmp_info="$tmp_dir/info"
 commit=$(git rev-parse HEAD)
 
 mkdir $tmp_dir || exit 2
-while read patch_name level garbage
+while read patch_name level garbage <&3
 do
 	case "$patch_name" in ''|'#'*) continue;; esac
 	case "$level" in
@@ -134,5 +134,5 @@ do
 		commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git commit-tree $tree -p $commit) &&
 		git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
 	fi
-done <"$QUILT_PATCHES/series"
+done 3<"$QUILT_PATCHES/series"
 rm -rf $tmp_dir || exit 5
-- 
1.6.1.3
Message 1 of 1 in “git-quiltimport: preserve standard input to be able to read user input”
  1. git-quiltimport: preserve standard input to be able to read user inputGerrit Pape, Feb 24, 2009

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.