]> source.dussan.org Git - jgit.git/log
jgit.git
5 years agoFetchV2Request.getWantedRefs: Bump @since to 5.4 12/138312/2
Ivan Frade [Fri, 8 Mar 2019 01:33:35 +0000 (17:33 -0800)]
FetchV2Request.getWantedRefs: Bump @since to 5.4

The visibility change was merged after 5.3 release. The @since line
is wrong.

Fixing it in a new commit looks like the easiest way forward.

Change-Id: I6f72a9e684e99a4440cda1eb532c22b4b7bbdea5
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge "FetchV2Request: make getWantedRefs public"
Jonathan Nieder [Thu, 7 Mar 2019 22:28:05 +0000 (17:28 -0500)]
Merge "FetchV2Request: make getWantedRefs public"

5 years agoMerge "Prepare 5.4.0-SNAPSHOT builds"
Matthias Sohn [Thu, 7 Mar 2019 16:16:46 +0000 (11:16 -0500)]
Merge "Prepare 5.4.0-SNAPSHOT builds"

5 years agoMerge "Merge branch 'stable-5.3'"
Matthias Sohn [Thu, 7 Mar 2019 16:16:27 +0000 (11:16 -0500)]
Merge "Merge branch 'stable-5.3'"

5 years agoPrepare 5.4.0-SNAPSHOT builds 34/138234/1
Matthias Sohn [Wed, 6 Mar 2019 23:34:14 +0000 (00:34 +0100)]
Prepare 5.4.0-SNAPSHOT builds

Change-Id: I90a4791f63d0eba23da744c720e869f1830b86e7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDo not retain commit body in RevWalk for reachability checks 31/138231/1
Minh Thai [Wed, 6 Mar 2019 23:25:10 +0000 (15:25 -0800)]
Do not retain commit body in RevWalk for reachability checks

Commit body contains the message that is not needed for reachability checks, and
takes up memory unnecessarily.

