Package: metastore
Version: 1-2
Severity: normal
Tags: patch


As of commit f5bbc322 (so in particular in Debian version
1:1.5.4.3-1), git pre-commit hooks do not get stdin.  I have worked around
this by reading from /dev/tty. I'm not 100% this has no other issues,
but it works for me (TM).

Maybe this is really a git bug, but I attach a workaround patch for metastore.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.24 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages metastore depends on:
ii  libc6                         2.7-8      GNU C Library: Shared libraries

metastore recommends no packages.

-- no debconf information
*** .git/hooks/pre-commit~      2008-03-04 07:53:13.000000000 +0100
--- .git/hooks/pre-commit       2008-03-04 08:33:27.000000000 +0100
***************
*** 8,14 ****
  echo "Going to commit the following metadata changes" >&2
  metastore -c -m >&2
  echo -n "Ok to commit? (y/n): " >&2
! read -n1 REPLY
  echo ""
  
  if [ "$REPLY" != "y" ]; then
--- 8,14 ----
  echo "Going to commit the following metadata changes" >&2
  metastore -c -m >&2
  echo -n "Ok to commit? (y/n): " >&2
! read -n1 REPLY < /dev/tty
  echo ""
  
  if [ "$REPLY" != "y" ]; then

Reply via email to