editor.add(edit); for (String path : wtDeletes) editor.add(new DeletePath(path)); editor.finish();
@Nonnull public static DirCacheEditor.DeletePath deleteEntry(@Nonnull String path) { return new DirCacheEditor.DeletePath(TreeUtils.normalizeTreePath(path)); }
@Nonnull public static DirCacheEditor.DeletePath deleteEntry(String path) { return new DirCacheEditor.DeletePath(normalizeNodePath(path)); }
applyPathEdit(dirCache, new DeletePath(changePath)); numEdits++; break; editor.add(new DeletePath(changePath)); editor.add(new PathEdit(newPath) { @Override
applyPathEdit(dirCache, new DeletePath(changePath)); numEdits++; break; editor.add(new DeletePath(changePath)); editor.add(new PathEdit(newPath) { @Override
applyPathEdit(dirCache, new DeletePath(changePath)); numEdits++; break; editor.add(new DeletePath(changePath)); editor.add(new PathEdit(newPath) { @Override
editor.add(edit); for (String path : wtDeletes) editor.add(new DeletePath(path)); editor.finish();
editor.add(edit); for (String path : wtDeletes) editor.add(new DeletePath(path)); editor.finish();
ed.add(new DeletePath(path)); cleanupPeeledRef(ed, oldRef); return;
ed.add(new DeletePath(path)); cleanupPeeledRef(ed, oldRef); return;
switch (entry.getState()) { case ADDED: edit.add(new DirCacheEditor.DeletePath(entry.getPath())); break; case CHANGED:
public void contentChanged(IContentChangeNotifier source) { final byte[] newContent = next.getModifiedContent(); DirCache cache = null; try { cache = repository.lockDirCache(); DirCacheEditor editor = cache.editor(); if (newContent.length == 0) editor.add(new DirCacheEditor.DeletePath(gitPath)); else editor.add(new DirCacheEntryEditor(gitPath, repository, entry, newContent)); try { editor.commit(); } catch (RuntimeException e) { if (e.getCause() instanceof IOException) throw (IOException) e.getCause(); else throw e; } } catch (IOException e) { Activator.handleError( UIText.CompareWithIndexAction_errorOnAddToIndex, e, true); } finally { if (cache != null) cache.unlock(); } } };
@Nonnull public static DirCacheEditor.DeletePath deleteEntry(String path) { return new DirCacheEditor.DeletePath(normalizeNodePath(path)); }
private static void cleanupPeeledRef(DirCacheEditor ed, Ref ref) { if (ref != null && !ref.isSymbolic() && (!ref.isPeeled() || ref.getPeeledObjectId() != null)) { ed.add(new DeletePath(peeledPath(ref.getName()))); } }
private static void cleanupPeeledRef(DirCacheEditor ed, Ref ref) { if (ref != null && !ref.isSymbolic() && (!ref.isPeeled() || ref.getPeeledObjectId() != null)) { ed.add(new DeletePath(peeledPath(ref.getName()))); } }
ed.add(new DeletePath(path)); cleanupPeeledRef(ed, oldRef); return;
private static void cleanupPeeledRef(DirCacheEditor ed, Ref ref) { if (ref != null && !ref.isSymbolic() && (!ref.isPeeled() || ref.getPeeledObjectId() != null)) { ed.add(new DeletePath(peeledPath(ref.getName()))); } }