Re: [PATCH] Reset the graph plotter internals when HEAD has changed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg <robin.rosenberg.lists@xxxxxxxxxx> wrote:
> When we reset HEAD to an old revision it becomes more visible than when
> we add a new commit. This is an intermediate solution.

Hmm.
 
> @@ -521,8 +524,18 @@ public class GitHistoryPage extends HistoryPage {
>  		if (db == null)
>  			return false;
>  
> +		final AnyObjectId headId;
> +		try {
> +			headId = db.resolve("HEAD");
> +		} catch (IOException e) {
> +			Activator.logError("Cannot parse HEAD in: "
> +					+ db.getDirectory().getAbsolutePath(), e);
> +			return false;
> +		}
> +
>  		if (currentWalk == null || currentWalk.getRepository() != db
> -				|| pathChange(pathFilters, paths)) {
> +				|| pathChange(pathFilters, paths)
> +				|| headId != null && !headId.equals(currentHeadId)) {
>  			currentWalk = new SWTWalk(db);

Tossing the currentWalk just because HEAD changed to a different
commit shouldn't be necessary.  Its very heavy-handed.  Clearly
there is a bug in the plotter code where the reset does not clear
state right.

For now this is a reasonable work around.  I'll try to remember
to come back and debug this case in the future as tossing the
entire SWTWalk does reduce redraw performance.

Thanks for at least coming up with the work-around.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux