1datalad diff(1)             General Commands Manual            datalad diff(1)
2
3
4

NAME

6       datalad  diff - report differences between two states of a dataset (hi‐
7       erarchy)
8

SYNOPSIS

10       datalad diff [-h] [-f REVISION] [-t  REVISION]  [-d  DATASET]  [--annex
11              [{basic|availability|all}]]  [--untracked  {no|normal|all}] [-r]
12              [-R LEVELS] [--version] [PATH ...]
13
14
15

DESCRIPTION

17       The two to-be-compared states are given via the  --from  and  --to  op‐
18       tions.   These  state  identifiers  are evaluated in the context of the
19       (specified or detected) dataset. In the case of a recursive report on a
20       dataset hierarchy, corresponding state pairs for any subdataset are de‐
21       termined from the subdataset record in the respective superdataset. On‐
22       ly  changes  recorded  in a subdataset between these two states are re‐
23       ported, and so on.
24
25       Any paths given as additional arguments will be used to  constrain  the
26       difference  report.  As with Git's diff, it will not result in an error
27       when a path is specified that does not exist on the filesystem.
28
29       Reports are very similar to those of the STATUS command, with the  dis‐
30       tinguished content types and states being identical.
31
32   Examples
33       Show unsaved changes in a dataset::
34
35        % datalad diff
36
37       Compare  a  previous dataset state identified by shasum against current
38       worktree::
39
40        % datalad diff --from <SHASUM>
41
42       Compare two branches against each other::
43
44        % datalad diff --from branch1 --to branch2
45
46       Show unsaved changes in the dataset and potential subdatasets::
47
48        % datalad diff -r
49
50       Show unsaved changes made to a particular file::
51
52        % datalad diff <path/to/file>
53
54

OPTIONS

56       PATH   path to constrain the report to. Constraints: value  must  be  a
57              string or value must be NONE
58
59
60       -h, --help, --help-np
61              show this help message. --help-np forcefully disables the use of
62              a pager for displaying the help message
63
64       -f REVISION, --from REVISION
65              original state to compare to, as given by  any  identifier  that
66              Git  understands.  Constraints: value must be a string [Default:
67              'HEAD']
68
69       -t REVISION, --to REVISION
70              state to compare against the original state,  as  given  by  any
71              identifier that Git understands. If none is specified, the state
72              of the working tree will be compared. Constraints: value must be
73              a string or value must be NONE
74
75       -d DATASET, --dataset DATASET
76              specify the dataset to query. If no dataset is given, an attempt
77              is made to identify the dataset based on the current working di‐
78              rectory. Constraints: Value must be a Dataset or a valid identi‐
79              fier of a Dataset (e.g. a path) or value must be NONE
80
81       --annex [{basic|availability|all}]
82              Switch whether to include information on the  annex  content  of
83              individual  files  in  the  status report, such as recorded file
84              size. By default no  annex  information  is  reported  (faster).
85              Three  report  modes  are available: basic information like file
86              size and key name ('basic'); additionally test whether file con‐
87              tent is present in the local annex ('availability'; requires one
88              or two additional file system stat calls, but does not call git-
89              annex), this will add the result properties 'has_content' (bool‐
90              ean flag) and 'objloc' (absolute path to an existing  annex  ob‐
91              ject file); or 'all' which will report all available information
92              (presently identical to 'availability'). The 'basic'  mode  will
93              be  assumed when this option is given, but no mode is specified.
94              Constraints: value must  be  one  of  ('basic',  'availability',
95              'all')
96
97       --untracked {no|normal|all}
98              If  and how untracked content is reported when comparing a revi‐
99              sion to the state of the working tree. 'no': no  untracked  con‐
100              tent is reported; 'normal': untracked files and entire untracked
101              directories are reported as such; 'all': report individual files
102              even  in fully untracked directories. Constraints: value must be
103              one of ('no', 'normal', 'all') [Default: 'normal']
104
105       -r, --recursive
106              if set, recurse into potential subdatasets.
107
108       -R LEVELS, --recursion-limit LEVELS
109              limit recursion into subdatasets to the given number of  levels.
110              Constraints:  value  must  be convertible to type 'int' or value
111              must be NONE
112
113       --version
114              show the module and its version which provides the command
115

AUTHORS

117        datalad is developed by The DataLad Team and Contributors <team@datal‐
118       ad.org>.
119
120
121
122datalad diff 0.19.3               2023-08-11                   datalad diff(1)
Impressum