tj / tj/git-extras

Test(git-brv): add unit test

Open
#1,131 5 comments 0 reactions 1 assignee View on GitHub

@vanpipy is already working on this.

Since Jan 26, 2024.

discussion enhancement
Dominant language
Shell
Stars
18.1k
Forks
1.2k
Avg merge
5d 17h
Merged PRs (30d)
1

Description

File

git-brv

Testcases

  1. If the repository has only one branch and its name is main, when invoke the git-brv command, the format of the result is {date} {branch_name} {upstream} {branch_short_hash} {commit_title_message} and output is just like 2024-01-05 main origin/main b54d8c7 test(git-browse): add unit tests (#1127)
  2. If the repository has multiple branches and the names are feature/2024-01-01, feature/2024-01-02, feature/2024-01-03 and suppose the branches created date are same to the branch name, when invoke the git-brv command, the result is
{date} feature/2024-01-03 {upstream} {branch_short_hash} {commit_title_message}
{date} feature/2024-01-02 {upstream} {branch_short_hash} {commit_title_message}
{date} feature/2024-01-01 {upstream} {branch_short_hash} {commit_title_message}
  1. Suppose the same as 2 and invoke the git-brv with --reverse argument, the result is
{date} feature/2024-01-01 {upstream} {branch_short_hash} {commit_title_message}
{date} feature/2024-01-02 {upstream} {branch_short_hash} {commit_title_message}
{date} feature/2024-01-03 {upstream} {branch_short_hash} {commit_title_message}

PS: It is a curious command, but I am more curious about the command name, what is the full name of the git-brv? The brv is not easy to explain the thing done with it.

Reference

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.