Skip to content

Commit fbdd7a1

Browse files
authored
Merge pull request #409 from erizocosmico/feature/rename-ref_commits-index
*: rename ref_commits index to history_index
2 parents 8b2a417 + 282c4a8 commit fbdd7a1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/using-gitbase/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NATURAL JOIN
2727
ref_commits
2828
WHERE
2929
ref_commits.ref_name = 'HEAD'
30-
AND ref_commits.index = 0;
30+
AND ref_commits.history_index = 0;
3131
```
3232

3333
## Commits that appear in more than one reference
@@ -86,7 +86,7 @@ NATURAL JOIN
8686
ref_commits
8787
WHERE
8888
ref_commits.ref_name = 'HEAD'
89-
AND ref_commits.index BETWEEN 0 AND 5
89+
AND ref_commits.history_index BETWEEN 0 AND 5
9090
AND is_binary(blob_content) = false
9191
AND files.file_path NOT REGEXP '^vendor.*'
9292
AND (

docs/using-gitbase/schema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ This table represents the relation between commits and [files](#files). Using th
173173
| repository_id | TEXT |
174174
| commit_hash | TEXT |
175175
| ref_name | TEXT |
176-
| index | INT64 |
176+
| history_index | INT64 |
177177
+---------------+-------+
178178
```
179179

180-
This table allow us to get the commit history from a specific reference name. `index` column represent the position of the commit from a specific reference.
180+
This table allow us to get the commit history from a specific reference name. `history_index` column represents the position of the commit from a specific reference.
181181

182182
This table it's like the [log](https://git-scm.com/docs/git-log) from a specific reference.
183183

ref_commits.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var RefCommitsSchema = sql.Schema{
2222
{Name: "repository_id", Type: sql.Text, Source: RefCommitsTableName},
2323
{Name: "commit_hash", Type: sql.Text, Source: RefCommitsTableName},
2424
{Name: "ref_name", Type: sql.Text, Source: RefCommitsTableName},
25-
{Name: "index", Type: sql.Int64, Source: RefCommitsTableName},
25+
{Name: "history_index", Type: sql.Int64, Source: RefCommitsTableName},
2626
}
2727

2828
var _ sql.PushdownProjectionAndFiltersTable = (*refCommitsTable)(nil)

0 commit comments

Comments
 (0)