[RFC PATCH 0/2] fixing git pull from symlinked directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In a past message I described a problem when pulling in a
directory that I arrived at by "cd"-ing to a symlink.

http://article.gmane.org/gmane.comp.version-control.git/98223

I've created a unit test to illustrate the problem and
compare it to "git pull" without the symlink and "git push"
with the symlink, which both work.  That's the first patch
in this series.

I think the root cause here is that a shell's "cd" and C's
chdir() behave slightly different with symlinks.  See the unit
test comments for more details.

I can make the unit test pass if I make bash's "cd" behave
like chdir() by adding "-P", as in the second patch of this
series, but I think that has portability issues.  Any tips
for addressing that?  Maybe instead call realpath() on the
result of "git rev-parse --show-cdup" in C before printing
it?  That's a substantial change as it would print
/full/path/to/work-dir/ instead of just "../".

Marcel M. Cary (2):
  Add failing test for "git pull" in symlinked directory
  Support shell scripts that run from symlinks into a git working dir

 git-sh-setup.sh         |    2 +-
 t/t5521-pull-symlink.sh |   67 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletions(-)
 create mode 100644 t/t5521-pull-symlink.sh

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux