Re: [PATCH] clone: Warn if clone lacks LICENSE or COPYING file
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 22, 2015, 17:56 UTC
- Message-ID
- <CACBZZX67igE67+y7Tme=_OC7JiT726qB4X18+8Mvg1ewssQ_ug@mail.gmail.com>
- In-Reply-To
- <E1YZNn7-0002Lc-7O@rmm6prod02.runbox.com>
On Sat, Mar 21, 2015 at 7:06 PM, David A. Wheeler <dwheeler@dwheeler.com> wrote:
Show 9 quoted lines
> Warn cloners if there is no LICENSE* or COPYING* file that makes > the license clear. This is a useful warning, because if there is > no license somewhere, then local copyright laws (which forbid many uses) > and terms of service apply - and the cloner may not be expecting that. > Many projects accidentally omit a license, so this is common enough to note. > For more info on the issue, feel free to see: > http://choosealicense.com/no-license/ > http://www.wired.com/2013/07/github-licenses/ > https://twitter.com/stephenrwalli/status/247597785069789184
As others have indicated here this feature is really specific to a single lint-like use-case and doesn't belong in clone as a built-in feature.
However perhaps an interesting generalization of this would be something like a post-clone hook, obviously you couldn't store that in .git/hooks/ like other githooks(5) since there's no repo yet, but having it configured via the user/system config might be an interesting feature.
If you're still interested in getting this functionality perhaps a patch to have some general post-clone hook mechanism would be accepted, then you could check license files or anything else you cared about.
You could also just have a shell alias that wrapped git-clone...