@matheusbsbs / matheus-bagliano / commits / 6ab149ea89
Fork 0

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

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Gerrit Pape committed Feb 24, 2009 at 09:00 UTC 6ab149ea89fe5790630c5750af0e3245a7a5e06e
1 file changed +2 -2
git-quiltimport.sh
+2 -2
@@ -63,7 +63,7 @@ tmp_info="$tmp_dir/info"
63 commit=$(git rev-parse HEAD)
64
65 mkdir $tmp_dir || exit 2
66 -while read patch_name level garbage
66 +while read patch_name level garbage <&3
67 do
68 case "$patch_name" in ''|'#'*) continue;; esac
69 case "$level" in
@@ -134,5 +134,5 @@ do
134 commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git commit-tree $tree -p $commit) &&
135 git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
136 fi
137 -done <"$QUILT_PATCHES/series"
137 +done 3<"$QUILT_PATCHES/series"
138 rm -rf $tmp_dir || exit 5