@@ -14,11 +14,34 @@ pub struct Args {
14
14
15
15
#[ derive( Debug , clap:: Subcommand ) ]
16
16
pub enum Subcommands {
17
- /// Extract a file’s history so that its blame shows the same characteristics, in particular
18
- /// bugs, as the original, but in a way that can't be traced back uniquely to its source .
17
+ /// Generate a shell script that creates a git repository containing all commits that are
18
+ /// traversed when a blame is generated .
19
19
///
20
- /// The idea is that we don't want to deal with licensing, it's more about patterns in order to
21
- /// reproduce cases for tests.
20
+ /// This command extracts the file’s history so that blame, when run on the repository created
21
+ /// by the script, shows the same characteristics, in particular bugs, as the original, but in
22
+ /// a way that the original source file's content cannot be reconstructed.
23
+ ///
24
+ /// The idea is that by obfuscating the file's content we make it easier for people to share
25
+ /// the subset of data that's required for debugging purposes from repositories that are not
26
+ /// public.
27
+ ///
28
+ /// Note that the obfuscation leaves certain properties of the source intact, so they can still
29
+ /// be inferred from the extracted history. Among these properties are directory structure
30
+ /// (though not the directories' names), renames, number of lines, and whitespace.
31
+ ///
32
+ /// This command can also be helpful in debugging the blame algorithm itself.
33
+ ///
34
+ /// ### Terminology
35
+ ///
36
+ /// A **blame history** is the set of commits that the blame algorithm, at some point, treated
37
+ /// as potential suspects for any line in a file. It is a subset of all commits that ever
38
+ /// changed a file in its history.
39
+ ///
40
+ /// With respect to branches and merge commits, the **blame history** will not necessarily be
41
+ /// identical to the file's history in the source repository. This is because the blame
42
+ /// algorithm will stop following a file's history for branches that only touch lines for which
43
+ /// the source has already been found. The **blame history**, thus, looks likely "cleaner" and
44
+ /// "simpler" than the source history.
22
45
#[ clap( visible_alias = "bcr" ) ]
23
46
BlameCopyRoyal {
24
47
/// Don't really copy anything.
@@ -32,9 +55,8 @@ pub enum Subcommands {
32
55
file : std:: ffi:: OsString ,
33
56
/// Do not use `copy-royal` to obfuscate the content of blobs, but copy it verbatim.
34
57
///
35
- /// Note that this should only be done if the source repository only contains information
36
- /// you’re willing to share. Also note that the obfuscation leaves the structure of the
37
- /// source intact, so a few of its properties can still be inferred.
58
+ /// Note that this should only be done if the source history does not contain information
59
+ /// you're not willing to share.
38
60
#[ clap( long) ]
39
61
verbatim : bool ,
40
62
} ,
0 commit comments