You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User can use build-in comand git_current_branch to get current branch name.
AC
Not in a git repo Given: User currently in a directory that not manage by git When: User type git_current_branch and hit <Enter> Then: No output, not error.
In repo root directory and master branch Given: User currently in a directory that manage by git (For example, in our xcShell repo root directory /xxxx/xcShell ), and currently in master branch When: User type git_current_branch and hit <Enter> Then: Print master, no extra \n.
In repo root directory and not in master branch Given: User currently in a directory that directly manage by git (For example, in our xcShell repo root directory /xxxx/xcShell ), and currently inxcShell/issues/54 branch When: User type git_current_branch and hit <Enter> Then: Print xcShell/issues/54, no extra \n.
In repo sub directory Given: User currently in a directory that not manage by git, but it's ancestor's dir is manage by git (For example, in our xcShell repo directory /xxxx/xcShell/cmake-build-debug ), and currently inmaster branch When: User type git_current_branch and hit <Enter> Then: Print master, no extra \n.
In repo.git directory Given: User currently in .git directory (For example, in our xcShell repo directory /xxxx/xcShell/.git ), and currently inmaster branch When: User type git_current_branch and hit <Enter> Then: Print {current_branch}, no extra \n.
User do not install git Given: User currently in a directory that manage by git (For example, in our xcShell repo root directory /xxxx/xcShell ), and do not install git When: User type git_current_branch and hit <Enter> Then: No output, not error.
The text was updated successfully, but these errors were encountered:
Epic
Process
Description
User can use build-in comand
git_current_branch
to get current branch name.AC
Not in a git repo
Given: User currently in a directory that not manage by git
When: User type
git_current_branch
and hit<Enter>
Then: No output, not error.
In repo root directory and
master
branchGiven: User currently in a directory that manage by git (For example, in our xcShell repo root directory
/xxxx/xcShell
), and currently inmaster
branchWhen: User type
git_current_branch
and hit<Enter>
Then: Print
master
, no extra\n
.In repo root directory and not in
master
branchGiven: User currently in a directory that directly manage by git (For example, in our xcShell repo root directory
/xxxx/xcShell
), and currently inxcShell/issues/54
branchWhen: User type
git_current_branch
and hit<Enter>
Then: Print
xcShell/issues/54
, no extra\n
.In repo sub directory
Given: User currently in a directory that not manage by git, but it's ancestor's dir is manage by git (For example, in our xcShell repo directory
/xxxx/xcShell/cmake-build-debug
), and currently inmaster
branchWhen: User type
git_current_branch
and hit<Enter>
Then: Print
master
, no extra\n
.In repo
.git
directoryGiven: User currently in
.git
directory (For example, in our xcShell repo directory/xxxx/xcShell/.git
), and currently inmaster
branchWhen: User type
git_current_branch
and hit<Enter>
Then: Print
{current_branch}
, no extra\n
.User do not install git
Given: User currently in a directory that manage by git (For example, in our xcShell repo root directory
/xxxx/xcShell
), and do not install gitWhen: User type
git_current_branch
and hit<Enter>
Then: No output, not error.
The text was updated successfully, but these errors were encountered: