{"thread":{"id":"17986","subject":"[PATCH] git-quiltimport: preserve standard input to be able to read user input","startedAt":"2009-02-24T09:00:06Z","lastAt":"2009-02-24T09:00:06Z","messageCount":1,"participants":["Gerrit Pape"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"106004","messageId":"20090224090006.16998.qmail@c47830338ab2ae.315fe32.mid.smarden.org","threadId":"17986","inReplyTo":null,"subject":"[PATCH] git-quiltimport: preserve standard input to be able to read user input","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2009-02-24T09:00:06Z","receivedAt":"2009-02-24T09:00:06Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"When run without --author and it fails to determine an author, git\nquiltimport tries `read patch_author` to get user input, but standard\ninput has been redirected to the patch series file.  This commit lets\nquiltimport read the series file through file descriptor 3 so that the\nstandard input is preserved.\n\nReported by Uwe Kleine-König through\n http://bugs.debian.org/515910\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n git-quiltimport.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex cebaee1..9a6ba2b 100755\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -63,7 +63,7 @@ tmp_info=\"$tmp_dir/info\"\n commit=$(git rev-parse HEAD)\n \n mkdir $tmp_dir || exit 2\n-while read patch_name level garbage\n+while read patch_name level garbage <&3\n do\n \tcase \"$patch_name\" in ''|'#'*) continue;; esac\n \tcase \"$level\" in\n@@ -134,5 +134,5 @@ do\n \t\tcommit=$( (echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git commit-tree $tree -p $commit) &&\n \t\tgit update-ref -m \"quiltimport: $patch_name\" HEAD $commit || exit 4\n \tfi\n-done <\"$QUILT_PATCHES/series\"\n+done 3<\"$QUILT_PATCHES/series\"\n rm -rf $tmp_dir || exit 5\n-- \n1.6.1.3\n"}]}