git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [JGIT PATCH] Rename RevTag.getName() to RevTag.getTagName()

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Aug 12, 2009, 20:37 UTC
Message-ID
<200908122237.37148.robin.rosenberg.lists@dewire.com>
In-Reply-To
<1250105956-17795-1-git-send-email-spearce@spearce.org>
onsdag 12 augusti 2009 21:39:16 skrev "Shawn O. Pearce" <spearce@spearce.org>:
Show 11 quoted lines
> The method getName() conflicts semantically with the method name()
> we have inherited from our base class, ObjectId.  It is a rather
> unfortunate turn of events that for performance reasons we wind up
> subclassing what should be a property of this class, but since we
> do that we need to pay attention to the methods declared on our
> base class.
> 
> We want to use getName() to be a mirror of name() on AnyObjectId,
> as it has a more JavaBeans style feel to the accessing of that
> particular value.  So, rename getTagName() so it doesn't wind up
> conflicting with the SHA-1 hex formatted string.
Show 9 quoted lines
> @@ -204,7 +204,7 @@ public final RevObject getObject() {
>  	 * @return name of the tag, according to the tag header.
>  	 */
>  	public final String getName() {
> -		return name;
> +		return tagName;
>  	}
>  
>  	final void disposeBody() {
You forgot the rename of the method here, and all uses of it.
-- robin
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 2 of 3 in “Rename RevTag.getName() to RevTag.getTagName()”
  1. Rename RevTag.getName() to RevTag.getTagName()Shawn O. Pearce, Aug 12, 2009
  2. Robin RosenbergAug 12, 2009
  3. Rename RevTag.getName() to RevTag.getTagName()Shawn O. Pearce, Aug 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.