Skip to content

Commit 3f0c3d0

Browse files
authored
feat: add describe feature (#167)
1 parent 9aa9566 commit 3f0c3d0

File tree

11 files changed

+684
-0
lines changed

11 files changed

+684
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# format
2+
3+
이 describe 결과를 출력하고, 결과를 문자열로 반환해요.
4+
5+
## 시그니처
6+
7+
```ts
8+
class Describe {
9+
format(options?: DescribeFormatOptions | null | undefined): string;
10+
}
11+
```
12+
13+
### 파라미터
14+
15+
<ul class="param-ul">
16+
<li class="param-li param-li-root">
17+
<span class="param-name">options</span><span class="param-type">null | DescribeFormatOptions</span>
18+
<br>
19+
<p class="param-description">describe를 포맷하기 위한 옵션이에요.</p>
20+
<ul class="param-ul">
21+
<li class="param-li">
22+
<span class="param-name">abbreviatedSize</span><span class="param-type">number</span>
23+
<br>
24+
<p class="param-description">사용할 축약된 커밋 ID의 길이를 설정해요. 이 값은 축약 문자열 길이의 하한이고, 기본값은 7이에요.</p>
25+
</li>
26+
<li class="param-li">
27+
<span class="param-name">alwaysUseLongFormat</span><span class="param-type">boolean</span>
28+
<br>
29+
<p class="param-description">더 짧은 이름을 사용할 수 있는 경우에도 항상 긴 형식을 사용할지 여부를 설정해요.</p>
30+
</li>
31+
<li class="param-li">
32+
<span class="param-name">dirtySuffix</span><span class="param-type">string</span>
33+
<br>
34+
<p class="param-description">작업 디렉터리가 dirty 상태이고 이 값이 설정된 경우, 이 문자열을 description 문자열 끝에 덧붙여요.</p>
35+
</li>
36+
</ul>
37+
</li>
38+
</ul>
39+
40+
### 반환 값
41+
42+
<ul class="param-ul">
43+
<li class="param-li param-li-root">
44+
<span class="param-type">string</span>
45+
<br>
46+
<p class="param-description">이 describe에 대한 포맷된 문자열이에요.</p>
47+
</li>
48+
</ul>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# describe
2+
3+
커밋을 설명해요
4+
5+
이 commitish Git 개체에 대해 describe 연산을 수행해요.
6+
7+
## 시그니처
8+
9+
```ts
10+
class Object {
11+
describe(options?: DescribeOptions | null | undefined): Describe;
12+
}
13+
```
14+
15+
### 파라미터
16+
17+
<ul class="param-ul">
18+
<li class="param-li param-li-root">
19+
<span class="param-name">options</span><span class="param-type">null | DescribeOptions</span>
20+
<br>
21+
<p class="param-description">describe 연산에 대한 옵션이에요.</p>
22+
<ul class="param-ul">
23+
<li class="param-li">
24+
<span class="param-name">describeAll</span><span class="param-type">boolean</span>
25+
<br>
26+
<p class="param-description">참조 조회 전략을 설정해요. git-describe의 <code>--all</code> 옵션처럼 동작해요.</p>
27+
</li>
28+
<li class="param-li">
29+
<span class="param-name">describeTags</span><span class="param-type">boolean</span>
30+
<br>
31+
<p class="param-description">참조 조회 전략을 설정해요. git-describe의 <code>--tags</code> 옵션처럼 동작해요.</p>
32+
</li>
33+
<li class="param-li">
34+
<span class="param-name">maxCandidatesTags</span><span class="param-type">number</span>
35+
<br>
36+
<p class="param-description">태그 후보의 최대 개수예요.</p>
37+
</li>
38+
<li class="param-li">
39+
<span class="param-name">onlyFollowFirstParent</span><span class="param-type">boolean</span>
40+
<br>
41+
<p class="param-description">일치하는 태그나 참조로부터 거리를 계산할 때, 첫 번째 부모 계보만 따라갈지 여부를 나타내는 값이에요.</p>
42+
</li>
43+
<li class="param-li">
44+
<span class="param-name">pattern</span><span class="param-type">string</span>
45+
<br>
46+
<p class="param-description">태그나 참조를 필터링할 때 사용할 패턴 문자열이에요.</p>
47+
</li>
48+
<li class="param-li">
49+
<span class="param-name">showCommitOidAsFallback</span><span class="param-type">boolean</span>
50+
<br>
51+
<p class="param-description">일치하는 태그나 참조를 찾지 못해 describe 연산이 보통 실패하는 경우에 대한 동작을 결정해요. 이 옵션이 설정되면 실패하는 대신 커밋의 전체 id를 보여줘요.</p>
52+
</li>
53+
</ul>
54+
</li>
55+
</ul>
56+
57+
### 반환 값
58+
59+
<ul class="param-ul">
60+
<li class="param-li param-li-root">
61+
<span class="param-type">Describe</span>
62+
<br>
63+
<p class="param-description">describe 인스턴스예요.</p>
64+
</li>
65+
</ul>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# describe
2+
3+
커밋을 설명해요
4+
5+
현재 커밋과 작업 트리에 대해 describe 연산을 수행해요.
6+
`HEAD`에 대해 describe를 수행한 다음 status를 실행하고, 변경 사항이 있으면 설명이 더럽다고 간주해요.
7+
8+
## 시그니처
9+
10+
```ts
11+
class Repository {
12+
describe(options?: DescribeOptions | null | undefined): Describe;
13+
}
14+
```
15+
16+
### 파라미터
17+
18+
<ul class="param-ul">
19+
<li class="param-li param-li-root">
20+
<span class="param-name">options</span><span class="param-type">null | DescribeOptions</span>
21+
<br>
22+
<p class="param-description">describe 연산에 대한 옵션이에요.</p>
23+
<ul class="param-ul">
24+
<li class="param-li">
25+
<span class="param-name">describeAll</span><span class="param-type">boolean</span>
26+
<br>
27+
<p class="param-description">참조 조회 전략을 설정해요. git-describe의 <code>--all</code> 옵션처럼 동작해요.</p>
28+
</li>
29+
<li class="param-li">
30+
<span class="param-name">describeTags</span><span class="param-type">boolean</span>
31+
<br>
32+
<p class="param-description">참조 조회 전략을 설정해요. git-describe의 <code>--tags</code> 옵션처럼 동작해요.</p>
33+
</li>
34+
<li class="param-li">
35+
<span class="param-name">maxCandidatesTags</span><span class="param-type">number</span>
36+
<br>
37+
</li>
38+
<li class="param-li">
39+
<span class="param-name">onlyFollowFirstParent</span><span class="param-type">boolean</span>
40+
<br>
41+
<p class="param-description">일치하는 태그나 참조로부터의 거리를 계산할 때, 첫 번째 부모 조상 경로만 따라갈지 여부를 나타내요.</p>
42+
</li>
43+
<li class="param-li">
44+
<span class="param-name">pattern</span><span class="param-type">string</span>
45+
<br>
46+
</li>
47+
<li class="param-li">
48+
<span class="param-name">showCommitOidAsFallback</span><span class="param-type">boolean</span>
49+
<br>
50+
<p class="param-description">일치하는 태그나 참조를 찾지 못해 describe 연산이 일반적으로 실패할 경우에 대한 동작을 제어해요. 이 옵션이 설정되면, 대신 커밋의 전체 ID를 보여주도록 해요.</p>
51+
</li>
52+
</ul>
53+
</li>
54+
</ul>
55+
56+
### 반환 값
57+
58+
<ul class="param-ul">
59+
<li class="param-li param-li-root">
60+
<span class="param-type">Describe</span>
61+
<br>
62+
<p class="param-description">describe 인스턴스에요.</p>
63+
</li>
64+
</ul>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# format
2+
3+
Prints this describe result, returning the result as a string.
4+
5+
## Signature
6+
7+
```ts
8+
class Describe {
9+
format(options?: DescribeFormatOptions | null | undefined): string;
10+
}
11+
```
12+
13+
### Parameters
14+
15+
<ul class="param-ul">
16+
<li class="param-li param-li-root">
17+
<span class="param-name">options</span><span class="param-type">null | DescribeFormatOptions</span>
18+
<br>
19+
<p class="param-description">Options for formatting describe.</p>
20+
<ul class="param-ul">
21+
<li class="param-li">
22+
<span class="param-name">abbreviatedSize</span><span class="param-type">number</span>
23+
<br>
24+
<p class="param-description">Sets the size of the abbreviated commit id to use. The value is the lower bound for the length of the abbreviated string, and the default is 7.</p>
25+
</li>
26+
<li class="param-li">
27+
<span class="param-name">alwaysUseLongFormat</span><span class="param-type">boolean</span>
28+
<br>
29+
<p class="param-description">Sets whether or not the long format is used even when a shorter name could be used.</p>
30+
</li>
31+
<li class="param-li">
32+
<span class="param-name">dirtySuffix</span><span class="param-type">string</span>
33+
<br>
34+
<p class="param-description">If the workdir is dirty and this is set, this string will be appended to the description string.</p>
35+
</li>
36+
</ul>
37+
</li>
38+
</ul>
39+
40+
### Returns
41+
42+
<ul class="param-ul">
43+
<li class="param-li param-li-root">
44+
<span class="param-type">string</span>
45+
<br>
46+
<p class="param-description">Formatted string for this describe.</p>
47+
</li>
48+
</ul>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# describe
2+
3+
Describes a commit
4+
5+
Performs a describe operation on this commitish object.
6+
7+
## Signature
8+
9+
```ts
10+
class Object {
11+
describe(options?: DescribeOptions | null | undefined): Describe;
12+
}
13+
```
14+
15+
### Parameters
16+
17+
<ul class="param-ul">
18+
<li class="param-li param-li-root">
19+
<span class="param-name">options</span><span class="param-type">null | DescribeOptions</span>
20+
<br>
21+
<p class="param-description">Options for describe operation.</p>
22+
<ul class="param-ul">
23+
<li class="param-li">
24+
<span class="param-name">describeAll</span><span class="param-type">boolean</span>
25+
<br>
26+
<p class="param-description">Sets the reference lookup strategy This behaves like the <code>--all</code> option to git-describe.</p>
27+
</li>
28+
<li class="param-li">
29+
<span class="param-name">describeTags</span><span class="param-type">boolean</span>
30+
<br>
31+
<p class="param-description">Sets the reference lookup strategy This behaves like the <code>--tags</code> option to git-describe.</p>
32+
</li>
33+
<li class="param-li">
34+
<span class="param-name">maxCandidatesTags</span><span class="param-type">number</span>
35+
<br>
36+
</li>
37+
<li class="param-li">
38+
<span class="param-name">onlyFollowFirstParent</span><span class="param-type">boolean</span>
39+
<br>
40+
<p class="param-description">Indicates when calculating the distance from the matching tag or reference whether to only walk down the first-parent ancestry.</p>
41+
</li>
42+
<li class="param-li">
43+
<span class="param-name">pattern</span><span class="param-type">string</span>
44+
<br>
45+
</li>
46+
<li class="param-li">
47+
<span class="param-name">showCommitOidAsFallback</span><span class="param-type">boolean</span>
48+
<br>
49+
<p class="param-description">If no matching tag or reference is found whether a describe option would normally fail. This option indicates, however, that it will instead fall back to showing the full id of the commit.</p>
50+
</li>
51+
</ul>
52+
</li>
53+
</ul>
54+
55+
### Returns
56+
57+
<ul class="param-ul">
58+
<li class="param-li param-li-root">
59+
<span class="param-type">Describe</span>
60+
<br>
61+
<p class="param-description">Instance of describe.</p>
62+
</li>
63+
</ul>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# describe
2+
3+
Describes a commit
4+
5+
Performs a describe operation on the current commit and the worktree.
6+
After performing a describe on `HEAD`, a status is run and description is
7+
considered to be dirty if there are.
8+
9+
## Signature
10+
11+
```ts
12+
class Repository {
13+
describe(options?: DescribeOptions | null | undefined): Describe;
14+
}
15+
```
16+
17+
### Parameters
18+
19+
<ul class="param-ul">
20+
<li class="param-li param-li-root">
21+
<span class="param-name">options</span><span class="param-type">null | DescribeOptions</span>
22+
<br>
23+
<p class="param-description">Options for describe operation.</p>
24+
<ul class="param-ul">
25+
<li class="param-li">
26+
<span class="param-name">describeAll</span><span class="param-type">boolean</span>
27+
<br>
28+
<p class="param-description">Sets the reference lookup strategy This behaves like the <code>--all</code> option to git-describe.</p>
29+
</li>
30+
<li class="param-li">
31+
<span class="param-name">describeTags</span><span class="param-type">boolean</span>
32+
<br>
33+
<p class="param-description">Sets the reference lookup strategy This behaves like the <code>--tags</code> option to git-describe.</p>
34+
</li>
35+
<li class="param-li">
36+
<span class="param-name">maxCandidatesTags</span><span class="param-type">number</span>
37+
<br>
38+
</li>
39+
<li class="param-li">
40+
<span class="param-name">onlyFollowFirstParent</span><span class="param-type">boolean</span>
41+
<br>
42+
<p class="param-description">Indicates when calculating the distance from the matching tag or reference whether to only walk down the first-parent ancestry.</p>
43+
</li>
44+
<li class="param-li">
45+
<span class="param-name">pattern</span><span class="param-type">string</span>
46+
<br>
47+
</li>
48+
<li class="param-li">
49+
<span class="param-name">showCommitOidAsFallback</span><span class="param-type">boolean</span>
50+
<br>
51+
<p class="param-description">If no matching tag or reference is found whether a describe option would normally fail. This option indicates, however, that it will instead fall back to showing the full id of the commit.</p>
52+
</li>
53+
</ul>
54+
</li>
55+
</ul>
56+
57+
### Returns
58+
59+
<ul class="param-ul">
60+
<li class="param-li param-li-root">
61+
<span class="param-type">Describe</span>
62+
<br>
63+
<p class="param-description">Instance of describe.</p>
64+
</li>
65+
</ul>

0 commit comments

Comments
 (0)