From c3f8e128a566c3b161201b2ad7870c48b90c24bf Mon Sep 17 00:00:00 2001 From: kimm310 Date: Sat, 12 Apr 2025 18:11:19 +0200 Subject: [PATCH 1/4] created manual page TODO: - finish COMMANDS section - find a way to actually view this in the terminal - find a way to install it so Git can find an open it --- git-feature.1 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 git-feature.1 diff --git a/git-feature.1 b/git-feature.1 new file mode 100644 index 0000000..d88af99 --- /dev/null +++ b/git-feature.1 @@ -0,0 +1,17 @@ +.TH git-feature 1 "12 April 2025" "Kim Nguyen" "Git-Feature Documentation" +.SH NAME +git-feature \- Manage feature metadata and inspect feature-related information + +.SH SYNOPSIS +\fBgit feature status\fP +\fBgit feature add\fP [-a | --all | -f | --files ] +\fBgit feature add-from-staged\fP +\fBgit feature commit\fP [--features ] +\fBgit feature commits missing\fP +\fBgit feature commits list\fP +\fBgit feature blame\fP +\fBgit feature info-all\fP +\fBgit feature info\fP [--authors | --files | --branches | --updatable | --branch ] + +.SH COMMANDS +With no arguments, shows the help text. Several subcommands are available to perform operations on the feature metadata. \ No newline at end of file From 9cc1408b230b863795300c280dfdfcf8b9481c5e Mon Sep 17 00:00:00 2001 From: kimm310 Date: Sun, 13 Apr 2025 12:29:29 +0200 Subject: [PATCH 2/4] updated README and created html document via pandoc TODO (by priority): - find a way to install it so Git can find and open it - finish COMMANDS section --- README.md | 61 ++++++++------- git-feature.1 | 29 ++++--- git-feature.html | 197 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 248 insertions(+), 39 deletions(-) create mode 100644 git-feature.html diff --git a/README.md b/README.md index 37b3774..05cf4be 100644 --- a/README.md +++ b/README.md @@ -29,19 +29,19 @@ This tool provides advanced Git feature management, allowing you to associate fe ## Commands Overview -### `git feature-status` +### `git feature status` Displays the current feature status, including staged, unstaged, and untracked files with their associated features. **Usage**: ```bash -git feature-status +git feature status ``` -### `git feature-add` +### `git feature add` This command helps to associate feature information with a commit that does not yet exist. You can either add the information while adding the files or add features to the staging area. If you prefer to keep your workflows as usual and add feature information solely to commits that you already created, you don't need the git hooks and can jump to `git feature-commit`. -#### `git feature-add by-add` +#### `git feature add` Associates specified features with staged files. You can stage specific files or all tracked changes. @@ -51,62 +51,65 @@ Associates specified features with staged files. You can stage specific files or **Usage**: ```bash -git feature-add by-add --all -git feature-add by-add --files ... +git feature add --all +git feature add --files ... ``` -#### `git feature-add from-staged` +#### `git feature add-from-staged` Uses staged files to associate them with feature information. **Usage**: ```bash -git feature-add from-staged +git feature add-from-staged ``` -### `git feature-commit` +### `git feature commit` Assign features to a commit retroactively. To find all commits that have not yet features assigned, see --- **Usage**: ```bash -git feature-commit +git feature commit ``` -### `git feature-blame` +### `git feature blame` Displays the feature associations for each line of a specified file, similar to `git blame`. **Usage**: ```bash -git feature-blame +git feature blame ``` -### `git feature-info` +### `git feature info` Displays detailed information about a feature, including associated commits, files, authors, and branches. **Options**: - `--authors`: Lists the authors who contributed to the feature. - `--files`: Lists the files associated with the feature. -- `--branches`: Lists the branches where the feature is found. +- `--branches`: Lists the branches where the feature is present. +- `--updatable`: Check if the feature has updates available on other branches and list the update options. +- `--branch `: Specify a branch for checking updates (used with `--updatable`). **Usage**: ```bash -git feature-info -git feature-info --authors --files --branches +git feature info +git feature info --authors --files --branches ``` -### `git feature-commits` +### `git feature commits` Lists all commits associated with a feature or shows commits that are missing feature associations. -**Options**: -- `--missing`: Lists commits that do not have any associated feature. +**Commands**: +- `missing`: Lists commits that do not have any associated feature. +- `list`: List commits that are associated to features. **Usage**: ```bash -git feature-commits -git feature-commits --missing +git feature commits list +git feature commits missing ``` --- @@ -115,38 +118,38 @@ git feature-commits --missing 1. **Check Feature Status**: ```bash - git feature-status + git feature status ``` 2. **Add Features to All Files**: ```bash - git feature-add by-add --all "new-feature" + git feature add --all "new-feature" ``` 3. **Add Features to Specific Files**: ```bash - git feature-add by-add --files src/main.py "feature-x" + git feature add --files src/main.py "feature-x" ``` 4. **Use Staged Files for Feature Information**: ```bash - git feature-add from-staged + git feature add-from-staged ``` 5. **Show Feature Associations for a File**: ```bash - git feature-blame src/main.py + git feature blame src/main.py ``` 6. **Display Feature Information**: ```bash - git feature-info feature-x --authors --files --branches + git feature info feature-x --authors --files --branches ``` 7. **List All Commits With and Without Features**: ```bash - git feature-commits - git feature-commits --missing + git feature commits list + git feature commits missing ``` --- diff --git a/git-feature.1 b/git-feature.1 index d88af99..976f323 100644 --- a/git-feature.1 +++ b/git-feature.1 @@ -1,16 +1,25 @@ -.TH git-feature 1 "12 April 2025" "Kim Nguyen" "Git-Feature Documentation" +.TH git-feature 1 "12 April 2025" "Kim Nguyen" "git-feature(1) Manual Page" .SH NAME -git-feature \- Manage feature metadata and inspect feature-related information +git-feature - Manage feature metadata and inspect feature-related information .SH SYNOPSIS -\fBgit feature status\fP -\fBgit feature add\fP [-a | --all | -f | --files ] -\fBgit feature add-from-staged\fP -\fBgit feature commit\fP [--features ] -\fBgit feature commits missing\fP -\fBgit feature commits list\fP -\fBgit feature blame\fP -\fBgit feature info-all\fP +.P +\fB git feature status \fP +.P +\fB git feature add \fP [-a | --all | -f | --files ] +.P +\fB git feature add-from-staged \fP +.P +\fB git feature commit \fP [--features ] +.P +\fB git feature commits missing \fP +.P +\fB git feature commits list \fP +.P +\fB git feature blame \fP +.P +\fB git feature info-all \fP +.P \fBgit feature info\fP [--authors | --files | --branches | --updatable | --branch ] .SH COMMANDS diff --git a/git-feature.html b/git-feature.html new file mode 100644 index 0000000..924e994 --- /dev/null +++ b/git-feature.html @@ -0,0 +1,197 @@ + + + + + + + + git-feature + + + +
+

git-feature

+

12 April 2025

+
+

NAME

+

git-feature - Manage feature metadata and inspect feature-related +information

+

SYNOPSIS

+

git feature status

+

git feature add <feature_list> [-a | --all | +-f <file_name> | --files <file_name>]

+

git feature add-from-staged

+

git feature commit <commit_id> [--features +<feature_name>]

+

git feature commits missing

+

git feature commits list

+

git feature blame <file_name>

+

git feature info-all

+

git feature info <feature_name> [--authors | +--files | --branches | --updatable | --branch <branch_name>]

+

COMMANDS

+

With no arguments, shows the help text. Several subcommands are +available to perform operations on the feature metadata.

+ + From 867d0303f15263ad1c3dfc7be057428e9734abe3 Mon Sep 17 00:00:00 2001 From: kimm310 Date: Wed, 16 Apr 2025 20:46:31 +0200 Subject: [PATCH 3/4] created a web doc for git-feature based on the html files residing in path C:/Program Files/Git/mingw64/share/doc/git-doc TODO: find a way to copy the manpage / web doc in the respective paths -> requires root privileges (Administrator-Rechte) --- git-feature.1 | 2 +- git-remote(editToFeature).html | 2323 ++++++++++++++++++++++++++++++++ 2 files changed, 2324 insertions(+), 1 deletion(-) create mode 100644 git-remote(editToFeature).html diff --git a/git-feature.1 b/git-feature.1 index 976f323..f14d574 100644 --- a/git-feature.1 +++ b/git-feature.1 @@ -6,7 +6,7 @@ git-feature - Manage feature metadata and inspect feature-related information .P \fB git feature status \fP .P -\fB git feature add \fP [-a | --all | -f | --files ] +\fB git feature add \fP [-a | --all | -f | --files ] .P \fB git feature add-from-staged \fP .P diff --git a/git-remote(editToFeature).html b/git-remote(editToFeature).html new file mode 100644 index 0000000..49a4551 --- /dev/null +++ b/git-remote(editToFeature).html @@ -0,0 +1,2323 @@ + + + + + + + + git-feature(1) + + + + + +
+
+

