]> source.dussan.org Git - jgit.git/commit
Support symbolic references in ReceiveCommand 17/103017/13
authorShawn Pearce <spearce@spearce.org>
Sat, 12 Aug 2017 15:25:16 +0000 (08:25 -0700)
committerTerry Parker <tparker@google.com>
Wed, 18 Oct 2017 20:42:20 +0000 (13:42 -0700)
commit7f59cfe14354a19a38ccc5920c2ce5e49de9ae0d
tree9cacaf62f82cc4fab8ea625235182ecac3e890e1
parent0c5ea86af336da3cc5967467f3917ce9e7244102
Support symbolic references in ReceiveCommand

Allow creating symbolic references with link, and deleting them or
switching to ObjectId with unlink.  How this happens is up to the
individual RefDatabase.

The default implementation detaches RefUpdate if a symbolic reference
is involved, supporting these command instances on RefDirectory.
Unfortunately the packed-refs file does not support storing symrefs,
so atomic transactions involving more than one symref command are
failed early.

Updating InMemoryRepository is deferred until reftable lands, as I
plan to switch InMemoryRepository to use reftable for its internal
storage representation.

Change-Id: Ibcae068b17a2fc6d958f767f402a570ad88d9151
Signed-off-by: Minh Thai <mthai@google.com>
Signed-off-by: Terry Parker <tparker@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftree/Command.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java