Commit 4205137
subtree: validate --prefix against commit in split
git subtree split currently validates --prefix against the working tree.
This breaks when splitting an older commit or when the working tree does
not contain the subtree, even though the commit does.
For example:
git subtree split --prefix=pkg <commit>
fails if pkg was removed later, even though it exists in <commit>.
Fix this by validating the prefix against the specified commit using
git ls-tree instead of the working tree.
Signed-off-by: Pushkar Singh <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent d529f3a commit 4205137
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| |||
966 | 969 | | |
967 | 970 | | |
968 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
969 | 978 | | |
970 | 979 | | |
971 | 980 | | |
| |||
0 commit comments