Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul CONTRIBUTING document #1103

Merged
merged 3 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
## Your new git-extra command should support
# Contributing

* OSX, Linux, BSD (You may need to browse their man page)<sup>*</sup>
* Bash 3.2+ (If you aren't sure, see [the Bash changelog](https://www.tldp.org/LDP/abs/html/bash2.html))
* Git 2.1+
Thanks for contributing! Please read this document before you make a PR.

<sup>*</sup>If you aren't able to test your new command on a platform,
make that clear in your PR and someone else may be able to test it on their system.
## Supported Platforms

## To submit a new command, you should
Any changes must support the following platforms:

Let's assume your new command is named `foo`.
- macOS, Linux, BSDs (You may need to browse their man page)
- Bash 3.2+ (If you aren't sure, see the [Bash changelog](https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS?h=devel) to see a detailed list of version support for features)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the stale doc. Now we need Bash 4+, and there is other new dependencies: https://github.com/tj/git-extras/blob/main/Installation.md#dependencies

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I missed Installation.md, I'll reference that instead of duplicating the same information in CONTRIBUTING

- Git 2.1+
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is time to update the git version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update it to Git 2.17.1, which is a less ancient Git version and is the lowest common denominator between Ubuntu 18 and Debian 10. I'm not sure if it is a good idea to increase it further than that, because I don't know which versions we truly support? Would we have to check all our uses of git to find out, or do you have an idea yourself?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.17 LGTM


If you aren't able to test your new command on a platform, make that clear in your PR; someone else may be able to test it on their system.

## Testing

We now have a testing suite. Run it with `make test`.

It uses the following dependencies (same or later versions):

- `python==3.10`
- `pytest==7.4.0`
- `GitPython==3.1.36`

## Adding a New Command

Let's say you wish to add a new command. Assuming your new command is named `foo`:

1. Write a bash script under `./bin` called `git-foo`. The script should be started with `#!/usr/bin/env bash`.
2. Read `./man/Readme.md` and write documentation for `git-foo`.
3. Don't forget to introduce it in `Commands.md`.
4. Update `./etc/git-extras-completion.zsh`. Just follow existing code.
5. (Optional) Update `./etc/bash_completion.sh`.
6. (Optional) Update `./etc/git-extras.fish`.
7. Run `./check_integrity.sh foo` to check if all done.
7. (Optional) Add a test under `./tests`.
8. Run `./check_integrity.sh foo` to check if all done.

You are welcome to open up an issue to discuss new commands or features before opening a pull request.
12 changes: 0 additions & 12 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ Go to the [Commands](Commands.md) page for basic usage and examples.

__GIT utilities__ -- repo summary, repl, changelog population, author commit percentages and more

## Test

Nowaday the continues integrations test is coming and you can access it via the `make test` easily.

The CI depends on

* `python==3.10`
* `pytest==7.4.0`
* `GitPython==3.1.36`

So the version or higher is recommended.

## Contributing

Interested in contributing? Awesome!
Expand Down