|
| 1 | +--- |
| 2 | +title: generate overlay-changes |
| 3 | +intro: | |
| 4 | + [Plumbing] Generate a file that can be used for the |
| 5 | +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 |
| 6 | + fpt: '*' |
| 7 | + ghec: '*' |
| 8 | + ghes: '*' |
| 9 | +topics: |
| 10 | + - Code Security |
| 11 | + - Code scanning |
| 12 | + - CodeQL |
| 13 | +type: reference |
| 14 | +product: '{% data reusables.gated-features.codeql %}' |
| 15 | +autogenerated: codeql-cli |
| 16 | +--- |
| 17 | + |
| 18 | +<!-- Content after this section is automatically generated --> |
| 19 | + |
| 20 | +{% data reusables.codeql-cli.man-pages-version-note %} |
| 21 | + |
| 22 | +## Synopsis |
| 23 | + |
| 24 | +```shell copy |
| 25 | +codeql generate overlay-changes [--source-root=<dir>] [--output=<file>] <options>... -- <database> |
| 26 | +``` |
| 27 | + |
| 28 | +## Description |
| 29 | + |
| 30 | +\[Plumbing] Generate a file that can be used for the |
| 31 | +`--overlay-changes` option to |
| 32 | +[codeql database create](/code-security/codeql-cli/codeql-cli-manual/database-create) when extracting an overlay database. |
| 33 | + |
| 34 | +This command is intended to be used mostly for manual or automated |
| 35 | +testing. It is not particularly efficient. For production use, consider |
| 36 | +if the changes file can instead be derived from something like |
| 37 | +`git diff --name-only`. |
| 38 | + |
| 39 | +## Options |
| 40 | + |
| 41 | +### Primary Options |
| 42 | + |
| 43 | +#### `<database>` |
| 44 | + |
| 45 | +\[Mandatory] Path to the _base_ database into which the overlay will be |
| 46 | +extracted. |
| 47 | + |
| 48 | +#### `-s, --source-root=<dir>` |
| 49 | + |
| 50 | +The directory containing the source code to be extracted as an overlay. |
| 51 | +If not given, the current working directory is used. |
| 52 | + |
| 53 | +#### `-o, --output=<file>` |
| 54 | + |
| 55 | +The changes file will be written to this location. If it is not |
| 56 | +specified, the changes will be written to standard output. |
| 57 | + |
| 58 | +### Common options |
| 59 | + |
| 60 | +#### `-h, --help` |
| 61 | + |
| 62 | +Show this help text. |
| 63 | + |
| 64 | +#### `-J=<opt>` |
| 65 | + |
| 66 | +\[Advanced] Give option to the JVM running the command. |
| 67 | + |
| 68 | +(Beware that options containing spaces will not be handled correctly.) |
| 69 | + |
| 70 | +#### `-v, --verbose` |
| 71 | + |
| 72 | +Incrementally increase the number of progress messages printed. |
| 73 | + |
| 74 | +#### `-q, --quiet` |
| 75 | + |
| 76 | +Incrementally decrease the number of progress messages printed. |
| 77 | + |
| 78 | +#### `--verbosity=<level>` |
| 79 | + |
| 80 | +\[Advanced] Explicitly set the verbosity level to one of errors, |
| 81 | +warnings, progress, progress+, progress++, progress+++. Overrides `-v` |
| 82 | +and `-q`. |
| 83 | + |
| 84 | +#### `--logdir=<dir>` |
| 85 | + |
| 86 | +\[Advanced] Write detailed logs to one or more files in the given |
| 87 | +directory, with generated names that include timestamps and the name of |
| 88 | +the running subcommand. |
| 89 | + |
| 90 | +(To write a log file with a name you have full control over, instead |
| 91 | +give `--log-to-stderr` and redirect stderr as desired.) |
| 92 | + |
| 93 | +#### `--common-caches=<dir>` |
| 94 | + |
| 95 | +\[Advanced] Controls the location of cached data on disk that will |
| 96 | +persist between several runs of the CLI, such as downloaded QL packs and |
| 97 | +compiled query plans. If not set explicitly, this defaults to a |
| 98 | +directory named `.codeql` in the user's home directory; it will be |
| 99 | +created if it doesn't already exist. |
| 100 | + |
| 101 | +Available since `v2.15.2`. |
0 commit comments