b63e282 [macros] handle submodules

Authored and Committed by clime 4 years ago
    [macros] handle submodules
    
    - if path argument leads to a submodule, then we cannot just use
    git prefix to determine path prefix because that's relative to
    the submodule top-level. Path from the superproject root the
    submodule root needs to be included (prefixed) too, so that
    e.g. we generate a correct name for a resulting tarball.
    - commit hashes in source names comes from superproject's GIT_HEAD,
    even if we work with a submodule path. That's a feature cause
    submodule commits are recorded in superproject's GIT_HEAD too.
    - the commit entries recorded in superproject's GIT_HEAD is what's
    giving us what we should archive in git_archive (recursively)
    - also add explanatory comments to git_archive and git_pack
    
        
file modified
+46 -5