# DiffHead(AssetList, bool)

> Starts a task for showing a diff of the given assets versus their head revision.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.VersionControl](/engine/6000.6/script-reference/unityeditor/versioncontrol.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static Task DiffHead(AssetList assets, bool includingMetaFiles)
```

### Parameters

**** (\[AssetList]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/assetlist)): List of assets to diff.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether or not to include the .meta file.

### Returns

| Type                                                                       | Description |
| -------------------------------------------------------------------------- | ----------- |
| [Task](/engine/6000.6/script-reference/unityeditor/versioncontrol/task.md) |             |

### Remarks

Do note that some asset types do not save their changes to disk right after making them so it is recommended to manually save the asset using [AssetDatabase.SaveAssets](/engine/6000.6/script-reference/unityeditor/assetdatabase/saveassets.md) before calling the diff tool.

### Examples

```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Diff")]
    public static void ExampleDiff()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        AssetDatabase.SaveAssets();
        Provider.DiffHead(assets, includingMetaFiles: false);
    }
}
```
