All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ajoberstar.grgit.DiffEntry.groovy Maven / Gradle / Ivy

package org.ajoberstar.grgit

import groovy.transform.Immutable
import groovy.transform.ToString

@Immutable
@ToString(includeNames=true)
class DiffEntry {
  /** General type of change a single file-level patch describes. */
  enum ChangeType {
    ADD,
    MODIFY,
    DELETE,
    RENAME,
    COPY;
  }

  /** General type of change indicated by the patch. */
  ChangeType changeType;

  /**
   * Get the old name associated with this file.
   * 

* The meaning of the old name can differ depending on the semantic meaning * of this patch: *

    *
  • file add: always /dev/null
  • *
  • file modify: always {@link #newPath}
  • *
  • file delete: always the file being deleted
  • *
  • file copy: source file the copy originates from
  • *
  • file rename: source file the rename originates from
  • *
* */ String oldPath; /** * Get the new name associated with this file. *

* The meaning of the new name can differ depending on the semantic meaning * of this patch: *

    *
  • file add: always the file being created
  • *
  • file modify: always {@link #oldPath}
  • *
  • file delete: always /dev/null
  • *
  • file copy: destination file the copy ends up at
  • *
  • file rename: destination file the rename ends up at
  • *
* */ String newPath; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy