citelang contrib result depends on local REFs due to git log --all
Closed this issue · 1 comments
Describe the bug
Because citelang contrib
uses git log
with --all
to find the range of commits to analyze, it may include unrelated commits from any local git REF that has some form of shared history. E.g. if you have a 2nd remote that is a fork of your project, an upstream, or similar, and you have previously checked out a branch from it locally, then git log --all
will show commits from it, and it's not possible to filter these out later.
This is because of the meaning of --all
which is:
--all
Pretend as if all the refs in refs/, along with HEAD, are listed on
the command line as <commit>.
To Reproduce
- Clone github.com/sylabs/singularity
- Add a remote for github.com/apptainer/apptainer & checkout a branch from it
- Run a citelang analysis between singularity tags and observe that some apptainer commits appear, that have not
ever been picked or merged into the singularity branches.
Sorry I don't have a specific example right now... working from some rough notes of an analysis I did on my other computer which isn't with me.
Expected behavior
citelang
should not use --all
with git log
and then filter the resulting commit list.
Instead it should ask git log for the specific commit range between --start
and --end
directly e.g. git log v3.9.1..v3.9.2
.
Version that produced the bug
0.0.28