Add command to add all untracked files and fix repository refreshing

[?]
Dec 27, 2020, 10:48 PM
JYMSJCPQJYHP2OQLGDM2SBN4I7HO2ORFNRY3GB5QQIPYFSJE7JOQC

Dependencies

  • [2] H3GAPFUC Add pijul.recordAll command
  • [3] ILH3GIVT Add command centre and refresh/init commands
  • [*] B4SKYP3Y Add repository model and add steps to initialize it
  • [*] YUVLBWV3 Populate resource groups for unrecorded and untracked changes
  • [*] ZGMIJNFV Create pijul.ts for executing commands using the Pijul CLI
  • [*] NCBEWRYE Initialize Repository
  • [*] 3N3RS66T Create pijul output channel and configure activation events

Change contents

  • edit in src/repository.ts at line 60
    [6.661]
    [5.1523]
    * Add all the currently untracked files to the Pijul repository
    */
    async addAllUntrackedFiles (): Promise<void> {
    for await (const untrackedFile of this.untrackedGroup.resourceStates) {
    await this.repository.addFile(untrackedFile.resourceUri);
    }
    }
    /**
  • edit in src/pijul.ts at line 224
    [2.535]
    [6.3032]
    }
    /**
    * Add a specific file to the repository for tracking
    * @param path The URI of the file to add
    */
    async addFile (path: Uri): Promise<void> {
    await this._pijul.exec(this.repositoryRoot, ['add', path.fsPath]);
  • edit in src/commands.ts at line 80
    [3.2710]
    [3.2710]
    console.log(key);
  • edit in src/commands.ts at line 89
    [3.2961]
    [3.2961]
    // Refresh the repository
    await commands.executeCommand('pijul.refresh');
  • edit in src/commands.ts at line 111
    [3.3526][2.536:584]()
    commands.executeCommand('pijul.refresh');
  • replacement in src/commands.ts at line 145
    [2.1295][2.1295:1341]()
    commands.executeCommand('pijul.refresh');
    [2.1295]
    [2.1341]
    await repository.refreshStatus();
    }
    /**
    * Add all the currently untracked files to the Pijul repository
    * @param repository The repository the untracked files will be added to
    */
    @command('pijul.addAll', { repository: true })
    async addAll (repository: Repository): Promise<void> {
    await repository.addAllUntrackedFiles();
    await repository.refreshStatus();
  • edit in package.json at line 39
    [9.1446]
    [8.108628]
    },
    {
    "command": "pijul.addAll",
    "title": "Add All Untracked Files",
    "category": "Pijul"