SYNOPSIS

+
+
+
git feature status
+git feature add <feature_names> (-a | --all | -f <file_name> | --files <file_name>)
+git feature add-from-staged
+git feature commit <commit_id> [--features <feature_name>]
+git feature commits list
+git feature commits missing
+git feature blame <file_name>
+git feature info-all [--push] <name> <newurl> [<oldurl>]
+git feature info [--authors | --files | --branches | --updatable | --branch <branch_name>]
+
+
+
+
+

DESCRIPTION

+
+
+

Associate features with commits and files in a repository, manage feature metadata, and inspect feature-related information.

+
+
+
+
+

COMMANDS

+
+
+

With no subcommands, shows the help text. Several subcommands are available to track and manage feature information.

+
+
+
+
status
+
+

Displays the current status of files in the working directory, showing staged, unstaged, and untracked changes + along with their associated features. This command is intended to be used with the following commands to add + feature information while staging files. It can also be used to aid in the selection of files for the next commit.

+
+
add
+
+

Stage specific <file_names> or all files and associate them with the provided features.

+
+

With -a or --all, you can stage all tracked changes and associate them with the features.

+
+
+

With -f or --files, you can stage a <file_name> and associate it with the features. + You can use this option multiple times to stage multiple files.

+
+
+
add-from-staged
+
+

Associate features with the currently staged files. Currently, it derives the feature list from the previously selected + features for those files and is not fully implemented yet.

+
+
commit
+
+

Associates feature information with an existing commit. This is useful when you want to add feature metadata to a commit + after it has been created.

+
+

With --features, a feature name is manually specified. You can use this option multiple times to associate + multiple features. If this is provided, staged feature information will be ignored. Otherwise, the program will try + to derive the information.

+
+
+
commits
+
+

Provides information about commits that are either already associated, or have not yet been associated with a feature. + This is especially useful when transitioning to feature-based workflows or when tracing commits for specific features. + It helps identifying which commits have feature metadata associated and which do not, ensuring that no commit is left + untracked.

+
+

With the list subcommand, show a list of commits that are already associated with features.

+
+
+

With the missing subcommand, show a list of commits that have not yet been associated with features.

+
+
+
blame
+
+

Display features associated with <file_name> lines. Currently, it shows the associated file and has not yet been fully + implemented yet.

+
+
info-all
+
+

List all available features in the project.

+
+
info
+
+

Shows detailed information about the feature <feature_name>, including authors, files, branches, and update status.

+
+

With --authors, show all authors who contributed to this feature.

+
+
+

With --files, list all files associated with this feature.

+
+
+

With --branches, show all branches where this feature is present.

+
+
+

With --branch <branch_name>, show all branches where this feature is present.

+
+
+
+
+
+
+
+

EXAMPLE WORKFLOWS

