File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 *
44 * Phrase commit changes in words.
55 *
6- * This follows the git style of using `x` and `y`. See this project's docs for more info. Note that
7- * `first` and `second` are not appropriate names as `git status` and `git diff-index` behave
8- * differently.
6+ * This follows the git style of using `x` and `y`. See this project's docs for
7+ * more info. Note that `first` and `second` are not appropriate names as `git
8+ * status` and `git diff-index` behave differently.
99 */
1010import { ACTION , ROOT } from "../lib/constants" ;
1111import { moveOrRenameFromPaths , quoteForSpaces , splitPath } from "../lib/paths" ;
Original file line number Diff line number Diff line change @@ -15,16 +15,16 @@ import { countFilesDesc } from "./count";
1515/**
1616 * Prepare a commit message based on a single changed file.
1717 *
18- * A rename can be handled too - it just requires both the paths to be staged so that git collapses
19- * D and A to a single R action.
18+ * A rename can be handled too - it just requires both the paths to be staged so
19+ * that git collapses D and A to a single R action.
2020 *
21- * Using the variable name as 'from' is not really descriptive here but the logic works. It's also
22- * possible to reverse 'from' and 'to' in `git status` and `git diff-index` output or handle just
23- * the parseDiffIndex function to make sure 'to' is always set and 'from' is null if it is not a
24- * move.
21+ * Using the variable name as 'from' is not really descriptive here but the
22+ * logic works. It's also possible to reverse 'from' and 'to' in `git status`
23+ * and `git diff-index` output or handle just the parseDiffIndex function to
24+ * make sure 'to' is always set and 'from' is null if it is not a move.
2525 *
26- * Expects a single line string that came from a `git` subcommand and returns a value like 'Update
27- * foo.txt'.
26+ * Expects a single line string that came from a `git` subcommand and returns a
27+ * value like 'Update foo.txt'.
2828 */
2929export function oneChange ( line : string ) {
3030 const { x : actionChar , from, to } = parseDiffIndex ( line ) ;
You can’t perform that action at this time.
0 commit comments