Re: [PATCH v2 1/3] stash bug: stash can lose data in a file removed from the index

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Sunday, April 18, 2010 - 4:11 pm

Charles Bailey <charles@hashpling.org> writes:


It is likely that this needs to be protected with SYMLINKS prerequisite.
Also I am a bit unhappy about the use of "readlink" which is not even in
POSIX.1 here.  We already have one use of it in the tests but that only
happens while doing valgrind.  Traditionally this has been more portably
done by reading from "ls -l file", like so:

	case "$(ls -l file)" in *" file -> file2") :;; *) false;; esac

Also, whether "readlink file" or "ls -l file" is used to check the result,
the "test -f file" is redundant.


I have a feeling that this test is being a bit unfair.

What should a successful invocation of "stash apply" leave in the working
tree in this case, especially when you consider that in a real life use
case you may have other files in "dir" directory or changes to "dir/file"?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH v2 1/3] stash bug: stash can lose data in a fil ..., Junio C Hamano, (Sun Apr 18, 4:11 pm)