datalad-diff.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" >
  3. <head>
  4. <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>datalad diff &mdash; DataLad 0.17.2+0.g22b26884e.dirty documentation</title>
  7. <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  8. <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  9. <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  10. <link rel="shortcut icon" href="../../_static/favicon.ico"/>
  11. <link rel="canonical" href="http://docs.datalad.org/en/stable/generated/man/datalad-diff.html" />
  12. <!--[if lt IE 9]>
  13. <script src="../../_static/js/html5shiv.min.js"></script>
  14. <![endif]-->
  15. <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
  16. <script src="../../_static/jquery.js"></script>
  17. <script src="../../_static/underscore.js"></script>
  18. <script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
  19. <script src="../../_static/doctools.js"></script>
  20. <script async="async" src="/_/static/javascript/readthedocs-doc-embed.js"></script>
  21. <script src="../../_static/js/theme.js"></script>
  22. <link rel="index" title="Index" href="../../genindex.html" />
  23. <link rel="search" title="Search" href="../../search.html" />
  24. <link rel="next" title="datalad clone" href="datalad-clone.html" />
  25. <link rel="prev" title="datalad status" href="datalad-status.html" />
  26. <!-- RTD Extra Head -->
  27. <link rel="stylesheet" href="/_/static/css/readthedocs-doc-embed.css" type="text/css" />
  28. <script type="application/json" id="READTHEDOCS_DATA">{"ad_free": false, "api_host": "https://readthedocs.org", "build_date": "2022-07-16T13:12:19Z", "builder": "sphinx", "canonical_url": null, "commit": "22b26884", "docroot": "/docs/source/", "features": {"docsearch_disabled": false}, "global_analytics_code": "UA-17997319-1", "language": "en", "page": "generated/man/datalad-diff", "programming_language": "py", "project": "datalad", "proxied_api_host": "/_", "source_suffix": ".rst", "subprojects": {"datalad-catalog": "http://docs.datalad.org/projects/catalog/en/latest/", "datalad-container": "http://docs.datalad.org/projects/container/en/latest/", "datalad-crawler": "http://docs.datalad.org/projects/crawler/en/latest/", "datalad-dataverse": "http://docs.datalad.org/projects/datalad-dataverse/en/latest/", "datalad-deprecated": "http://docs.datalad.org/projects/deprecated/en/latest/", "datalad-hirni": "http://docs.datalad.org/projects/hirni/en/latest/", "datalad-metalad": "http://docs.datalad.org/projects/metalad/en/latest/", "datalad-mihextras": "http://docs.datalad.org/projects/mihextras/en/latest/", "datalad-neuroimaging": "http://docs.datalad.org/projects/neuroimaging/en/latest/", "datalad-next": "http://docs.datalad.org/projects/next/en/latest/", "datalad-osf": "http://docs.datalad.org/projects/osf/en/latest/", "datalad-ukbiobank": "http://docs.datalad.org/projects/ukbiobank/en/latest/", "datalad-xnat": "http://docs.datalad.org/projects/datalad-xnat/en/latest/"}, "theme": "sphinx_rtd_theme", "user_analytics_code": "", "version": "stable"}</script>
  29. <!--
  30. Using this variable directly instead of using `JSON.parse` is deprecated.
  31. The READTHEDOCS_DATA global variable will be removed in the future.
  32. -->
  33. <script type="text/javascript">
  34. READTHEDOCS_DATA = JSON.parse(document.getElementById('READTHEDOCS_DATA').innerHTML);
  35. </script>
  36. <script type="text/javascript" src="/_/static/javascript/readthedocs-analytics.js" async="async"></script>
  37. <!-- end RTD <extrahead> -->
  38. </head>
  39. <body class="wy-body-for-nav">
  40. <div class="wy-grid-for-nav">
  41. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  42. <div class="wy-side-scroll">
  43. <div class="wy-side-nav-search" >
  44. <a href="../../index.html" class="icon icon-home"> DataLad
  45. <img src="../../_static/datalad_logo.png" class="logo" alt="Logo"/>
  46. </a>
  47. <div class="version">
  48. stable
  49. </div>
  50. <div role="search">
  51. <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
  52. <input type="text" name="q" placeholder="Search docs" />
  53. <input type="hidden" name="check_keywords" value="yes" />
  54. <input type="hidden" name="area" value="default" />
  55. </form>
  56. </div>
  57. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  58. <ul>
  59. <li class="toctree-l1"><a class="reference internal" href="../../changelog.html">Change log</a></li>
  60. <li class="toctree-l1"><a class="reference internal" href="../../acknowledgements.html">Acknowledgments</a></li>
  61. <li class="toctree-l1"><a class="reference internal" href="../../publications.html">Publications</a></li>
  62. </ul>
  63. <ul>
  64. <li class="toctree-l1"><a class="reference internal" href="../../background.html">Background and motivation</a></li>
  65. <li class="toctree-l1"><a class="reference internal" href="../../related.html">Delineation from related solutions</a></li>
  66. <li class="toctree-l1"><a class="reference internal" href="../../basics.html">Basic principles</a></li>
  67. <li class="toctree-l1"><a class="reference internal" href="../../credentials.html">Credentials</a></li>
  68. <li class="toctree-l1"><a class="reference internal" href="../../metadata.html">Metadata</a></li>
  69. <li class="toctree-l1"><a class="reference internal" href="../../customization.html">Customization and extension of functionality</a></li>
  70. <li class="toctree-l1"><a class="reference internal" href="../../design/index.html">Design</a></li>
  71. <li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
  72. </ul>
  73. <ul class="current">
  74. <li class="toctree-l1 current"><a class="reference internal" href="../../cmdline.html">Command line reference</a><ul class="current">
  75. <li class="toctree-l2"><a class="reference internal" href="../../cmdline.html#main-command">Main command</a></li>
  76. <li class="toctree-l2 current"><a class="reference internal" href="../../cmdline.html#core-commands">Core commands</a><ul class="current">
  77. <li class="toctree-l3 current"><a class="reference internal" href="../../cmdline.html#local-operation">Local operation</a><ul class="current">
  78. <li class="toctree-l4"><a class="reference internal" href="datalad-create.html">datalad create: Create a new dataset</a></li>
  79. <li class="toctree-l4"><a class="reference internal" href="datalad-save.html">datalad save: Save the state of a dataset</a></li>
  80. <li class="toctree-l4"><a class="reference internal" href="datalad-run.html">datalad run: Run a shell command and record its impact on a dataset</a></li>
  81. <li class="toctree-l4"><a class="reference internal" href="datalad-status.html">datalad status: Report on the state of dataset content</a></li>
  82. <li class="toctree-l4 current"><a class="current reference internal" href="#">datalad diff: Report differences between two states of a dataset</a></li>
  83. </ul>
  84. </li>
  85. <li class="toctree-l3"><a class="reference internal" href="../../cmdline.html#distributed-operation">Distributed operation</a></li>
  86. </ul>
  87. </li>
  88. <li class="toctree-l2"><a class="reference internal" href="../../cmdline.html#extended-set-of-functionality">Extended set of functionality</a></li>
  89. </ul>
  90. </li>
  91. <li class="toctree-l1"><a class="reference internal" href="../../modref.html">Python module reference</a></li>
  92. <li class="toctree-l1"><a class="reference internal" href="../../config.html">Configuration</a></li>
  93. </ul>
  94. </div>
  95. </div>
  96. </nav>
  97. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  98. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  99. <a href="../../index.html">DataLad</a>
  100. </nav>
  101. <div class="wy-nav-content">
  102. <div class="rst-content">
  103. <div role="navigation" aria-label="Page navigation">
  104. <ul class="wy-breadcrumbs">
  105. <li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
  106. <li><a href="../../cmdline.html">Command line reference</a> &raquo;</li>
  107. <li>datalad diff</li>
  108. <li class="wy-breadcrumbs-aside">
  109. <a href="https://github.com/datalad/datalad/blob/22b26884e04e6940cfa389afd91fd673f510c438/docs/source/generated/man/datalad-diff.rst" class="fa fa-github"> Edit on GitHub</a>
  110. </li>
  111. </ul>
  112. <hr/>
  113. </div>
  114. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  115. <div itemprop="articleBody">
  116. <section id="datalad-diff">
  117. <span id="man-datalad-diff"></span><h1>datalad diff<a class="headerlink" href="#datalad-diff" title="Permalink to this heading"></a></h1>
  118. <section id="synopsis">
  119. <h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
  120. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">datalad</span> <span class="n">diff</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">f</span> <span class="n">REVISION</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">t</span> <span class="n">REVISION</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">d</span> <span class="n">DATASET</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">annex</span> <span class="p">[</span><span class="n">MODE</span><span class="p">]]</span>
  121. <span class="p">[</span><span class="o">--</span><span class="n">untracked</span> <span class="n">MODE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">r</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">R</span> <span class="n">LEVELS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">version</span><span class="p">]</span> <span class="p">[</span><span class="n">PATH</span> <span class="o">...</span><span class="p">]</span>
  122. </pre></div>
  123. </div>
  124. </section>
  125. <section id="description">
  126. <h2>Description<a class="headerlink" href="#description" title="Permalink to this heading"></a></h2>
  127. <p>Report differences between two states of a dataset (hierarchy)</p>
  128. <p>The two to-be-compared states are given via the –from and –to options.
  129. These state identifiers are evaluated in the context of the (specified
  130. or detected) dataset. In the case of a recursive report on a dataset
  131. hierarchy, corresponding state pairs for any subdataset are determined
  132. from the subdataset record in the respective superdataset. Only changes
  133. recorded in a subdataset between these two states are reported, and so on.</p>
  134. <p>Any paths given as additional arguments will be used to constrain the
  135. difference report. As with Git’s diff, it will not result in an error when
  136. a path is specified that does not exist on the filesystem.</p>
  137. <p>Reports are very similar to those of the STATUS command, with the
  138. distinguished content types and states being identical.</p>
  139. <p><em>Examples</em></p>
  140. <p>Show unsaved changes in a dataset:</p>
  141. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">datalad</span> <span class="n">diff</span>
  142. </pre></div>
  143. </div>
  144. <p>Compare a previous dataset state identified by shasum against current
  145. worktree:</p>
  146. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">datalad</span> <span class="n">diff</span> <span class="o">--</span><span class="kn">from</span> <span class="o">&lt;</span><span class="n">SHASUM</span><span class="o">&gt;</span>
  147. </pre></div>
  148. </div>
  149. <p>Compare two branches against each other:</p>
  150. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">datalad</span> <span class="n">diff</span> <span class="o">--</span><span class="kn">from</span> <span class="nn">branch1</span> <span class="o">--</span><span class="n">to</span> <span class="n">branch2</span>
  151. </pre></div>
  152. </div>
  153. <p>Show unsaved changes in the dataset and potential subdatasets:</p>
  154. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">datalad</span> <span class="n">diff</span> <span class="o">-</span><span class="n">r</span>
  155. </pre></div>
  156. </div>
  157. <p>Show unsaved changes made to a particular file:</p>
  158. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">datalad</span> <span class="n">diff</span> <span class="o">&lt;</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">file</span><span class="o">&gt;</span>
  159. </pre></div>
  160. </div>
  161. </section>
  162. <section id="options">
  163. <h2>Options<a class="headerlink" href="#options" title="Permalink to this heading"></a></h2>
  164. <section id="path">
  165. <h3>PATH<a class="headerlink" href="#path" title="Permalink to this heading"></a></h3>
  166. <p>path to contrain the report to. Constraints: value must be a string or value must be NONE</p>
  167. </section>
  168. <section id="h-help-help-np">
  169. <h3><strong>-h</strong>, <strong>-\-help</strong>, <strong>-\-help-np</strong><a class="headerlink" href="#h-help-help-np" title="Permalink to this heading"></a></h3>
  170. <p>show this help message. –help-np forcefully disables the use of a pager for displaying the help message</p>
  171. </section>
  172. <section id="f-revision-from-revision">
  173. <h3><strong>-f</strong> REVISION, <strong>-\-from</strong> REVISION<a class="headerlink" href="#f-revision-from-revision" title="Permalink to this heading"></a></h3>
  174. <p>original state to compare to, as given by any identifier that Git understands. Constraints: value must be a string [Default: ‘HEAD’]</p>
  175. </section>
  176. <section id="t-revision-to-revision">
  177. <h3><strong>-t</strong> REVISION, <strong>-\-to</strong> REVISION<a class="headerlink" href="#t-revision-to-revision" title="Permalink to this heading"></a></h3>
  178. <p>state to compare against the original state, as given by any identifier that Git understands. If none is specified, the state of the working tree will be compared. Constraints: value must be a string or value must be NONE</p>
  179. </section>
  180. <section id="d-dataset-dataset-dataset">
  181. <h3><strong>-d</strong> <em>DATASET</em>, <strong>-\-dataset</strong> <em>DATASET</em><a class="headerlink" href="#d-dataset-dataset-dataset" title="Permalink to this heading"></a></h3>
  182. <p>specify the dataset to query. If no dataset is given, an attempt is made to identify the dataset based on the current working directory. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) or value must be NONE</p>
  183. </section>
  184. <section id="annex-mode">
  185. <h3><strong>-\-annex</strong> [MODE]<a class="headerlink" href="#annex-mode" title="Permalink to this heading"></a></h3>
  186. <p>Switch whether to include information on the annex content of individual files in the status report, such as recorded file size. By default no annex information is reported (faster). Three report modes are available: basic information like file size and key name (‘basic’); additionally test whether file content is present in the local annex (‘availability’; requires one or two additional file system stat calls, but does not call git-annex), this will add the result properties ‘has_content’ (boolean flag) and ‘objloc’ (absolute path to an existing annex object file); or ‘all’ which will report all available information (presently identical to ‘availability’). The ‘basic’ mode will be assumed when this option is given, but no mode is specified. Constraints: value must be one of (‘basic’, ‘availability’, ‘all’)</p>
  187. </section>
  188. <section id="untracked-mode">
  189. <h3><strong>-\-untracked</strong> MODE<a class="headerlink" href="#untracked-mode" title="Permalink to this heading"></a></h3>
  190. <p>If and how untracked content is reported when comparing a revision to the state of the working tree. ‘no’: no untracked content is reported; ‘normal’: untracked files and entire untracked directories are reported as such; ‘all’: report individual files even in fully untracked directories. Constraints: value must be one of (‘no’, ‘normal’, ‘all’) [Default: ‘normal’]</p>
  191. </section>
  192. <section id="r-recursive">
  193. <h3><strong>-r</strong>, <strong>-\-recursive</strong><a class="headerlink" href="#r-recursive" title="Permalink to this heading"></a></h3>
  194. <p>if set, recurse into potential subdatasets.</p>
  195. </section>
  196. <section id="r-levels-recursion-limit-levels">
  197. <h3><strong>-R</strong> LEVELS, <strong>-\-recursion-limit</strong> LEVELS<a class="headerlink" href="#r-levels-recursion-limit-levels" title="Permalink to this heading"></a></h3>
  198. <p>limit recursion into subdatasets to the given number of levels. Constraints: value must be convertible to type ‘int’ or value must be NONE</p>
  199. </section>
  200. <section id="version">
  201. <h3><strong>-\-version</strong><a class="headerlink" href="#version" title="Permalink to this heading"></a></h3>
  202. <p>show the module and its version which provides the command</p>
  203. </section>
  204. </section>
  205. <section id="authors">
  206. <h2>Authors<a class="headerlink" href="#authors" title="Permalink to this heading"></a></h2>
  207. <p>datalad is developed by The DataLad Team and Contributors &lt;<a class="reference external" href="mailto:team&#37;&#52;&#48;datalad&#46;org">team<span>&#64;</span>datalad<span>&#46;</span>org</a>&gt;.</p>
  208. </section>
  209. </section>
  210. </div>
  211. </div>
  212. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  213. <a href="datalad-status.html" class="btn btn-neutral float-left" title="datalad status" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
  214. <a href="datalad-clone.html" class="btn btn-neutral float-right" title="datalad clone" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  215. </div>
  216. <hr/>
  217. <div role="contentinfo">
  218. <p>&#169; Copyright 2016-2022, DataLad team.
  219. <span class="commit">Revision <code>22b26884</code>.
  220. </span></p>
  221. </div>
  222. Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
  223. <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
  224. provided by <a href="https://readthedocs.org">Read the Docs</a>.
  225. </footer>
  226. </div>
  227. </div>
  228. </section>
  229. </div>
  230. <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="Versions">
  231. <span class="rst-current-version" data-toggle="rst-current-version">
  232. <span class="fa fa-book"> Read the Docs</span>
  233. v: stable
  234. <span class="fa fa-caret-down"></span>
  235. </span>
  236. <div class="rst-other-versions">
  237. <dl>
  238. <dt>Versions</dt>
  239. <dd><a href="/en/latest/">latest</a></dd>
  240. <dd><a href="/en/stable/">stable</a></dd>
  241. <dd><a href="/en/maint/">maint</a></dd>
  242. </dl>
  243. <dl>
  244. <dt>Downloads</dt>
  245. <dd><a href="//docs.datalad.org/_/downloads/en/stable/pdf/">pdf</a></dd>
  246. <dd><a href="//docs.datalad.org/_/downloads/en/stable/htmlzip/">html</a></dd>
  247. <dd><a href="//docs.datalad.org/_/downloads/en/stable/epub/">epub</a></dd>
  248. </dl>
  249. <dl>
  250. <dt>On Read the Docs</dt>
  251. <dd>
  252. <a href="//readthedocs.org/projects/datalad/?fromdocs=datalad">Project Home</a>
  253. </dd>
  254. <dd>
  255. <a href="//readthedocs.org/builds/datalad/?fromdocs=datalad">Builds</a>
  256. </dd>
  257. </dl>
  258. </div>
  259. </div>
  260. <script>
  261. jQuery(function () {
  262. SphinxRtdTheme.Navigation.enable(true);
  263. });
  264. </script>
  265. </body>
  266. </html>