Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:
It would be quite a nuisance for a patch-based workflow, since patches
don't talk about the creation and deletion of directories.
The "track only when entered approach" has the advantage that
directories that were only created to accommodate patches will be
removed again when becoming empty.
Of course, once doing "git-add top-level" will level the difference.
Why wouldn't I have tree/zap removed when doing git-rm tree?
But it doesn't. If you do git-add tree, optimizing the dir entry away
since tree/zap exists, then subsequently do git-rm tree/zap, of course
there is nothing to do except remove tree/zap, and the tree is gone.
One can't start tracking trees explicitly only when they become empty,
because one can't know whether to track them then.
I currently have the problem that
rm -rf *
unzip some-archive
git-add some-archive
git-commit -a -m whatever
git-checkout something else
leaves empty directory skeletons lying around.
I don't want a source management system to tell me whenever it is
going to annoy me.
With that approach idea the workflow
"Apply a patch creating something/hello"
"Undo the patch creating something/hello"
will leave something lying around. For somebody managing hundreds of
directories, that would be a nuisance.
I don't say that a "track all parents automatically" approach would
not have its merits: it would likely prevent some mistakes and be
easily understandable to most users. But for managing a patch
workflow, it would appear to get in the way.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
-
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