Change-Id: I0c7f6da249bf9c4fda9dc9e62e809322c68effce
Signed-off-by: Minh Thai <mthai@google.com>
5 years agoMerge branch 'stable-5.3' 33/138233/1
Matthias Sohn [Wed, 6 Mar 2019 23:25:22 +0000 (00:25 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Prepare 5.3.0-SNAPSHOT builds
  JGit v5.3.0.201903061415-rc1
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I8c7dfd5141be0d27547d65f19054f9a1665b55fb

5 years agoPrepare 5.3.0-SNAPSHOT builds 26/138226/1
Matthias Sohn [Wed, 6 Mar 2019 21:26:03 +0000 (22:26 +0100)]
Prepare 5.3.0-SNAPSHOT builds

Change-Id: I9b934bcfad3d2091f4da163170348b0c8ef5e732
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.3.0.201903061415-rc1 12/138212/1 v5.3.0.201903061415-rc1
Matthias Sohn [Wed, 6 Mar 2019 19:03:00 +0000 (20:03 +0100)]
JGit v5.3.0.201903061415-rc1

Change-Id: I85866af97fe1c0c0a0da83a7605484082fa56b52
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoTrack object inflation time in DfsReaderIoStats 06/138206/2
Terry Parker [Wed, 6 Mar 2019 18:01:16 +0000 (10:01 -0800)]
Track object inflation time in DfsReaderIoStats

This can help track down poor long tail performance that isn't accounted
for in the readIdxMicros or readBlockMicros metrics.

Change-Id: I701b9cfcc124f4ddb860d1766a11ea3557e604ce
Signed-off-by: Terry Parker <tparker@google.com>
5 years agoMerge branch 'master' into stable-5.3 59/138159/1
Matthias Sohn [Wed, 6 Mar 2019 10:57:39 +0000 (11:57 +0100)]
Merge branch 'master' into stable-5.3

* master:
  Update Orbit to R20190226160451
  Upgrade maven-javadoc-plugin to 3.1.0
  diff: add option metaVar for --src-prefix and --dst-prefix
  ResolveMerger: Destroy TemporaryBuffer on unchecked exceptions
  Expose the filter blob limit in UploadPack
  Upgrade error_prone_core to 2.3.3
  On Windows use %APPDATA%\gnupg as GPG directory if it exists
  Remove duplicate externalized message
  RebaseCommand: tighten check for --preserve-merges on --continue
  RebaseCommand: fix ONTO_NAME, and --preserve-merges is interactive
  RebaseCommand: use orig-head to abort
  Fix core.autocrlf for non-normalized index
  RebaseCommand: use orig-head in addition to head
  SHA1: Use externalized message in log
  JGitText: Remove unnecessary suffix from externalized message identifier
  FS_POSIX: Externalize log message
  Strongly reference indices in DfsPackFile
  Update Orbit to S20190219190953
  Update README
  Update README
  Add missing @since tag for new API method getUpdateIndex
  Fix NPE in PlotCommitList
  CommitBuilder: Deprecate setEncoding(String)
  CommitBuilder: Add missing periods on methods' Javadoc
  Upgrade wagon-ssh to 3.3.2
  Fix bug in copyPackBypassCache's skip 'PACK' header logic
  Upgrade spotbugs to 3.1.11
  Atomic file creation: hard-linking may not be allowed
  Update Orbit to S20190129210011
  Fix GC.deleteEmptyRefsFolders
  Enable cloning only specific tags
  Delete jgit-4.5 target platform
  Add 4.11-staging target platform and update Orbit to I20190123233226
  Upgrade jacoco-maven-plugin to 0.8.3
  Bazel: Format BUILD file with buildifier
  RenameBranchCommand: more consistent handling of short ref names
  SshdSessionFactory: generalize providing default keys
  Allow to check for signing key
  Handle premature EOF in BundleFetchConnection
  pgm: Fix missing braces in Version.run()
  pgm: Handle IOException in Version command
  pgm: Fix missing braces in UploadPack.run()
  pgm: Handle IOException in UploadPack command
  pgm: Handle exceptions in Tag command
  pgm: Fix missing braces in Status.run()
  pgm: Handle exceptions in Status command
  pgm: Fix missing braces in ShowRef.run()
  pgm: Handle IOException in ShowRef command
  pgm: Fix missing braces in Show.run()
  pgm: Handle exceptions in Show command
  pgm: Fix missing braces in Rm command
  pgm: Handle GitAPIException in Rm command
  pgm: Handle exceptions in RevParse command
  pgm: Externalize error message
  pgm: Fix missing braces in Reset.run()
  pgm: Handle GitAPIException in Reset command
  pgm: Handle GitAPIException in Repo command
  pgm: Handle exceptions in Remote command
  pgm: Handle exceptions in Reflog command
  pgm: Handle IOException in ReceivePack command
  SmartClientSmartServerTest: Open Repository in try-with-resource
  SmartClientSmartServerTest: Open ObjectInserter.Formatter in try-with-resource
  SmartClientSmartServerTest#addBrokenContext: Remove unused TestRepository
  IO: Open TemporaryBuffer.Heap in try-with-resource
  GitSmartHttpTools: Open SideBandOutputStream in try-with-resource
  TemporaryBufferTest: Open TemporaryBuffer in try-with-resource
  Scanner: Open RevWalk in try-with-resource
  SubmoduleWalkTest: Open Repository in try-with-resource
  SideBandOutputStreamTest: Open SideBandOutputStream in try-with-resource
  UnionInputStreamTest: Open UnionInputStream in try-with-resource
  Merge: Avoid non-localised literal string warning for "recursive"
  pgm: Fix missing braces in Push.run()
  pgm: Handle exceptions in Push command
  pgm: Fix missing braces in MergeBase.run()
  pgm: Handle IOException in MergeBase command
  pgm: Fix missing braces in Merge command
  pgm: Handle exceptions in Merge command
  pgm: Fix missing braces in LsTree.run()
  pgm: Handle exceptions in LsTree command
  pgm: Fix missing braces in LsRemote.run()
  pgm: Handle exceptions in LsRemote command
  pgm: Handle exceptions in LsFiles command
  pgm: Fix missing braces in Log.run()
  pgm: Handle exceptions in Log command
  pgm: Handle exceptions in Init command
  pgm: Handle IOException in IndexPack command
  pgm: Fix missing braces in Fetch.run()
  pgm: Handle IOException in Fetch command
  pgm: Handle GitAPIException in Gc command
  pgm: Fix missing braces in DiffTree.run()
  pgm: Handle exceptions in DiffTree command
  pgm: Fix missing braces in Diff.run()
  pgm: Handle exceptions in Diff command
  RawParseUtils: Avoid import of java.nio.charset.StandardCharsets
  Consistently import constants from StandardCharsets as static
  LocalDiskRepositoryTestCase#createRepository: Default auto-close to false
  UploadPack: Suppress false-positive resource leak warning
  PushConnectionTest: Open TestRepository in try-with-resource
  MergerTest: Open TestRepository in try-with-resource
  MergeCommandTest: Open TestRepository in try-with-resource
  PackWriterTest: Open TestRepository in try-with-resource
  ReceivePackAdvertiseRefsHookTest: Open TestRepository in try-with-resource
  SubmoduleStatusTest: Open TestRepository in try-with-resource
  UploadPackTest: Open TestRepository in try-with-resource
  PackParserTest: Open TestRepository in try-with-resource
  SmartClientSmartServerTest: Open TestRepository in try-with-resource
  Stop using deprecated methods of RemoteSetUrlCommand/RemoteRemoveCommand
  SmartClientSmartServerTest: Stop using deprecated Repository#hasObject
  DumbClientSmartServerTest: Open TestRepository in try-with-resource
  DumbClientDumbServerTest: Open TestRepository in try-with-resource
  DirCacheCheckoutTest: Open TestRepository in try-with-resource
  HttpTestCase#fsck: Open TestRepository in try-with-resource
  CheckoutCommandTest: Add comment to document intentionally empty catch block
  pgm: Fix missing braces in Describe.run()
  pgm: Handle exceptions in Describe command
  pgm: Handle exceptions in Config command
  pgm: Fix too wide lines in Commit.run()
  pgm: Fix missing braces in Commit.run()
  pgm: Handle exceptions in Commit command
  pgm: Handle exceptions in Clean command
  pgm: Handle GitAPIException in Fetch command
  Fix missing braces in Branch.run()
  pgm: Handle exceptions in Branch command
  Fix missing braces in Blame.run()
  pgm: Handle NoWorkTreeException and IOException in Blame command
  Use try-with-resource for reader in Blame.run()
  pgm: Handle GitAPIException in Add command

Change-Id: I6d546885beb9596120e201973995a7c6bfe115e0

5 years agoMerge branch 'stable-5.2' into stable-5.3 44/138144/1
Matthias Sohn [Wed, 6 Mar 2019 08:44:37 +0000 (09:44 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I81cf1cdc9d8dcd54536a79e522274fd244fa1d00

5 years agoMerge branch 'stable-5.1' into stable-5.2 38/138138/1
David Pursehouse [Wed, 6 Mar 2019 06:55:47 +0000 (15:55 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: Id9f957ca8386f6035f4ab34d242cb6fb8c38e012
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 33/138133/1
David Pursehouse [Wed, 6 Mar 2019 05:16:07 +0000 (14:16 +0900)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I056f41f619a1bb22ca6be75ec21c32c1f6d4fd2f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 32/138132/1
David Pursehouse [Wed, 6 Mar 2019 05:15:23 +0000 (14:15 +0900)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: If75b149e693005dd3fe06b523e6e6784bedf44c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 31/138131/1
David Pursehouse [Wed, 6 Mar 2019 05:14:29 +0000 (14:14 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I9052e318b5d920770f7c7121d36e3c58df9d5f5a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 30/138130/1
David Pursehouse [Wed, 6 Mar 2019 05:13:35 +0000 (14:13 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I0847251eb010616a705e0b91df4bdebc225fa95d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFix error log message in ObjectDirectory.handlePackError() 27/138127/1
Matthias Sohn [Mon, 4 Mar 2019 12:44:24 +0000 (13:44 +0100)]
Fix error log message in ObjectDirectory.handlePackError()

Change-Id: I154f392ad025c4b642eb1123d375a0afaa853885
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 997d785418d55dce5a1188fdb95e6d2b4ab0bde5)

5 years agoProperly format pack checksums in PackFile.idx() 26/138126/1
Matthias Sohn [Mon, 4 Mar 2019 12:28:25 +0000 (13:28 +0100)]
Properly format pack checksums in PackFile.idx()

Change-Id: Id805850dbe9a3d633168f3056e06ddeafd86f961
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit a33e4dc58a87daf34072b82643aba0fd4456c165)

5 years agoCancel gc if thread was interrupted 25/138125/1
Matthias Sohn [Thu, 6 Jul 2017 22:58:28 +0000 (00:58 +0200)]
Cancel gc if thread was interrupted

see
https://groups.google.com/d/msg/repo-discuss/oDB2rl3doDc/tFEh5Xt0CAAJ

Change-Id: Ia6d4631c64e065d8b9b09e0b45e7a9ea8ac3f41d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 882fed0d96c533513c43ae77aaff9cc07b94012c)

5 years agoPackFile: report correct message for checksum mismatch 24/138124/1
Luca Milanesio [Sat, 23 Feb 2019 21:57:09 +0000 (21:57 +0000)]
PackFile: report correct message for checksum mismatch

When the packfile checksum does not match the expected one
report the correct checksum error instead of reporting that
the number of objects is incorrect.

Change-Id: I040f36dacc4152ae05453e7acbf8dfccceb46e0d
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 436c99ce5946f31f06b8704b1fd33136f39dc814)

5 years agoObjectDirectory: Clean up logging 23/138123/1
David Pursehouse [Sun, 24 Feb 2019 23:35:12 +0000 (08:35 +0900)]
ObjectDirectory: Clean up logging

Externalize the message and log the pack file with absolute path.

Change-Id: I019052dfae8fd96ab67da08b3287d699287004cb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
(cherry picked from commit 9665d86ba1dd2937ca26f6aba63bb16aa277f888)

5 years agoBazel: Stop using native.git_repository 22/138122/1
David Pursehouse [Sun, 3 Mar 2019 04:14:46 +0000 (13:14 +0900)]
Bazel: Stop using native.git_repository

The native.git_repository method doesn't work in the latest version
of bazel, and causes the build to fail with:

  type 'struct' has no method git_repository()

Change-Id: Id6a57369b681c0afe811e9e3740b141fb7fb4653
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
(cherry picked from commit ec5fc57b791081fa073fc5fd91286347238f8f7c)

5 years agoObjectDirectory: extra logging on packfile exceptions 21/138121/1
Luca Milanesio [Mon, 11 Feb 2019 07:49:43 +0000 (07:49 +0000)]
ObjectDirectory: extra logging on packfile exceptions

Display extra logging, including the exception with the associated
stacktrace, whenever a packFile can't be read and thus removed
from the packlist.

Change-Id: I97a4e31dc427bfcc0baae438dcbe2dcd4704b824
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
(cherry picked from commit 962babc4b27ffd90058fe7734f17ed1c4e77d958)

5 years agoUpdate Orbit to R20190226160451 16/138116/1
Matthias Sohn [Tue, 5 Mar 2019 23:41:47 +0000 (00:41 +0100)]
Update Orbit to R20190226160451

Change-Id: I43bfd56b029b4bf16aaf001915a9dabeb189a9e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge "Upgrade maven-javadoc-plugin to 3.1.0"
Matthias Sohn [Tue, 5 Mar 2019 19:19:39 +0000 (14:19 -0500)]
Merge "Upgrade maven-javadoc-plugin to 3.1.0"

5 years agoMerge "Merge branch 'stable-5.2'"
Matthias Sohn [Tue, 5 Mar 2019 19:19:28 +0000 (14:19 -0500)]
Merge "Merge branch 'stable-5.2'"

5 years agoMerge "diff: add option metaVar for --src-prefix and --dst-prefix"
Christian Halstrick [Tue, 5 Mar 2019 13:50:42 +0000 (08:50 -0500)]
Merge "diff: add option metaVar for --src-prefix and --dst-prefix"

5 years agoUpgrade maven-javadoc-plugin to 3.1.0 62/138062/1
David Pursehouse [Tue, 5 Mar 2019 10:54:31 +0000 (19:54 +0900)]
Upgrade maven-javadoc-plugin to 3.1.0

Change-Id: I4fc59b02e92db55797b9773648fd1dea88682ade
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.2' 55/137955/2
David Pursehouse [Tue, 5 Mar 2019 01:24:34 +0000 (10:24 +0900)]
Merge branch 'stable-5.2'

* stable-5.2:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository

Change-Id: Ib972641105cef8089791fc65389c4f43e218620a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 54/137954/2
David Pursehouse [Tue, 5 Mar 2019 01:23:38 +0000 (10:23 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository

Change-Id: I42b72a3bba3b4c9389d91a1a35a8004836567e7c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agodiff: add option metaVar for --src-prefix and --dst-prefix 82/137482/3
Andre Bossert [Sat, 23 Feb 2019 15:03:58 +0000 (16:03 +0100)]
diff: add option metaVar for --src-prefix and --dst-prefix

Fixes exception if using "jgit diff --help".

Bug: 544735
Change-Id: I694ff3103da4bc199dd03c40962c5be191eddcd1
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
5 years agoFix error log message in ObjectDirectory.handlePackError() 90/137990/1
Matthias Sohn [Mon, 4 Mar 2019 12:44:24 +0000 (13:44 +0100)]
Fix error log message in ObjectDirectory.handlePackError()

Change-Id: I154f392ad025c4b642eb1123d375a0afaa853885
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoProperly format pack checksums in PackFile.idx() 89/137989/1
Matthias Sohn [Mon, 4 Mar 2019 12:28:25 +0000 (13:28 +0100)]
Properly format pack checksums in PackFile.idx()

Change-Id: Id805850dbe9a3d633168f3056e06ddeafd86f961
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoCancel gc if thread was interrupted 45/137945/1
Matthias Sohn [Thu, 6 Jul 2017 22:58:28 +0000 (00:58 +0200)]
Cancel gc if thread was interrupted

see
https://groups.google.com/d/msg/repo-discuss/oDB2rl3doDc/tFEh5Xt0CAAJ

Change-Id: Ia6d4631c64e065d8b9b09e0b45e7a9ea8ac3f41d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPackFile: report correct message for checksum mismatch 83/137483/3
Luca Milanesio [Sat, 23 Feb 2019 21:57:09 +0000 (21:57 +0000)]
PackFile: report correct message for checksum mismatch

When the packfile checksum does not match the expected one
report the correct checksum error instead of reporting that
the number of objects is incorrect.

Change-Id: I040f36dacc4152ae05453e7acbf8dfccceb46e0d
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoObjectDirectory: Clean up logging 99/137499/3
David Pursehouse [Sun, 24 Feb 2019 23:35:12 +0000 (08:35 +0900)]
ObjectDirectory: Clean up logging

Externalize the message and log the pack file with absolute path.

Change-Id: I019052dfae8fd96ab67da08b3287d699287004cb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoBazel: Stop using native.git_repository 32/137932/1
David Pursehouse [Sun, 3 Mar 2019 04:14:46 +0000 (13:14 +0900)]
Bazel: Stop using native.git_repository

The native.git_repository method doesn't work in the latest version
of bazel, and causes the build to fail with:

  type 'struct' has no method git_repository()

Change-Id: Id6a57369b681c0afe811e9e3740b141fb7fb4653
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoResolveMerger: Destroy TemporaryBuffer on unchecked exceptions 02/137902/1
Dave Borowitz [Fri, 1 Mar 2019 20:35:38 +0000 (12:35 -0800)]
ResolveMerger: Destroy TemporaryBuffer on unchecked exceptions

Previously, we called destroy() to delete the temp file on failure only
when catching an IOException, not a RuntimeException. Use a slightly
different construction with a finally block to ensure it's always
deleted on error (assuming the JVM is still healthy enough).

Change-Id: Ie201f3cfc81099ee1cafed066632da76223cef1f

5 years agoFetchV2Request: make getWantedRefs public 38/137838/2
Ivan Frade [Thu, 24 Jan 2019 20:38:07 +0000 (12:38 -0800)]
FetchV2Request: make getWantedRefs public

There are valid cases where a hook, invoked by ProtocolV2Hook
and probably implemented in a different package, is interested
in knowing the wanted refs in the request.

Increase visibility to public in the wanted-ref method.

Change-Id: I5da085ac7af4c396c1cb85e630f40a57fc70b33e
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoExpose the filter blob limit in UploadPack 35/137835/1
Terry Parker [Fri, 1 Mar 2019 00:00:24 +0000 (16:00 -0800)]
Expose the filter blob limit in UploadPack

Similar to UploadPack.getDepth() to know the shallow clone depth, expose
the user-specified filter blob limit for partial clones.

Change-Id: I04bde06862a1cf8a9862d950c15023c49d16a2a6
Signed-off-by: Terry Parker <tparker@google.com>
5 years agoUpgrade error_prone_core to 2.3.3 17/137517/2
David Pursehouse [Mon, 25 Feb 2019 10:13:01 +0000 (19:13 +0900)]
Upgrade error_prone_core to 2.3.3

Change-Id: I31232d09b6dc1e5bb3d3398d34b3dd814165d2dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge changes from topic 'rebase_compatibility'
Thomas Wolf [Tue, 26 Feb 2019 21:22:21 +0000 (16:22 -0500)]
Merge changes from topic 'rebase_compatibility'

* changes:
  RebaseCommand: tighten check for --preserve-merges on --continue
  RebaseCommand: use orig-head to abort
  RebaseCommand: use orig-head in addition to head

5 years agoMerge "Strongly reference indices in DfsPackFile"
Jonathan Nieder [Tue, 26 Feb 2019 20:08:39 +0000 (15:08 -0500)]
Merge "Strongly reference indices in DfsPackFile"

5 years agoMerge "On Windows use %APPDATA%\gnupg as GPG directory if it exists"
Gunnar Wagenknecht [Tue, 26 Feb 2019 19:46:51 +0000 (14:46 -0500)]
Merge "On Windows use %APPDATA%\gnupg as GPG directory if it exists"

5 years agoMerge "Remove duplicate externalized message"
Christian Halstrick [Tue, 26 Feb 2019 12:35:52 +0000 (07:35 -0500)]
Merge "Remove duplicate externalized message"

5 years agoOn Windows use %APPDATA%\gnupg as GPG directory if it exists 14/137614/1
Thomas Wolf [Tue, 26 Feb 2019 11:49:59 +0000 (12:49 +0100)]
On Windows use %APPDATA%\gnupg as GPG directory if it exists

Hard-coding ~/.gnupg for the GPG directory doesn't work on Windows,
where GnuPG uses %APPDATA%\gnupg by default. Make the determination
of the directory platform-dependent.

Bug: 544797
Change-Id: Id4bfd39a981ef7c5b39fbde46fce9a7524418709
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoRemove duplicate externalized message 07/137607/1
Thomas Wolf [Tue, 26 Feb 2019 10:53:49 +0000 (11:53 +0100)]
Remove duplicate externalized message

Instead of a new "unexpectedNlinkValue" message use the already
existing "failedAtomicFileCreation". Remove a stray double quote
from the latter.

Change-Id: I1ba5e9ea48d3f7615354b2ace2575883070b3206
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoRebaseCommand: tighten check for --preserve-merges on --continue 41/137341/3
Thomas Wolf [Wed, 19 Dec 2018 10:34:35 +0000 (11:34 +0100)]
RebaseCommand: tighten check for --preserve-merges on --continue

With native git, .git/rebase-merge/rewritten exists actually in two
different cases:

* as a file in git rebase --merge recording OIDs for copying notes
* as a directory in git rebase --preserve-merges

Add a comment, and check for isDirectory() instead of exists().

Bug: 511487
Change-Id: I6a3317b4234d4f41c41b3004cdc7ea0abf2c6223
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoRebaseCommand: fix ONTO_NAME, and --preserve-merges is interactive 38/137338/3
Thomas Wolf [Wed, 19 Dec 2018 10:03:29 +0000 (11:03 +0100)]
RebaseCommand: fix ONTO_NAME, and --preserve-merges is interactive

ONTO_NAME must be "onto_name", not "onto-name".

For native git, --preserve-merges is an interactive mode. Create the
INTERACTIVE marker file, otherwise a native git rebase --continue
will fall back into rebase --merge mode before git 2.19.0 since it
started looking for the REWRITTEN directory to make the distinction
only then.[1]

This allows a JGit interactive rebase to be continued via native git
rebase --continue.

[1] https://github.com/git/git/commit/6d98d0c0

Bug: 511487
Change-Id: I13850e0fd96ac77d03fbb581c8790d76648dbbc6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoRebaseCommand: use orig-head to abort 40/137340/3
Thomas Wolf [Wed, 19 Dec 2018 10:26:21 +0000 (11:26 +0100)]
RebaseCommand: use orig-head to abort

Aborting a rebase used ORIG_HEAD to reset. Strictly speaking this is
not correct, since other commands run during the rebase (for instance,
when the rebase stopped on a conflict) might have changed ORIG_HEAD.

Prefer the OID recorded in the orig-head file, falling back to the
older "head" file if "orig-head" doesn't exist, and use ORIG_HEAD only
if neither exists.

Bug: 511487
Change-Id: Ifa99221bb33e4e4754377f9b8f46e76c8936e072
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoFix core.autocrlf for non-normalized index 24/127324/11
Thomas Wolf [Sun, 12 Aug 2018 17:30:36 +0000 (19:30 +0200)]
Fix core.autocrlf for non-normalized index

With text=auto or core.autocrlf=true, git does not normalize upon
check-in if the file in the index contains already CR/LFs. The
documentation says: "When text is set to "auto", the path is
marked for automatic end-of-line conversion. If Git decides that
the content is text, its line endings are converted to LF on
checkin. When the file has been committed with CRLF, no conversion
is done."[1]

Implement the last bit as in canonical git: check the blob in the
index for CR/LFs. For very large files, we check only the first 8000
bytes, like RawText.isBinary() and AutoLFInputStream do.

In Auto(CR)LFInputStream, ensure that the buffer is filled as much as
possible for the isBinary() check.

Regarding these content checks, there are a number of inconsistencies:

* Canonical git considers files containing lone CRs as binary.
* RawText checks the first 8000 bytes.
* Auto(CR)LFInputStream checks the first 8096 (not 8192!) bytes.

None of these are changed with this commit. It appears that canonical
git will check the whole blob, not just the first 8k bytes. Also
note: the check for CR/LF text won't work with LFS (neither in JGit
nor in git) since the blob data is not run through the smudge filter.
C.f. [2].

Two tests in AddCommandTest actually tested that normalization was
done even if the file was already committed with CR/LF.These tests
had to be adapted. I find the git documentation unclear about the
case where core.autocrlf=input, but from [3] it looks as if this
non-normalization also applies in this case.

Add new tests in CommitCommandTest testing this for the case where
the index entry is for a merge conflict. In this case, canonical git
uses the "ours" version.[4] Do the same.

[1] https://git-scm.com/docs/gitattributes
[2] https://github.com/git/git/blob/3434569fc/convert.c#L225
[3] https://github.com/git/git/blob/3434569fc/convert.c#L529
[4] https://github.com/git/git/blob/f2b6aa98b/read-cache.c#L3281

Bug: 470643
Change-Id: Ie7310539fbe6c737d78b1dcc29e34735d4616b88
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoRebaseCommand: use orig-head in addition to head 39/137339/3
Thomas Wolf [Wed, 19 Dec 2018 10:07:43 +0000 (11:07 +0100)]
RebaseCommand: use orig-head in addition to head

Since 2011-02-10 (i.e., git 1.7.6)[1] native git uses "orig-head" for
REBASE_HEAD. JGit was still using "head". Currently native git has a
legacy fall-back for reading this, but for how long? Let's write to
both. Note that JGit never reads this file.

[1] https://github.com/git/git/commit/84df4560

Bug: 511487
Change-Id: Id3742bf9bbc0001d850e801b26cc8880e646abfc
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoSHA1: Use externalized message in log 01/137501/2
David Pursehouse [Sun, 24 Feb 2019 23:50:03 +0000 (08:50 +0900)]
SHA1: Use externalized message in log

The non-externalized warning message says there is a "possible SHA-1
collision" but then the Sha1CollisionException is always thrown.

Replace the message with the existing externalised string that does
not say "possible".

Change-Id: I9773ec76b416c356e234a658fb119f98d33eac83
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoJGitText: Remove unnecessary suffix from externalized message identifier 00/137500/2
David Pursehouse [Sun, 24 Feb 2019 23:43:25 +0000 (08:43 +0900)]
JGitText: Remove unnecessary suffix from externalized message identifier

Change-Id: I7a3ade56c219826b81d33d1d52566a86ad2e853a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFS_POSIX: Externalize log message 98/137498/2
David Pursehouse [Sun, 24 Feb 2019 23:24:19 +0000 (08:24 +0900)]
FS_POSIX: Externalize log message

Change-Id: Ida538e05c4595fdce99f1fa87469a3be60160adb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoStrongly reference indices in DfsPackFile 15/137415/2
Minh Thai [Fri, 22 Feb 2019 00:36:59 +0000 (16:36 -0800)]
Strongly reference indices in DfsPackFile

DfsBlockCache.Ref might get cleared out if the JVM is running out of
memory. As a result, the index is not persisted for the request and
will be reloaded unnecessarily.

Change-Id: I3b57ad5e6673f77f2dc66177a649ac412a97fe20
Signed-off-by: Minh Thai <mthai@google.com>
5 years agoUpdate Orbit to S20190219190953 39/137239/2
Matthias Sohn [Tue, 19 Feb 2019 22:19:55 +0000 (23:19 +0100)]
Update Orbit to S20190219190953

- Orbit milestone for 2019-03 M3
- fixes Apache httpclient 4.5.6

Bug: 544139
Change-Id: Ib225d90dd26f6f3665d4feacecfbba4a28251a0b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate README 67/137167/1
David Pursehouse [Mon, 18 Feb 2019 23:33:11 +0000 (08:33 +0900)]
Update README

- Consistently refer to the project as "JGit", rather than "jgit".

- Convert the contribution guide link to markdown syntax.

Change-Id: I896b8112f3f1a77255883e0deb153e8937999a84
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpdate README 95/137095/4
Matthias Sohn [Mon, 18 Feb 2019 00:11:57 +0000 (01:11 +0100)]
Update README

Change-Id: Ibf77553f89871e34d7617d2a648fb0dc7904325d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.3' 99/137099/1
David Pursehouse [Mon, 18 Feb 2019 02:22:31 +0000 (11:22 +0900)]
Merge branch 'stable-5.3'

* stable-5.3:
  ObjectDirectory: extra logging on packfile exceptions
  Prepare 5.3.0-SNAPSHOT builds
  JGit v5.3.0.201901162155-m1
  Fix tools/version.sh
  JGit v5.3.0.201901161700-m1

Change-Id: I3c511fbc08f21eec5bb49d443de33d43094da4a4

5 years agoMerge branch 'stable-5.2' into stable-5.3 98/137098/1
David Pursehouse [Mon, 18 Feb 2019 02:21:38 +0000 (11:21 +0900)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I4bbeb1d28ab042e3c6c74f7284f5d882ed034305

5 years agoMerge branch 'stable-5.1' into stable-5.2 97/137097/1
David Pursehouse [Mon, 18 Feb 2019 02:20:56 +0000 (11:20 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: Id2fea30664d53b31ad026ee5ae06a5a24d731a52

5 years agoAdd missing @since tag for new API method getUpdateIndex 93/137093/3
Matthias Sohn [Sun, 17 Feb 2019 20:29:15 +0000 (21:29 +0100)]
Add missing @since tag for new API method getUpdateIndex

Change-Id: Idd4a580e241a9105a55bc6f0457ad02a35e55faf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoFix NPE in PlotCommitList 96/137096/1
Matthias Sohn [Mon, 18 Feb 2019 00:25:12 +0000 (01:25 +0100)]
Fix NPE in PlotCommitList

Bug: 544513
Change-Id: I2fca766bbdc441a2dca947fba5dde532de7a10fd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoCommitBuilder: Deprecate setEncoding(String) 77/136977/2
David Pursehouse [Fri, 15 Feb 2019 07:46:37 +0000 (16:46 +0900)]
CommitBuilder: Deprecate setEncoding(String)

Deprecate the method in favor of setEncoding(Charset).

Update the only caller in the code base that was still using
the deprecated variant.

Change-Id: I6357f2d0c727007013c72e9d5b7c72a3f5f3f2b1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoCommitBuilder: Add missing periods on methods' Javadoc 76/136976/2
David Pursehouse [Fri, 15 Feb 2019 07:49:28 +0000 (16:49 +0900)]
CommitBuilder: Add missing periods on methods' Javadoc

Change-Id: Ibcf64b23de8534f7831d6e40ee4b0ad2bade74ce
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoObjectDirectory: extra logging on packfile exceptions 44/136644/2
Luca Milanesio [Mon, 11 Feb 2019 07:49:43 +0000 (07:49 +0000)]
ObjectDirectory: extra logging on packfile exceptions

Display extra logging, including the exception with the associated
stacktrace, whenever a packFile can't be read and thus removed
from the packlist.

Change-Id: I97a4e31dc427bfcc0baae438dcbe2dcd4704b824
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
5 years agoUpgrade wagon-ssh to 3.3.2 66/136666/2
David Pursehouse [Mon, 11 Feb 2019 10:10:14 +0000 (19:10 +0900)]
Upgrade wagon-ssh to 3.3.2

Change-Id: I203572eb47187d476622eb416f6ac8d791b747c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFix bug in copyPackBypassCache's skip 'PACK' header logic 72/136872/5
Minh Thai [Wed, 13 Feb 2019 20:16:42 +0000 (12:16 -0800)]
Fix bug in copyPackBypassCache's skip 'PACK' header logic

Bug caused the pack to be 12 bytes short when cold cache.  Also added
test for copyPackAsIs method.

Change-Id: Idf8fb0e50d1215245d4b032e2e00df4b218c115f
Signed-off-by: Minh Thai <mthai@google.com>
5 years agoUpgrade spotbugs to 3.1.11 25/136225/1
David Pursehouse [Mon, 4 Feb 2019 11:15:13 +0000 (20:15 +0900)]
Upgrade spotbugs to 3.1.11

Change-Id: I24bb63fc5e1241420f6fc72e8c4708d5201c4f2b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoAtomic file creation: hard-linking may not be allowed 73/135973/2
Thomas Wolf [Tue, 29 Jan 2019 21:20:07 +0000 (22:20 +0100)]
Atomic file creation: hard-linking may not be allowed

Android for instance forbids hard linking via a SELinux
policy. If we can't hard link, the NFS work-around for
atomic file creation cannot work at all. In this case,
fall back to not using the hard-linking mechanism.

Android throws an AccessDeniedException, so we catch that.
The javadoc on Files.createLink() indicates that another
possibility might be a SecurityException, so catch that,
too.

Bug: 543956
Change-Id: I551b7a45f7b2fbbd8cf94f0b7233dbd8a200520e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoUpdate Orbit to S20190129210011 96/135996/1
Matthias Sohn [Wed, 30 Jan 2019 09:52:38 +0000 (10:52 +0100)]
Update Orbit to S20190129210011

This is the Orbit stable build for 2019-03 M2

Change-Id: I6db8e030af6bcec9c50065cb66211280d366dfa8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoFix GC.deleteEmptyRefsFolders 09/135809/3
Matthias Sohn [Sun, 27 Jan 2019 01:22:34 +0000 (02:22 +0100)]
Fix GC.deleteEmptyRefsFolders

This method tried to iterate spurious files which may exist in the
.git/refs folder, e.g. on Mac a .DS_Store may have been created there by
inspecting the folder using the finder application. This led to a
NotDirectoryException when deleteEmptyRefsFolders tried to create an
iterator for such a file entry. Skip files contained in the refs folder
to ensure the method only tries to iterate contained folders but not
files.

Change-Id: I5f31e733072a35db1e93908a9c69a8891ae5c206
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoEnable cloning only specific tags 14/133814/4
Thomas Wolf [Mon, 10 Dec 2018 23:47:13 +0000 (00:47 +0100)]
Enable cloning only specific tags

Single-branch-clone should be able to clone a single tag. Enhance
CloneCommand to accept also full refs of tags in setBranchesToClone().
Make sure we also include fetch ref specs for the fetch command for
tags. This mimics the behavior of native git's single-branch clone:
git clone --branch <tag> --single-branch <URI>

Bug: 542611
Change-Id: I285cf043751d9b0ba71258ee8214c0e5d1191428
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoDelete jgit-4.5 target platform 99/135799/2
Matthias Sohn [Fri, 25 Jan 2019 23:36:12 +0000 (00:36 +0100)]
Delete jgit-4.5 target platform

Change-Id: If38b605b98cad55ee83cb7c0a6a972489031e447
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoAdd 4.11-staging target platform and update Orbit to I20190123233226 58/135658/3
Matthias Sohn [Fri, 25 Jan 2019 23:34:08 +0000 (00:34 +0100)]
Add 4.11-staging target platform and update Orbit to I20190123233226

Update
- org.apache.httpcomponents.httpcore to 4.4.10.v20190123-2214
- org.apache.httpcomponents.httpclient.source to 4.5.6.v20190123-2215
- org.bouncycastle.bcpg to 1.60.0.v20181210-2057
- org.bouncycastle.pkix to 1.60.0.v20181210-2057
- org.bouncycastle.prov to 1.60.0.v20181210-2057

Change-Id: I132b6686aa29b2a76cc529f7cae34115604c754d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpgrade jacoco-maven-plugin to 0.8.3 10/135810/1
David Pursehouse [Sun, 27 Jan 2019 07:57:15 +0000 (16:57 +0900)]
Upgrade jacoco-maven-plugin to 0.8.3

Change-Id: I1df9ed2d696613297f9e694876d94c28aaf56339
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoBazel: Format BUILD file with buildifier 02/135602/2
David Pursehouse [Wed, 23 Jan 2019 08:39:48 +0000 (17:39 +0900)]
Bazel: Format BUILD file with buildifier

$ buildifier -lint=fix BUILD

Change-Id: Ie2e069db3936ce6a85c4c29e6a0137cda5e21f09
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoRenameBranchCommand: more consistent handling of short ref names 99/133599/5
Thomas Wolf [Thu, 6 Dec 2018 14:49:25 +0000 (15:49 +0100)]
RenameBranchCommand: more consistent handling of short ref names

Several problems:

* The command didn't specify whether it expected short or full names.
* For the new name, it expected a short name, but then got confused
  if tags or both local and remote branches with the same name existed.
* For the old name, it accepted either a short or a full name, but
  again got confused if a short name was given and a tag with the
  same name existed.

With such an interface, one cannot use Repository.findRef() to
reliably find the branch to rename. Use exactRef() for the new
name as by the time the Ref is needed its full name is known.
For determining the old Ref from the name, do the resolution
explicitly: first try exactRef (assuming the old name is a full
name); if that doesn't find anything, try "refs/heads/<old>" and
"refs/remotes/<old>" explicitly. Throw an exception if the name
is ambiguous, or if exactRef returned something that is not a
branch (refs/tags/... or also refs/notes/...).

Document in the javadoc what kind of names are valid, and add tests.

A user can still shoot himself in the foot if he chooses exceptionally
stupid branch names. For instance, it is still possible to rename a
branch to "refs/heads/foo" (full name "refs/heads/refs/heads/foo"),
but it cannot be renamed further using the new short name if a branch
with the full name "refs/heads/foo" exists. Similar edge cases exist
for other dumb branch names, like a branch with the short name
"refs/tags/foo". Renaming using the full name is always possible.

Bug: 542446
Change-Id: I34ac91c80c0a00c79a384d16ce1e727c550d54e9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoSshdSessionFactory: generalize providing default keys 80/134680/4
Thomas Wolf [Sat, 5 Jan 2019 16:37:25 +0000 (17:37 +0100)]
SshdSessionFactory: generalize providing default keys

Provide a mechanism for a subclass to provide its own set
of default identities from anywhere as an Iterable<KeyPair>.

The default implementation is functionally unchanged and uses
the known default identity files in the ~/.ssh directory. A subclass
can override the getDefaultKeys() function and return whatever keys
are appropriate.

Bug: 543152
Change-Id: I500d63146bc67e20e051f617790eb87c7cb500b6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoAllow to check for signing key 50/135350/4
Gunnar Wagenknecht [Fri, 18 Jan 2019 17:37:38 +0000 (09:37 -0800)]
Allow to check for signing key

The new API is intended for UIs to check if signing will be possible or
would fail

Bug: 543579
Change-Id: I6ce1fd4210e46d49dcdf420c99d08c93e022136c
Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
5 years agoHandle premature EOF in BundleFetchConnection 00/135300/4
Thomas Wolf [Thu, 17 Jan 2019 22:04:46 +0000 (23:04 +0100)]
Handle premature EOF in BundleFetchConnection

BundleFetchConnection.readLine() must abort on EOF, otherwise
it gets stuck in an endless loop.

Bug: 543390
Change-Id: I4cb3428560277888af114b928950d620bb6564f9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agopgm: Fix missing braces in Version.run() 22/135522/1
Matthias Sohn [Mon, 21 Jan 2019 22:55:08 +0000 (23:55 +0100)]
pgm: Fix missing braces in Version.run()

Change-Id: I4c5633846320f0324714f635b2be388b17cf79fa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle IOException in Version command 21/135521/1
Matthias Sohn [Mon, 21 Jan 2019 22:54:28 +0000 (23:54 +0100)]
pgm: Handle IOException in Version command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: I37e6e3aaba411858042afac02098ce9eaa06f258
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Fix missing braces in UploadPack.run() 20/135520/1
Matthias Sohn [Mon, 21 Jan 2019 22:52:57 +0000 (23:52 +0100)]
pgm: Fix missing braces in UploadPack.run()

Change-Id: I923af9b4ce62d5098828f4322a2a508bf3927bbd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle IOException in UploadPack command 19/135519/1
Matthias Sohn [Mon, 21 Jan 2019 22:52:27 +0000 (23:52 +0100)]
pgm: Handle IOException in UploadPack command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: Ife1d8e88387a32de63b0ef31f45499babdbdde3c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle exceptions in Tag command 18/135518/1
Matthias Sohn [Mon, 21 Jan 2019 22:48:47 +0000 (23:48 +0100)]
pgm: Handle exceptions in Tag command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: I16b528fad74d0c5346d054b3c29070331d60db7f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Fix missing braces in Status.run() 17/135517/1
Matthias Sohn [Mon, 21 Jan 2019 22:47:13 +0000 (23:47 +0100)]
pgm: Fix missing braces in Status.run()

Change-Id: Ie30df8ed3d9a1e676f130214a173b622eaf67c6f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle exceptions in Status command 16/135516/1
Matthias Sohn [Mon, 21 Jan 2019 22:46:37 +0000 (23:46 +0100)]
pgm: Handle exceptions in Status command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: I662a343fbb46c35090bd6f840e5a35a88036a65a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Fix missing braces in ShowRef.run() 15/135515/1
Matthias Sohn [Mon, 21 Jan 2019 22:44:55 +0000 (23:44 +0100)]
pgm: Fix missing braces in ShowRef.run()

Change-Id: I92bc2008c72bd4495dc3df47a9dd7eb242aab30f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle IOException in ShowRef command 14/135514/1
Matthias Sohn [Mon, 21 Jan 2019 22:44:20 +0000 (23:44 +0100)]
pgm: Handle IOException in ShowRef command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: If18a5d8013f1cb393af3a5e5a1ec9613ac2151bd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Fix missing braces in Show.run() 13/135513/1
Matthias Sohn [Mon, 21 Jan 2019 22:42:41 +0000 (23:42 +0100)]
pgm: Fix missing braces in Show.run()

Change-Id: I50097649f1355856e342035d54c55e65270ef507
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle exceptions in Show command 12/135512/1
Matthias Sohn [Mon, 21 Jan 2019 22:41:37 +0000 (23:41 +0100)]
pgm: Handle exceptions in Show command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: I1c6cc5ecdc44b81e5f3f9b7dc64c3653de5475ba
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Fix missing braces in Rm command 11/135511/1
Matthias Sohn [Mon, 21 Jan 2019 22:39:32 +0000 (23:39 +0100)]
pgm: Fix missing braces in Rm command

Change-Id: I5ad2f02516917bbd02aa0eb4fb6b05d4b06dc670
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle GitAPIException in Rm command 10/135510/1
Matthias Sohn [Mon, 21 Jan 2019 22:39:04 +0000 (23:39 +0100)]
pgm: Handle GitAPIException in Rm command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: I55c15a35369e790a3ca946d6db0097a57ac6fae5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle exceptions in RevParse command 09/135509/1
Matthias Sohn [Mon, 21 Jan 2019 22:36:32 +0000 (23:36 +0100)]
pgm: Handle exceptions in RevParse command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: Iae510d8c6af9acd587822a28ad48eab0b2a96ccd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Externalize error message 08/135508/1
Matthias Sohn [Mon, 21 Jan 2019 22:30:51 +0000 (23:30 +0100)]
pgm: Externalize error message

Change-Id: Id9e33104c9681dc9a57674c1648c994a503fa6b8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Fix missing braces in Reset.run() 07/135507/1
Matthias Sohn [Mon, 21 Jan 2019 22:26:27 +0000 (23:26 +0100)]
pgm: Fix missing braces in Reset.run()

Change-Id: I1e854ab81063601eb4ff159aabc559cb65ce6ece
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agopgm: Handle GitAPIException in Reset command 06/135506/1
Matthias Sohn [Mon, 21 Jan 2019 22:23:36 +0000 (23:23 +0100)]
pgm: Handle GitAPIException in Reset command

This avoids we show a stacktrace on the console by default when this
type of exception is thrown during the run method is executed.

Change-Id: I70dce366081cd1fc4539cf195d6310fef1080eb3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>