+
+
+
    +
  • +

    Assess the file location for feature authentication, inspect its commit history, and list its authors

    +
    +
    +
    $ git feature info "authentication" --files
    +    Files associated with 'authentication':
    +    - src/auth/login.py
    +    - src/auth/logout.py
    +    - src/auth/utils.py
    +
    +$ git feature info "authentication" --log
    +    Recent commits for 'authentication':
    +    − mno7890 : Improved password hashing algorithm
    +    − abc1234 : Implemented login functionality
    +    ...
    +$ git show mno7890
    +    commit mno7890
    +    Author: Bob <bob@company.com >
    +    Date: Mon Apr 01 11:12:13 2024
    +    Improved password hashing algorithm
    +
    +    The one used before had a problem.
    +    diff −−git a/src/auth/utils.pyb/src/auth/utils.py
    +    <diff of the commit>
    +
    +$ git feature info "authentication" --authors
    +    Top contributors to 'authentication':
    +    − Alice Smith (5 commits)
    +    − Bob Johnson (3 commits)
    +
    +
    +
  • +
  • +

    Analyze and stage changes, associate with feature add and commit the changes

    +
    +
    +
    $ git feature status
    +    Unstaged changes:
    +        src/main.py [add]
    +        src/operations.py [subtract, add]
    +        src/utils.py [core]
    +
    +$ git feature add "core" --file src/utils.py
    +    Feature 'core' associated with staged changes.
    +
    +$ git feature status
    +    Unstaged changes:
    +        src/main.py [add]
    +        src/operations.py [subtract, add]
    +
    +    Staged changes:
    +        src/utils.py [core]
    +
    +$ git commit
    +    [main abc1234] Implemented new functionality for core
    +    Feature: core
    +    1 file changed, 50 insertions(+), 10 deletions(-)
    +
    +
    +
    +
  • +
  • +

    Assign feature core to an already existing commit

    +
    +
    +
    $ git log -n 1 --oneline
    +    abc1234 (HEAD -> main) Implemented new functionality for core
    +
    +$ git feature commit "core" abc1234
    +
    +
    +
    +
  • +
+
+
+
+
+

GIT

+
+
+

A Git extension built by Tabea Röthemeyer and improved by Kim Nguyen in collaboration with the Software + Engineering Faculty of the Ruhr-Universität Bochum.

+
+
+
+
+ + + \ No newline at end of file From 8cc3ee2bc9bb3d0b3df556631ca15f8236d5b182 Mon Sep 17 00:00:00 2001 From: kimm310 Date: Wed, 16 Apr 2025 23:09:59 +0200 Subject: [PATCH 4/4] put .1 file and .html file into new directory "helpdoc" TODO: find a way to copy the manpage / web doc in the respective paths -> requires root privileges (Administrator-Rechte) --- git-feature.html | 197 ------------------ .../helpdoc/git-feature.1 | 0 .../helpdoc/git-feature.html | 0 3 files changed, 197 deletions(-) delete mode 100644 git-feature.html rename git-feature.1 => git_tool/helpdoc/git-feature.1 (100%) rename git-remote(editToFeature).html => git_tool/helpdoc/git-feature.html (100%) diff --git a/git-feature.html b/git-feature.html deleted file mode 100644 index 924e994..0000000 --- a/git-feature.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - git-feature - - - -
-

git-feature

-

12 April 2025

-
-

NAME

-

git-feature - Manage feature metadata and inspect feature-related -information

-

SYNOPSIS

-

git feature status

-

git feature add <feature_list> [-a | --all | --f <file_name> | --files <file_name>]

-

git feature add-from-staged

-

git feature commit <commit_id> [--features -<feature_name>]

-

git feature commits missing

-

git feature commits list

-

git feature blame <file_name>

-

git feature info-all

-

git feature info <feature_name> [--authors | ---files | --branches | --updatable | --branch <branch_name>]

-

COMMANDS

-

With no arguments, shows the help text. Several subcommands are -available to perform operations on the feature metadata.

- - diff --git a/git-feature.1 b/git_tool/helpdoc/git-feature.1 similarity index 100% rename from git-feature.1 rename to git_tool/helpdoc/git-feature.1 diff --git a/git-remote(editToFeature).html b/git_tool/helpdoc/git-feature.html similarity index 100% rename from git-remote(editToFeature).html rename to git_tool/helpdoc/git-feature.html