private void StageSubmodule()
        {
            using (var form = new FormStatus(ProcessStart, string.Format(_stageFilename.Text, _filename)))
            {
                form.ShowDialogOnError(this);
            }

            void ProcessStart(FormStatus form)
            {
                form.AddMessageLine(string.Format(_stageFilename.Text, _filename));
                string output = Module.RunGitCmd($"add -- \"{_filename}\"");

                form.AddMessageLine(output);
                form.Done(string.IsNullOrEmpty(output));
            }
        }
        private void StageFile(string filename)
        {
            using (var form = new FormStatus(ProcessStart, string.Format(_stageFilename.Text, filename)))
            {
                form.ShowDialogOnError(this);
            }

            void ProcessStart(FormStatus form)
            {
                form.AddMessageLine(string.Format(_stageFilename.Text, filename));
                string output = Module.RunGitCmd("add -- \"" + filename + "\"");

                form.AddMessageLine(output);
                form.Done(isSuccess: string.IsNullOrWhiteSpace(output));
            }
        }
Example #3
0
        private void StageSubmodule()
        {
            using (var form = new FormStatus(ProcessStart, string.Format(_stageFilename.Text, _filename)))
            {
                form.ShowDialogOnError(this);
            }

            void ProcessStart(FormStatus form)
            {
                form.AddMessageLine(string.Format(_stageFilename.Text, _filename));
                var args = new GitArgumentBuilder("add")
                {
                    "--",
                    _filename.QuoteNE()
                };
                string output = Module.RunGitCmd(args);

                form.AddMessageLine(output);
                form.Done(isSuccess: string.IsNullOrWhiteSpace(output));
            }
        }