Skip to content

Commit

Permalink
git-quiltimport: preserve standard input to be able to read user input
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gerrit Pape authored and gitster committed Feb 25, 2009
1 parent 6a0861a commit 6ab149e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-quiltimport.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 6ab149e

Please sign in to comment.