You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReflogEntry.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (C) 2011-2013, Robin Rosenberg <robin.rosenberg@dewire.com> and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.lib;
  11. /**
  12. * Parsed reflog entry
  13. *
  14. * @since 3.0
  15. */
  16. public interface ReflogEntry {
  17. /**
  18. * Prefix used in reflog messages when the ref was first created.
  19. * <p>
  20. * Does not have a corresponding constant in C git, but is untranslated like
  21. * the other constants.
  22. *
  23. * @since 4.9
  24. */
  25. String PREFIX_CREATED = "created"; //$NON-NLS-1$
  26. /**
  27. * Prefix used in reflog messages when the ref was updated with a fast
  28. * forward.
  29. * <p>
  30. * Untranslated, and exactly matches the
  31. * <a href="https://git.kernel.org/pub/scm/git/git.git/tree/builtin/fetch.c?id=f3da2b79be9565779e4f76dc5812c68e156afdf0#n680">
  32. * untranslated string in C git</a>.
  33. *
  34. * @since 4.9
  35. */
  36. String PREFIX_FAST_FORWARD = "fast-forward"; //$NON-NLS-1$
  37. /**
  38. * Prefix used in reflog messages when the ref was force updated.
  39. * <p>
  40. * Untranslated, and exactly matches the
  41. * <a href="https://git.kernel.org/pub/scm/git/git.git/tree/builtin/fetch.c?id=f3da2b79be9565779e4f76dc5812c68e156afdf0#n695">
  42. * untranslated string in C git</a>.
  43. *
  44. * @since 4.9
  45. */
  46. String PREFIX_FORCED_UPDATE = "forced-update"; //$NON-NLS-1$
  47. /**
  48. * Get the commit id before the change
  49. *
  50. * @return the commit id before the change
  51. */
  52. ObjectId getOldId();
  53. /**
  54. * Get the commit id after the change
  55. *
  56. * @return the commit id after the change
  57. */
  58. ObjectId getNewId();
  59. /**
  60. * Get user performing the change
  61. *
  62. * @return user performing the change
  63. */
  64. PersonIdent getWho();
  65. /**
  66. * Get textual description of the change
  67. *
  68. * @return textual description of the change
  69. */
  70. String getComment();
  71. /**
  72. * Parse checkout
  73. *
  74. * @return a {@link org.eclipse.jgit.lib.CheckoutEntry} with parsed
  75. * information about a branch switch, or null if the entry is not a
  76. * checkout
  77. */
  78. CheckoutEntry parseCheckout();
  79. }