Skip to content
Snippets Groups Projects
  1. Jul 02, 2010
    • Shawn Pearce's avatar
      Clean up LICENSE file · 629fd0d5
      Shawn Pearce authored
      
      We used our LICENSE file to describe both the license of the package,
      and also the header template that should appear at the start of
      all Java files we create.  This creates a confusing situation for
      readers who just want to consume the package, because our file
      header template starts off in the middle of a sentence.
      
      Move our template header to a separate file, and reformat the text
      of the license to be something more readable by a person reviewing
      the project's terms of use.
      
      Change-Id: If318e64c06683ea14e0240914c2d057c9199ce98
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      629fd0d5
  2. Jun 30, 2010
    • Dmitry Neverov's avatar
      Fix missing flush in StreamCopyThread · 44854741
      Dmitry Neverov authored
      
      It is possible that StreamCopyThread will not flush everything
      from it's src to it's dst.  In most cases StreamCopyThread works
      like this:
      
        in loop:
          n = src.read(buf);
          dst.write(buf, 0, n);
      
      and when we want to flush, we interrupt() StreamCopyThread and it
      flushes everything it wrote to dst.
      
      The problem is that our interrupt() could interrupt reading. In this
      case we will flush everything we wrote to dst, but not everything
      we wrote to src.
      
      Change-Id: Ifaf4d8be87535c7364dd59b217dfc631460018ff
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      44854741
    • Jeff Schumacher's avatar
      Added check for binary files while diffing · 9f2249bd
      Jeff Schumacher authored
      Added a check in Diff to ensure that files that are most likely
      not text are not line-by-line diffed. Files are determined to be
      binary by checking the first 8000 bytes for a null character. This
      is a similar heuristic to what C Git uses.
      
      Change-Id: I2b6f05674c88d89b3f549a5db483f850f7f46c26
      9f2249bd
  3. Jun 29, 2010
  4. Jun 28, 2010
    • Matthias Sohn's avatar
      Update build to use Tycho 0.9.0 · a2325f68
      Matthias Sohn authored
      
      Change-Id: I589267e6cfd0514383c2a3da51c9b7a659f77844
      Signed-off-by: default avatarMatthias Sohn <matthias.sohn@sap.com>
      a2325f68
    • Jeff Schumacher's avatar
      Added support for whitespace ignoring · 543235b8
      Jeff Schumacher authored
      JGit did not have support for skipping whitespace when comparing
      lines in RawText objects. I added a subclass of RawText that skips
      whitespace in its equals and hashCode methods. I used a subclass
      rather than adding functionality into RawText so that performance
      would not be impacted by extra logic.
      
      This class only supports ignoring all whitespace. Others will follow
      that allow other forms of whitespace ignoring.
      
      Change-Id: Ic2f79e85215e48d3fd53ec1b4ad13373dd183a4a
      543235b8
  5. Jun 23, 2010
    • Shawn Pearce's avatar
      UploadPack: Avoid unnecessary flush in smart HTTP · 5ed96eb7
      Shawn Pearce authored
      
      Under smart HTTP the biDirectionalPipe flag is false, and we return
      back immediately at this point in the negotiation process.  There is
      no need to flush the stream to the client, the request is over and
      it will be automatically flushed out by the higher level servlet
      that invoked us.  Avoiding flush here allows us to only use flush
      after a progress message is sent during pack generation.
      
      Change-Id: Id0c8b7e95e3be6ca4c1b479e096bed6b0283b828
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      5ed96eb7
    • Shawn Pearce's avatar
      Add MutableObjectId.copyFrom(AnyObjectId) · 066df3d1
      Shawn Pearce authored
      
      This simplifies the PackIndex code, which is trying to quickly copy
      an existing ObjectId into a MutableObjectId.  Rather than having
      the PackIndex violate the ObjectId's internals, expose a copy from
      function similar to the other ones for copying from raw byte arrays
      or hex formatted strings.
      
      Change-Id: I142635cbece54af2ab83c58477961ce925dc8255
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      066df3d1
    • Shawn Pearce's avatar
      Expose AnyObjectId compareTo(byte[]) and compareTo(int[]) · 677b9b17
      Shawn Pearce authored
      
      Storage systems can use these implementations to compare a passed
      AnyObjectId with a stored representation of an ObjectId in the
      canonical network byte order format.  This can be useful to do a
      binary search, or just linear scan, over an encoded storage file.
      
      Change-Id: I8c72993c4f4c6e98d599ac2c9867453752f25fd2
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      677b9b17
    • Shawn Pearce's avatar
      Expose RefWriter constructor taking RefList · 864cc3de
      Shawn Pearce authored
      
      An implementation might prefer to use the RefList type here, and
      RefList is part of our public API.  Expose the constructor so callers
      who have a RefList can take advantage of the existing sorting.
      
      Change-Id: I545867f85aa2c479d2d610024ebbe318144709c8
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      864cc3de
    • Shawn Pearce's avatar
      Expose RefUpdate constructor to any subclass · bfc43c13
      Shawn Pearce authored
      
      When we finally move RefDirectory to the new storage.file package,
      its associated RefDirectoryUpdate will need visiblity to this
      constructor in order to initialize itself.  This is true of any
      other repository implementation, so make it protected rather than
      package level visible.
      
      Change-Id: If838aec9baeb80ee2f12dcbca717657c725a9242
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      bfc43c13
    • Shawn Pearce's avatar
      Expose repository change event constructors · 8e406970
      Shawn Pearce authored
      
      Repository implementations outside of .lib need to be able to
      create these events and deliver them to listening application code.
      
      Expose and document the constructors so that they are visible when
      we move FileRepository into storage.file.FileRepository.
      
      Change-Id: I7fb6e8f4f5fdab683c5ebb5267673aa6d5b560bb
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      8e406970
    • Shawn Pearce's avatar
      isValidRefName: Inline the forbidden ref suffix of ".lock" · b3254d11
      Shawn Pearce authored
      
      A Git reference name must never end with ".lock", as it would
      confuse any existing C client that tries to obtain a clone of the
      repository over the network.  Even if the repository isn't on a
      local filesystem, it still should ban that suffix.
      
      Because I plan to move LockFile to storage.file and make it a private
      implementation detail of the local file system storage model,
      we can't rely on its package level SUFFIX field here.  Making it
      public probably won't work long-term either, as I also plan to
      pull storage.file into its own separate project that depends on
      the core library.
      
      So, just inline the constant here.  Its as foribidden as ":" is.
      
      Change-Id: If85076861baeacc183b82696375a13e935ba8836
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      b3254d11
    • Shawn Pearce's avatar
      Remove pack stream from PackWriterTest · 252cd74e
      Shawn Pearce authored
      
      This stream was used only to determine how many bytes had been
      written thus far.  Except we're always dumping it into a simple
      ByteArrayOutputStream, which also knows that.  Drop the dependency
      on the pack stream and use ByteArrayOutputStream directly.
      
      This lets us later move this test into the new storage.file
      package without dragging along the pack stream that is an internal
      implementation detail of PackWriter, which is more general than
      just the file storage layer.
      
      Change-Id: I291689c0b1ed799270c213ee73b710b2637fb238
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      252cd74e
    • Shawn Pearce's avatar
      Remove pointless setOldObjectId in test · a5aec660
      Shawn Pearce authored
      
      Setting this value is pointless, because its automatically set
      by the refs.newUpdate call that created the update operation.
      The API is protected by default, because application level code,
      including this test, should not be calling it.
      
      Change-Id: I8867a4e8007892e2bd44a05d7dec619081081943
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      a5aec660
    • Shawn Pearce's avatar
      Remove speed tests based on mapCommit · 66e5895e
      Shawn Pearce authored
      
      The mapCommit API is being deprecated because it doesn't run very
      fast.  Leaving tests around to test how fast it is relative to C Git
      isn't instructive.  Remove them, which should help aid the transition
      away from the mapCommit API.
      
      Change-Id: I27e1c844610d7da5b2c44b33a00602706973c9cc
      Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
      66e5895e
  6. Jun 18, 2010
  7. Jun 17, 2010
  8. Jun 16, 2010
  9. Jun 15, 2010
  10. Jun 14, 2010
  11. Jun 13, 2010
Loading