| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
XDG_STATE_DIR is for temp datas, and SIB_DIR contains some important
datas along with configs.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
By arraying the hash first, parsing became slightly easier (<hash> is
the normalized value, <key> can be anything), and using \t as a
separator allowed whitespace to be entered into <key> (although it is
currently rejected).
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Now sib-ask determines unborn status based on whether an actual ref
exists rather than the branch name. If a user accidentally commits
without using sib-ask during the init state, it does not go into the
detach state. In such case, having a friendly name causes less
confusion.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
commit df27dbe ("sib: dont fix git author date when creating chain")
removed AUTHOR_DATE for reflog, deterministic chain is still necessary
for traces. (I created a prompt with the same content, but new chains
kept appearing, making it difficult for the user to understand the
conversation structure.) Therefore, fixed the DATE only in
`chain_trace` and allowed the date to be used as is for the remaining
reflog-related commands.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
By checking refs/conv first for the arguments received from rev-parse,
it enables the direct use of the name used in sib save.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the default state inferred by save/switch is detached HEAD,
and attach is a special state. However, if there is nothing in HEAD,
Git throws a "fatal: not a git dir" error. This resulted in setting
HEAD as refs/conv/scratch when init. Consequently, running `sib ask
-n' attaches to refs/conv/scratch, while running `sib switch` detaches
it, causing a problem of inconsistency.
This commit resolved this by introducing a special ref called
refs/sib/unborn to represent the ---new and init states, and by
checking this in ask to ensure it becomes detached.
The reason for changing the name of unborned state, aside from the
processing in ask, is that conv/ has become the place where all saves
go, so there should be no special indicator there.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The mere existence of the heads/ and tags/ directories didn't seem to
be a significant issue (they are empty directories anyway and can be
created if the user wants them), so remaining that.
If they are deleted during reinit, user data could be erased. While it
is possible to check for the existence of files within the directories
and delete them, I don't think it is necessary to go to such lengths.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Similar to Git, scripts including the dispatcher sib are grouped into
libexec/sib-core, and symlinks are created in bin/sib. Additionally,
libexec/sib-core is added to the PATH when executing any script inside
sib. I don't really see any downside to adding to the PATH and loading
the script. It's clear.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
core.logAllRefUpdates creates new log files only for refs in
refs/heads or refs/remotes. It is meaningless so exclude
it during init and use the --create-reflog to make all
update-refs generate reflogs.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace git's default refs/heads/master HEAD with refs/conv/scratch,
matching sib's namespace convention. Remove refs/heads and refs/tags
directories since sib doesn't use them — keeps the repo layout minimal
and signals intent that branches/tags aren't part of the model.
Use `echo' instead of the `symbolic-ref' command because using it
pollutes the reflog, and I separated them because using the `--branch'
command during init forces the refs/heads prefix.
Need to use it more to know for sure, but it seems like strict
Git-style branch/tag separation isn't really necessary.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
| |
The reason there is no distinction like heads or tags is that, unlike
Git, there is no need to differentiate between the two. When user set
a checkpoint, it can be promoted to a conversation session.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Basically, it is good to have the timestamp recorded somewhere. If you
record it in the trace, the reproducibility—which was the purpose of
fixing it—is lost anyway, also setting it with 0000 makes reflog
invisable with ./sib git reflog.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
This generates a chain from jsonl. Likely to be used to import prompts
or other conversations into the sib repository mainly.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
If it is bare, this is probably false, in which case new reflogs are
not created for items that are not in logs/.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
| |
Just a git wrapper
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
It seems like there are quite a few bugs in edge cases.
But for now, it works.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
| |
Very thin wrapper between git ref commands.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
The reason is that after removing _SIBTRACE with grep -v, there is
nothing to output, and in this case, grep is set to return 1.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Since mktrace creates the actual trace, it makes sense for
mktrace_json to do the same. I separated the existing function for
converting JSON to tf into a separate tf_helper rather than exposing
it externally, as I figured users wouldn't need to use it much anyway.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
Passing everything to jq at once is faster than calling jq on each
line, but the code became difficult to read, so just did it this way.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
| |
Chain plm-wrap output directly in future.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
|
|
Lore is too widely known a name to be used as a command line name. sib
is named after the Sibylline Books, oracular texts consulted by the
Roman Senate in times of crisis.
Signed-off-by: Hee-Suk Kim <[email protected]>
|