Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e87d3d7

Browse files
committed
Make comments more consistent and clarify license
This improves the consistency of top-of-module comments as follows: - All names of the current file are removed. Some included these while others didn't. In general, this can be useful information, which can remind readers and developers of what the file is and may even reduce mistakes. However, in GitPython, many modules inside git/ have the same name as other modules in other subdirectories of git/. So the presence of filenames would often be the same for multiple files, a condition that would be intensified if consistency were achieved by adding them everywhere. This instead removes them, which should (albeit slightly) decrease the risk of confusing modules that have the same name as each other. - All modules (.py files) inside git/ and test/, except for .py files that are entirely empty (without even comments) or are inside test/fixtures/, now have comments indicating the license and linking to it on opensource.org. Previously, some modules had this, while others did not. The comment about the license is short, and does not contain an explicit copyright statement. No new explicit copyright statements are added, but some top-of-modules already contained them, and this does not remove (nor update or otherwise modify) them. Although explicit copyright statements are not touched, all the license comments are modified, including where they had previously appeared, to say "the 3-Clause BSD License" instead of "the BSD License", since there is no specific license known as the "BSD License" (and both the 2-clause and 3-clause BSD licenses are very popular). This change should not be confused with #1662, which fixed an originally correct hyperlink that had come to redirect to a page about a different license. The change here does not change the link again. It makes the commented wording more specific, so that it is clear, even without looking at the link, which BSD license is being referred to.
1 parent 340da6d commit e87d3d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+167
-119
lines changed

git/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# __init__.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

76
# flake8: noqa
87
# @PydevCodeAnalysisIgnore

git/cmd.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# cmd.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

76
from __future__ import annotations
87

git/compat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# compat.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

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

git/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# config.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

76
"""Module containing module parser implementation able to properly read and write
87
configuration files."""

git/db.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This module is part of GitPython and is released under the
2+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
3+
14
"""Module with our own gitdb implementation - it uses the git command."""
25

36
from git.util import bin_to_hex, hex_to_bin

git/diff.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# diff.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

76
import re
87
from git.cmd import handle_process_output

git/exc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# exc.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

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

git/index/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This module is part of GitPython and is released under the
2+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
3+
14
"""Initialize the index package."""
25

36
# flake8: noqa

git/index/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# base.py
21
# Copyright (C) 2008, 2009 Michael Trier ([email protected]) and contributors
32
#
4-
# This module is part of GitPython and is released under
5-
# the BSD License: https://opensource.org/license/bsd-3-clause/
3+
# This module is part of GitPython and is released under the
4+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
65

76
from contextlib import ExitStack
87
import datetime

git/index/fun.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This module is part of GitPython and is released under the
2+
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
3+
14
# Standalone functions to accompany the index implementation and make it more versatile.
25
# NOTE: Autodoc hates it if this is a docstring.
36

0 commit comments

Comments
 (0)