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 /** 13 * Parsed reflog entry 14 * 15 * @since 3.0 16 */ 17 public interface ReflogEntry { 18 19 /** 20 * Prefix used in reflog messages when the ref was first created. 21 * <p> 22 * Does not have a corresponding constant in C git, but is untranslated like 23 * the other constants. 24 * 25 * @since 4.9 26 */ 27 String PREFIX_CREATED = "created"; //$NON-NLS-1$ 28 29 /** 30 * Prefix used in reflog messages when the ref was updated with a fast 31 * forward. 32 * <p> 33 * Untranslated, and exactly matches the 34 * <a href="https://git.kernel.org/pub/scm/git/git.git/tree/builtin/fetch.c?id=f3da2b79be9565779e4f76dc5812c68e156afdf0#n680"> 35 * untranslated string in C git</a>. 36 * 37 * @since 4.9 38 */ 39 String PREFIX_FAST_FORWARD = "fast-forward"; //$NON-NLS-1$ 40 41 /** 42 * Prefix used in reflog messages when the ref was force updated. 43 * <p> 44 * Untranslated, and exactly matches the 45 * <a href="https://git.kernel.org/pub/scm/git/git.git/tree/builtin/fetch.c?id=f3da2b79be9565779e4f76dc5812c68e156afdf0#n695"> 46 * untranslated string in C git</a>. 47 * 48 * @since 4.9 49 */ 50 String PREFIX_FORCED_UPDATE = "forced-update"; //$NON-NLS-1$ 51 52 /** 53 * Get the commit id before the change 54 * 55 * @return the commit id before the change 56 */ 57 ObjectId getOldId(); 58 59 /** 60 * Get the commit id after the change 61 * 62 * @return the commit id after the change 63 */ 64 ObjectId getNewId(); 65 66 /** 67 * Get user performing the change 68 * 69 * @return user performing the change 70 */ 71 PersonIdent getWho(); 72 73 /** 74 * Get textual description of the change 75 * 76 * @return textual description of the change 77 */ 78 String getComment(); 79 80 /** 81 * Parse checkout 82 * 83 * @return a {@link org.eclipse.jgit.lib.CheckoutEntry} with parsed 84 * information about a branch switch, or null if the entry is not a 85 * checkout 86 */ 87 CheckoutEntry parseCheckout(); 88 89 }