project: Fallback to directory name if project/name isn't set
authorW. Trevor King <wking@tremily.us>
Sat, 28 Mar 2015 19:56:15 +0000 (12:56 -0700)
committerW. Trevor King <wking@tremily.us>
Sat, 28 Mar 2015 20:05:52 +0000 (13:05 -0700)
commit88d7ade9e272e079b457c449c931e04994b02429
treeacf34ce7a753336de60d921ab6950f5c14fcf7c2
parent7a3056f17312a25102aa794b530a1a1ab148aced
project: Fallback to directory name if project/name isn't set

I recommend folks set this explicitly, but Greg Wilson wanted a way
for folks to use update-copyright without having to tweak this name
after forking [1].  The approach I've used here isn't the same as the
one discussed in that issue (using the name of the upstream Git
repository), but I think it's a better choice.  Pros and cons:

+ Simple, VCS-agnostic implementation
+ Doesn't make assumptions about the upstream repository naming
- Assumes folks name their local repository appropriately
- Won't handle several projects stored in the same Git repository For
  example, if you have a branch for project-a and another for
  project-b that are both in your local project-a repository, you'll
  have to explicitly set project.name in the project-b branch's
  .update-copyright.conf.

[1]: https://github.com/swcarpentry/lesson-template/pull/197#discussion_r26456407
README
update_copyright/project.py