diff options
author | Avahe Kellenberger | 2019-04-10 01:30:51 -0400 |
---|---|---|
committer | Avahe Kellenberger | 2019-04-13 01:57:13 -0400 |
commit | 4018044001e60ca7d1705dde6e6e4fb944aff071 (patch) | |
tree | 7e971cbc4e03565c778ca23d023d25c392270dc7 | |
parent | 2b1f50e73202fe02ed60f433aa90b210ade6c97e (diff) | |
download | aur-4018044001e60ca7d1705dde6e6e4fb944aff071.tar.gz |
Added TODO and created sample template.
Converting from bash to c.
Co-authored-by: Steven Ventura <sventura137@gmail.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | TODO.md | 26 | ||||
-rw-r--r-- | commit-template.sample | 3 | ||||
-rw-r--r-- | pair.c | 24 |
4 files changed, 54 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..2518e23f6cb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/**
\ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 000000000000..a31f9d3eac31 --- /dev/null +++ b/TODO.md @@ -0,0 +1,26 @@ +# git pair + +1. Create pre-commit hook which changes the author +2. Create/edit commit template in $PWD/.git/config +3. Check if `git config commit.template` equals `.git/commit-template` +4. If not, execute `git config commit.template .git/commit-template` + +# Commands + +## git pair + +0. If file doesn't exist and `git pair` is ran, display error and suggest `git pair init` +1. Prompt to select author +2. Prompt to select Co-author + +## git pair init + +0. If file exists, display an error message and exit +1. Prompt for developer info (first, last, email) +2. Generate file after first dev is added +3. loop developer entry prompt, exit with `q` +4. Display success message + +## git pair add + +0. If file doesn't exist and `git pair add` is ran, display error and suggest `git pair init`
\ No newline at end of file diff --git a/commit-template.sample b/commit-template.sample new file mode 100644 index 000000000000..d700682b6865 --- /dev/null +++ b/commit-template.sample @@ -0,0 +1,3 @@ + + +Co-authored-by: John Doe <johndoe@email.tld>
\ No newline at end of file diff --git a/pair.c b/pair.c new file mode 100644 index 000000000000..7a8e8992b466 --- /dev/null +++ b/pair.c @@ -0,0 +1,24 @@ +#include <stdio.h> + +#define NO_FORMAT "\033[0m" +#define BOLD "\033[1m" +#define GREEN "\033[38;5;158m" +#define RED "\033[38;5;203m" + +const char* title = +" _ _ _\n" +" __ _(_) |_ _ __ __ _(_)_ __\n" +" / _` | | __| | '_ \\ / _` | | '__|\n" +" | (_| | | |_ | |_) | (_| | | |\n" +" \\__, |_|\\__| | .__/ \\__,_|_|_|\n" +" |___/ |_|\n"; + +int main() { + printf("%s%s%s", RED, title, NO_FORMAT); + + FILE *pair_file; + pair_file = fopen(".gitpair", "r"); + + return 0; +} + |