Skip to content

Commit

Permalink
Merge pull request #1730 from EliahKagan/license-clarity
Browse files Browse the repository at this point in the history
Clarify license and make module top comments more consistent
  • Loading branch information
Byron authored Nov 5, 2023
2 parents 86453ef + 209162a commit c594433
Show file tree
Hide file tree
Showing 71 changed files with 169 additions and 121 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ gpg --edit-key 4C08421980C9

### LICENSE

[New BSD License](https://opensource.org/license/bsd-3-clause/). See the [LICENSE file][license].
[3-Clause BSD License](https://opensource.org/license/bsd-3-clause/), also known as the New BSD License. See the [LICENSE file][license].

[contributing]: https://github.com/gitpython-developers/GitPython/blob/main/CONTRIBUTING.md
[license]: https://github.com/gitpython-developers/GitPython/blob/main/LICENSE
5 changes: 2 additions & 3 deletions git/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# __init__.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

# flake8: noqa
# @PydevCodeAnalysisIgnore
Expand Down
5 changes: 2 additions & 3 deletions git/cmd.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# cmd.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from __future__ import annotations

Expand Down
5 changes: 2 additions & 3 deletions git/compat.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# compat.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Utilities to help provide compatibility with Python 3."""

Expand Down
5 changes: 2 additions & 3 deletions git/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# config.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module containing module parser implementation able to properly read and write
configuration files."""
Expand Down
3 changes: 3 additions & 0 deletions git/db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module with our own gitdb implementation - it uses the git command."""

from git.util import bin_to_hex, hex_to_bin
Expand Down
5 changes: 2 additions & 3 deletions git/diff.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# diff.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

import re
from git.cmd import handle_process_output
Expand Down
5 changes: 2 additions & 3 deletions git/exc.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# exc.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module containing all exceptions thrown throughout the git package."""

Expand Down
3 changes: 3 additions & 0 deletions git/index/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Initialize the index package."""

# flake8: noqa
Expand Down
5 changes: 2 additions & 3 deletions git/index/base.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from contextlib import ExitStack
import datetime
Expand Down
3 changes: 3 additions & 0 deletions git/index/fun.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

# Standalone functions to accompany the index implementation and make it more versatile.
# NOTE: Autodoc hates it if this is a docstring.

Expand Down
3 changes: 3 additions & 0 deletions git/index/typ.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module with additional types used by the index."""

from binascii import b2a_hex
Expand Down
3 changes: 3 additions & 0 deletions git/index/util.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module containing index utilities."""

from functools import wraps
Expand Down
3 changes: 3 additions & 0 deletions git/objects/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Import all submodules' main classes into the package space."""

# flake8: noqa
Expand Down
5 changes: 2 additions & 3 deletions git/objects/base.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from git.exc import WorkTreeRepositoryUnsupported
from git.util import LazyMixin, join_path_native, stream_copy, bin_to_hex
Expand Down
5 changes: 2 additions & 3 deletions git/objects/blob.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# blob.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from mimetypes import guess_type
from . import base
Expand Down
5 changes: 2 additions & 3 deletions git/objects/commit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# commit.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

import datetime
import re
Expand Down
3 changes: 3 additions & 0 deletions git/objects/fun.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module with functions which are supposed to be as fast as possible."""

from stat import S_ISDIR
Expand Down
3 changes: 3 additions & 0 deletions git/objects/submodule/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

# NOTE: Cannot import anything here as the top-level __init__ has to handle
# our dependencies.
3 changes: 3 additions & 0 deletions git/objects/submodule/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from io import BytesIO
import logging
import os
Expand Down
3 changes: 3 additions & 0 deletions git/objects/submodule/root.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from .base import Submodule, UpdateProgress
from .util import find_first_remote_branch
from git.exc import InvalidGitRepositoryError
Expand Down
3 changes: 3 additions & 0 deletions git/objects/submodule/util.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

import git
from git.exc import InvalidGitRepositoryError
from git.config import GitConfigParser
Expand Down
5 changes: 2 additions & 3 deletions git/objects/tag.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# tag.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module containing all Object-based types."""

Expand Down
5 changes: 2 additions & 3 deletions git/objects/tree.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# tree.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from git.util import IterableList, join_path
import git.diff as git_diff
Expand Down
5 changes: 2 additions & 3 deletions git/objects/util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# util.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module for general utility functions."""

Expand Down
4 changes: 4 additions & 0 deletions git/refs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

# flake8: noqa
# Import all modules in order, fix the names they require.

from .symbolic import *
from .reference import *
from .head import *
Expand Down
3 changes: 3 additions & 0 deletions git/refs/head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from git.config import GitConfigParser, SectionConstraint
from git.util import join_path
from git.exc import GitCommandError
Expand Down
3 changes: 3 additions & 0 deletions git/refs/log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from mmap import mmap
import re
import time as _time
Expand Down
3 changes: 3 additions & 0 deletions git/refs/reference.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from git.util import (
LazyMixin,
IterableObj,
Expand Down
3 changes: 3 additions & 0 deletions git/refs/remote.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

import os

from git.util import join_path
Expand Down
3 changes: 3 additions & 0 deletions git/refs/symbolic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from git.types import PathLike
import os

Expand Down
3 changes: 3 additions & 0 deletions git/refs/tag.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from .reference import Reference

__all__ = ["TagReference", "Tag"]
Expand Down
5 changes: 2 additions & 3 deletions git/remote.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# remote.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module implementing a remote object allowing easy access to git remotes."""

Expand Down
3 changes: 3 additions & 0 deletions git/repo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Initialize the Repo package."""

# flake8: noqa
Expand Down
5 changes: 2 additions & 3 deletions git/repo/base.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from __future__ import annotations

Expand Down
3 changes: 3 additions & 0 deletions git/repo/fun.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Module with general repository-related functions."""

from __future__ import annotations
Expand Down
4 changes: 2 additions & 2 deletions git/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

# flake8: noqa

Expand Down
5 changes: 2 additions & 3 deletions git/util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# util.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

from abc import abstractmethod
import contextlib
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _stamp_version(filename: str) -> None:
description="GitPython is a Python library used to interact with Git repositories",
author="Sebastian Thiel, Michael Trier",
author_email="byronimo@gmail.com, mtrier@gmail.com",
license="BSD",
license="BSD-3-Clause",
url="https://github.com/gitpython-developers/GitPython",
packages=find_packages(exclude=["test", "test.*"]),
include_package_data=True,
Expand Down
5 changes: 2 additions & 3 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# __init__.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
5 changes: 2 additions & 3 deletions test/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# __init__.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

# flake8: noqa
import inspect
Expand Down
5 changes: 2 additions & 3 deletions test/lib/helper.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# helper.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

import contextlib
from functools import wraps
Expand Down
3 changes: 3 additions & 0 deletions test/performance/lib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Support library for tests."""

import logging
Expand Down
4 changes: 2 additions & 2 deletions test/performance/test_commit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Performance tests for commits (iteration, traversal, and serialization)."""

Expand Down
3 changes: 3 additions & 0 deletions test/performance/test_odb.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

"""Performance tests for object store."""

import sys
Expand Down
Loading

0 comments on commit c594433

Please sign in to comment.