Package: git
Version: 1:2.1.4-2.1+deb8u1
Severity: normal

Dear Maintainer,

Within scripts I have been using the --work-tree and --git-dir git options as
follows to help "export" my working directory regardless of the last cd
command executed by script invoker or within the script:

git --work-tree=${SOURCE_TREE} --git-dir=${SOURCE_TREE}/.git checkout-index 
--all --prefix=/tmp/parity_bit_check/

where SOURCE_TREE is the absolute location of the top-level directory
of the git repository working directory, and /tmp/parity_bit_check/ is the 
location
to which I want to export my working directory.

The above has generally worked well for other scripts in the past but
today I ran into a situation where only part of my working directory was
exported with no error messages or condition codes from the above
command.  It turned out the last cd executed by the script had put
the location in a subdirectory of $SOURCE_TREE and it was only
that subdirectory that was exported!

Sticking an extra "cd /tmp" into the script worked around the problem,
but I don't think that workaround should be required, i.e., my opinion
is this unexpected behaviour is a bug/misfeature since --all implies
you are going to export all the working directory, and, in any case,
the above --work-tree and --git-dir options should also be the
equivalent of running the git command from ${SOURCE_TREE} rather than
from the actual location.


-- System Information:
Debian Release: 8.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (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/dash
Init: systemd (via /run/systemd/system)

Versions of packages git depends on:
ii  git-man          1:2.1.4-2.1+deb8u1
ii  libc6            2.19-18+deb8u3
ii  libcurl3-gnutls  7.38.0-4+deb8u3
ii  liberror-perl    0.17-1.1
ii  libexpat1        2.1.0-6+deb8u1
ii  libpcre3         2:8.35-3.3+deb8u2
ii  perl-modules     5.20.2-3+deb8u3
ii  zlib1g           1:1.2.8.dfsg-2+b1

Versions of packages git recommends:
ii  less                         458-3
ii  openssh-client [ssh-client]  1:6.7p1-5+deb8u1
ii  patch                        2.7.5-1
ii  rsync                        3.1.1-3

Versions of packages git suggests:
ii  gettext-base                          0.19.3-2
pn  git-arch                              <none>
pn  git-cvs                               <none>
pn  git-daemon-run | git-daemon-sysvinit  <none>
ii  git-doc                               1:2.1.4-2.1+deb8u1
pn  git-el                                <none>
pn  git-email                             <none>
pn  git-gui                               <none>
pn  git-mediawiki                         <none>
pn  git-svn                               <none>
pn  gitk                                  <none>
pn  gitweb                                <none>

-- no debconf information

Reply via email to