Java tutorial
/******************************************************************************* * Copyright (C) 2010, Jens Baumgart <jens.baumgart@sap.com> * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.eclipse.egit.core.internal; import org.eclipse.jgit.lib.ObjectId; /** * Utility class * */ public class Utils { /** * @param id * @return a shortened ObjectId (first 6 digits) */ public static String getShortObjectId(ObjectId id) { return id.abbreviate(6).name(); } }