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
git.remoteAdd().setUri(new URIish("https://github.com/eclipse-jgit/jgit.git")).setName("origin").call();
git.fetch().setRemote("origin").setProgressMonitor(new TextProgressMonitor()).call();
git.checkout().setName("master").setStartPoint("origin/master").setCreateBranch(true).call();
((FileRepository) git.getRepository()).convertRefStorage("reftable", true, false);
git.tag().setName("foo").call();
System.out.println(git.getRepository().findRef("foo"));
System.out.println("Now change the Tag via git bash (git tag --force foo v7.0.0.202408201547-m3)");
System.out.println("and press enter. You will see, the tag in jgit doesn't change");
Scanner scanner = new Scanner(System.in);
scanner.next();
System.out.println(git.getRepository().exactRef("refs/tags/foo"));
git.close();
`
outputs:
`Ref[refs/tags/foo=ef0923a81c00465034705a24a30b4c8d6878729f(3)]
Now change the Tag via git bash (git tag --force foo v7.0.0.202408201547-m3)
and press enter. You will see, the tag in jgit doesn't change
`$ git tag --force foo v7.0.0.202408201547-m3
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) y
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) y
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) n
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) n
Updated tag 'foo' (was ef0923a81)
ReftableDatabase.clearCache() and
FileReftableStack.reload()
in FileReftableDatabase
Relevant log output
No response
Other information
I hope, this helps to improve jgit :)
The text was updated successfully, but these errors were encountered:
zotttelbart
changed the title
ref-table in jgit doesn't respect changes outside of jgit
reftable in jgit doesn't respect changes outside of jgit
Oct 20, 2024
Version
7.0.0
Operating System
Windows
Bug description
Changes on reftable outside of jgit (example gitbash) are not visible for jgit
Actual behavior
` Git git = Git.init().setDirectory(new File("c:\temp\jgit")).call();
`
outputs:
`Ref[refs/tags/foo=ef0923a81c00465034705a24a30b4c8d6878729f(3)]
Now change the Tag via git bash (git tag --force foo v7.0.0.202408201547-m3)
and press enter. You will see, the tag in jgit doesn't change
Ref[refs/tags/foo=ef0923a81c00465034705a24a30b4c8d6878729f(3)]
`
For jgit, the ref didn't change
output from gitbash
`$ git tag --force foo v7.0.0.202408201547-m3
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) y
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) y
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) n
Unlink of file 'C:/temp/jgit/.git/reftable/000000000003-000000000003-1b2b152a.ref' failed. Should I try again? (y/n) n
Updated tag 'foo' (was ef0923a81)
$ git show-ref | grep foo
727666694e80ed39488451503d72f65bb4ef69f8 refs/tags/foo
`
you see #101 but the ref is changed
Expected behavior
Changes on tables.list should call
ReftableDatabase.clearCache() and
FileReftableStack.reload()
in FileReftableDatabase
Relevant log output
No response
Other information
I hope, this helps to improve jgit :)
The text was updated successfully, but these errors were encountered: