Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show branch name near commit message box #74495

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@importnetminecraft
Copy link

commented May 28, 2019

resolves #73644

@msftclas

This comment has been minimized.

Copy link

commented May 28, 2019

CLA assistant check
All CLA requirements met.

@kieferrm kieferrm requested a review from joaomoreno May 29, 2019

@@ -626,6 +626,10 @@ export class Repository implements Disposable {
this.status();
}

updateInputBox() {
this._sourceControl.inputBox.placeholder = 'Message ({0} to commit to ' + (this._HEAD ? this._HEAD.name || '' : '') + ')';

This comment has been minimized.

Copy link
@burknator

burknator Jun 11, 2019

Contributor

I'm pretty sure this breaks the localization of the string.

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Jun 12, 2019

Member

@burknator Is right. Let's fix this.

Also, if this._HEAD doesn't exist, the message will become Message ({0} to commit to ). Let's fix that too.

@@ -577,7 +577,7 @@ export class Repository implements Disposable {

const root = Uri.file(repository.root);
this._sourceControl = scm.createSourceControl('git', 'Git', root);
this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message (press {0} to commit)");
this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message ({0} to commit)");

This comment has been minimized.

Copy link
@burknator

burknator Jun 11, 2019

Contributor

I think if you use this.onDidRunGitStatus() to set the placeholder whenever something in the repository changes would replace your updateInputBox() method (see my PR #75295).

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Jun 12, 2019

Member

Let's just call updateInputBox() here.

@@ -626,6 +626,10 @@ export class Repository implements Disposable {
this.status();
}

updateInputBox() {
this._sourceControl.inputBox.placeholder = 'Message ({0} to commit to ' + (this._HEAD ? this._HEAD.name || '' : '') + ')';

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Jun 12, 2019

Member

@burknator Is right. Let's fix this.

Also, if this._HEAD doesn't exist, the message will become Message ({0} to commit to ). Let's fix that too.

@@ -577,7 +577,7 @@ export class Repository implements Disposable {

const root = Uri.file(repository.root);
this._sourceControl = scm.createSourceControl('git', 'Git', root);
this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message (press {0} to commit)");
this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message ({0} to commit)");

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Jun 12, 2019

Member

Let's just call updateInputBox() here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.