diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-09-05 23:33:41 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-05 22:24:54 -0700 |
commit | ea09ea22d65d118328642e03ad23c8257304499d (patch) | |
tree | b30f61aac6b354bafb1d0660f7a4217ee577fe5d /t/t5520-pull.sh | |
parent | git-apply: do not read past the end of buffer (diff) | |
download | tgif-ea09ea22d65d118328642e03ad23c8257304499d.tar.xz |
Don't allow contrib/workdir/git-new-workdir to trash existing dirs
Recently I found that doing a sequence like the following:
git-new-workdir a b
...
git-new-workdir a b
by accident will cause a (and now also b) to have an infinite cycle
in its refs directory. This is caused by git-new-workdir trying
to create the "refs" symlink over again, only during the second
time it is being created within a's refs directory and is now also
pointing back at a's refs.
This causes confusion in git as suddenly branches are named things
like "refs/refs/refs/refs/refs/refs/refs/heads/foo" instead of the
more commonly accepted "refs/heads/foo". Plenty of commands start
to see ambiguous ref names and others just take ages to compute.
git-clone has the same safety check, so git-new-workdir should
behave just like it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
0 files changed, 0 insertions, 0 deletions