sf-git-merge-driver 1.2.1-dev-137.18569178375-1 → 1.2.1-dev-137.18912604948-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -105,6 +105,37 @@ Configured for these metadata files by default:
105
105
  *.objectTranslation-meta.xml merge=salesforce-source
106
106
  ```
107
107
 
108
+ ## How to disable it for a specific merge
109
+
110
+ When you don't want to use the merge driver for a specific merge, just backup the `.git/info/attributes` file and put it back after the merge.
111
+ ```sh
112
+ mv .git/info/attributes .git/info/attributes.bak
113
+ git merge <branche>
114
+ mv .git/info/attributes.bak .git/info/attributes
115
+ ```
116
+
117
+ If you want to disable the merge driver for a specific file, just comment the merge driver configuration from the `.git/info/attributes` file.
118
+ ```sh
119
+ # *.profile-meta.xml merge=salesforce-source
120
+ ```
121
+
122
+ If you want to disable it for all the project, just uninstall the driver:
123
+ ```sh
124
+ sf git merge driver uninstall
125
+ ```
126
+
127
+ ## How to know if it is installed and enabled ?
128
+
129
+ You can check if the merge driver is installed by running the following command:
130
+ ```sh
131
+ git config --show-origin --get-regexp '^merge.salesforce-source(\..*)?'
132
+ ```
133
+
134
+ You can check if the merge driver is enabled by running the following command:
135
+ ```sh
136
+ grep "merge=salesforce-source" .git/info/attributes
137
+ ```
138
+
108
139
  ## Troubleshooting
109
140
 
110
141
  The plugin uses the [Salesforce CLI logging system](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_log_messages.htm) to log information.
@@ -125,6 +156,111 @@ GIT_TRACE=true
125
156
  git merge ...
126
157
  ```
127
158
 
159
+ ## Commands
160
+
161
+ <!-- commands -->
162
+ * [`sf git merge driver install`](#sf-git-merge-driver-install)
163
+ * [`sf git merge driver run`](#sf-git-merge-driver-run)
164
+ * [`sf git merge driver uninstall`](#sf-git-merge-driver-uninstall)
165
+
166
+ ## `sf git merge driver install`
167
+
168
+ Installs a local git merge driver for the given org and branch.
169
+
170
+ ```
171
+ USAGE
172
+ $ sf git merge driver install [--json] [--flags-dir <value>]
173
+
174
+ GLOBAL FLAGS
175
+ --flags-dir=<value> Import flag values from a directory.
176
+ --json Format output as json.
177
+
178
+ DESCRIPTION
179
+ Installs a local git merge driver for the given org and branch.
180
+
181
+ Installs a local git merge driver for the given org and branch, by updating the `.git/info/attributes` files in the
182
+ project, creating a new merge driver configuration in the `.git/config` of the project, and installing the binary in
183
+ the node_modules/.bin directory.
184
+
185
+ EXAMPLES
186
+ Install the driver for a given project:
187
+
188
+ $ sf git merge driver install
189
+ ```
190
+
191
+ _See code: [src/commands/git/merge/driver/install.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-137.18912604948-1/src/commands/git/merge/driver/install.ts)_
192
+
193
+ ## `sf git merge driver run`
194
+
195
+ Runs the merge driver for the specified files.
196
+
197
+ ```
198
+ USAGE
199
+ $ sf git merge driver run -O <value> -A <value> -B <value> -P <value> [--json] [--flags-dir <value>] [-L <value>] [-S
200
+ <value>] [-X <value>] [-Y <value>]
201
+
202
+ FLAGS
203
+ -A, --local-file=<value> (required) path to our version of the file
204
+ -B, --other-file=<value> (required) path to their version of the file
205
+ -L, --conflict-marker-size=<value> [default: 7] number of characters to show for conflict markers
206
+ -O, --ancestor-file=<value> (required) path to the common ancestor version of the file
207
+ -P, --output-file=<value> (required) path to the file where the merged content will be written
208
+ -S, --ancestor-conflict-tag=<value> [default: BASE] string used to tag ancestor version in conflicts
209
+ -X, --local-conflict-tag=<value> [default: LOCAL] string used to tag local version in conflicts
210
+ -Y, --other-conflict-tag=<value> [default: REMOTE] string used to tag other version in conflicts
211
+
212
+ GLOBAL FLAGS
213
+ --flags-dir=<value> Import flag values from a directory.
214
+ --json Format output as json.
215
+
216
+ DESCRIPTION
217
+ Runs the merge driver for the specified files.
218
+
219
+ Runs the merge driver for the specified files, handling the merge conflict resolution using Salesforce-specific merge
220
+ strategies. This command is typically called automatically by Git when a merge conflict is detected.
221
+
222
+ EXAMPLES
223
+ Run the merge driver for conflicting files:
224
+
225
+ $ sf git merge driver run --ancestor-file=<value> --local-file=<value> --other-file=<value> \
226
+ --output-file=<value>
227
+
228
+ Where:
229
+ - ancestor-file is the path to the common ancestor version of the file
230
+ - local-file is the path to our version of the file
231
+ - other-file is the path to their version of the file
232
+ - output-file is the path to the file where the merged content will be written
233
+ ```
234
+
235
+ _See code: [src/commands/git/merge/driver/run.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-137.18912604948-1/src/commands/git/merge/driver/run.ts)_
236
+
237
+ ## `sf git merge driver uninstall`
238
+
239
+ Uninstalls the local git merge driver for the given org and branch.
240
+
241
+ ```
242
+ USAGE
243
+ $ sf git merge driver uninstall [--json] [--flags-dir <value>]
244
+
245
+ GLOBAL FLAGS
246
+ --flags-dir=<value> Import flag values from a directory.
247
+ --json Format output as json.
248
+
249
+ DESCRIPTION
250
+ Uninstalls the local git merge driver for the given org and branch.
251
+
252
+ Uninstalls the local git merge driver for the given org and branch, by removing the merge driver content in the
253
+ `.git/info/attributes` files in the project, deleting the merge driver configuration from the `.git/config` of the
254
+ project, and removing the installed binary from the node_modules/.bin directory.
255
+
256
+ EXAMPLES
257
+ Uninstall the driver for a given project:
258
+
259
+ $ sf git merge driver uninstall
260
+ ```
261
+
262
+ _See code: [src/commands/git/merge/driver/uninstall.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-137.18912604948-1/src/commands/git/merge/driver/uninstall.ts)_
263
+ <!-- commandsstop -->
128
264
  ## Changelog
129
265
 
130
266
  [changelog.md](CHANGELOG.md) is available for consultation.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "sf-git-merge-driver",
3
- "version": "1.2.1-dev-137.18569178375-1",
3
+ "version": "1.2.1-dev-137.18912604948-1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "sf-git-merge-driver",
9
- "version": "1.2.1-dev-137.18569178375-1",
9
+ "version": "1.2.1-dev-137.18912604948-1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@oclif/core": "^4.5.6",
@@ -284,5 +284,5 @@
284
284
  ]
285
285
  }
286
286
  },
287
- "version": "1.2.1-dev-137.18569178375-1"
287
+ "version": "1.2.1-dev-137.18912604948-1"
288
288
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-git-merge-driver",
3
3
  "description": "git remote add origin git@github.com:scolladon/sf-git-merge-driver.git",
4
- "version": "1.2.1-dev-137.18569178375-1",
4
+ "version": "1.2.1-dev-137.18912604948-1",
5
5
  "exports": "./lib/driver/MergeDriver.js",
6
6
  "type": "module",
7
7
  "author": "Sébastien Colladon (colladonsebastien@gmail.com)",