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

vscode appends git diff to commit message #3468

Open
vscodebot bot opened this issue Mar 12, 2020 · 0 comments
Open

vscode appends git diff to commit message #3468

vscodebot bot opened this issue Mar 12, 2020 · 0 comments

Comments

@vscodebot
Copy link

vscodebot bot commented Mar 12, 2020

  • VSCode Version: 1.43.0
  • OS Version: macOS Catalina 10.15.3

Steps to Reproduce:

  1. Set vscode as default editor for git git config --global core.editor "code --wait"
  2. Take following Angular component:
import { Component, ViewChild, ElementRef, OnInit } from '!angular/core';
import { ThemeConstantService } from '../shared/services/theme-constant.service';

!Component({
  templateUrl: './dashboard.component.html',
  styles: [
    `
      !media only screen and (min-width: 992px) {
        .completion-chart {
          width: calc(100% - 330px);
        }
      }
    `
  ]
})
export class ProjectsDashboardComponent implements OnInit {
  constructor(private colorConfig: ThemeConstantService) {}
  themeColors = this.colorConfig.get().colors;
  blue = this.themeColors.blue;
  blueLight = this.themeColors.blueLight;
  cyan = this.themeColors.cyan;
  cyanLight = this.themeColors.cyanLight;
  gold = this.themeColors.gold;
  purple = this.themeColors.purple;
  purpleLight = this.themeColors.purpleLight;
  red = this.themeColors.red;
  transparent = this.themeColors.transparent;

  !ViewChild('completionChart', { static: true }) canvas: ElementRef;

  completionChartData: Array<any> = [
    {
      data: [30, 60, 40, 50, 40, 55, 85, 65, 75, 50, 70],
      label: 'Series A'
    }
  ];
  currentcompletionChartLabelsIdx = 1;
  completionChartLabels: Array<any> = [
    '16th',
    '17th',
    '18th',
    '19th',
    '20th',
    '21th',
    '22th',
    '23th',
    '24th',
    '25th',
    '26th'
  ];
  completionChartOptions: any = {
    maintainAspectRatio: false,
    responsive: true,
    hover: {
      mode: 'nearest',
      intersect: true
    },
    tooltips: {
      mode: 'index'
    },
    elements: {
      line: {
        tension: 0,
        borderWidth: 2
      }
    },
    scales: {
      xAxes: [
        {
          gridLines: [
            {
              display: false
            }
          ],
          ticks: {
            display: true,
            fontColor: this.themeColors.grayLight,
            fontSize: 13,
            padding: 10
          }
        }
      ],
      yAxes: [
        {
          gridLines: {
            drawBorder: false,
            drawTicks: false,
            borderDash: [3, 4],
            zeroLineWidth: 1,
            zeroLineBorderDash: [3, 4]
          },
          ticks: {
            display: true,
            max: 100,
            stepSize: 20,
            fontColor: this.themeColors.grayLight,
            fontSize: 13,
            padding: 10
          }
        }
      ]
    }
  };
  completionChartColors;
  completionChartType = 'line';

  projectList = [
    {
      project: 'Mind Cog App',
      avatar: 'assets/images/others/thumb-1.jpg',
      status: 'Ready',
      tasks: '31',
      progress: 100
    },
    {
      project: 'Mill Estate',
      avatar: 'assets/images/others/thumb-2.jpg',
      status: 'In Progress',
      tasks: '56',
      progress: 76
    },
    {
      project: 'Eastern Sack',
      avatar: 'assets/images/others/thumb-3.jpg',
      status: 'In Progress',
      tasks: '21',
      progress: 87
    },
    {
      project: 'Fortier Studio',
      avatar: 'assets/images/others/thumb-5.jpg',
      status: 'In Progress',
      tasks: '18',
      progress: 68
    },
    {
      project: 'Indi Web',
      avatar: 'assets/images/others/thumb-6.jpg',
      status: 'Behind',
      tasks: '165',
      progress: 28
    }
  ];

  memberList = [
    {
      name: 'Erin Gonzales',
      img: 'assets/images/avatars/thumb-1.jpg',
      mail: 'erin.gon!gmail.com'
    },
    {
      name: 'Darryl Day',
      img: 'assets/images/avatars/thumb-2.jpg',
      mail: 'darryl.d!gmail.com'
    },
    {
      name: 'Marshall Nichols',
      img: 'assets/images/avatars/thumb-3.jpg',
      mail: 'marshalln!gmail.com'
    },
    {
      name: 'Virgil Gonzales',
      img: 'assets/images/avatars/thumb-4.jpg',
      mail: 'virgil14!gmail.com'
    },
    {
      name: 'Nicole Wyne',
      img: 'assets/images/avatars/thumb-5.jpg',
      mail: 'nicolew!gmail.com'
    },
    {
      name: 'Riley Newman',
      img: 'assets/images/avatars/thumb-6.jpg',
      mail: 'rileyn93!gmail.com'
    },
    {
      name: 'Pamela Wanda',
      img: 'assets/images/avatars/thumb-7.jpg',
      mail: 'pamelaw!gmail.com'
    }
  ];

  activityList = [
    {
      name: 'Virgil Gonzales',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'Prototype Design',
      actionType: 'completed'
    },
    {
      name: 'Marshall Nichols',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'Documentation',
      actionType: 'completed'
    },
    {
      name: 'Virgil Gonzales',
      date: '8:34 PM',
      action: 'Commented',
      target: "'That's not our work",
      actionType: 'comment'
    },
    {
      name: 'Pamela Wanda',
      date: '8:34 PM',
      action: 'Removed',
      target: 'a file',
      actionType: 'removed'
    },
    {
      name: 'Lilian Stone',
      date: '8:34 PM',
      action: 'Attached file',
      target: 'Mockup Zip',
      actionType: 'upload'
    },
    {
      name: 'Marshall Nichols',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'UI Revamp',
      actionType: 'completed'
    },
    {
      name: 'Riley Newman',
      date: '8:34 PM',
      action: 'Commented',
      target: "'Hi, please done this before tommorow'",
      actionType: 'comment'
    },
    {
      name: 'Erin Gonzales',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'UI Revamp',
      actionType: 'completed'
    },
    {
      name: 'Pamela Wanda',
      date: '11:25 PM',
      action: 'Complete task',
      target: 'Clean Up Workspace',
      actionType: 'completed'
    },
    {
      name: 'Nicole Wyne',
      date: '8:25 PM',
      action: 'Complete task',
      target: 'Create Workspace',
      actionType: 'completed'
    }
  ];

  tasksList = [
    {
      name: 'Erin Gonzales',
      avatar: 'assets/images/avatars/thumb-1.jpg',
      due: '24 Mar, 2019',
      status: 'Medium',
      title: 'Define users and workflow',
      desc: 'A cheeseburger is more than sandwich'
    },
    {
      name: 'Virgil Gonzales',
      avatar: 'assets/images/avatars/thumb-4.jpg',
      due: '27 Mar, 2019',
      status: 'Medium',
      title: 'Change interface',
      desc: 'Efficiently unleash cross-media information'
    },
    {
      name: 'Nicole Wyne',
      avatar: 'assets/images/avatars/thumb-5.jpg',
      due: '29 Mar, 2019',
      status: 'Low',
      title: 'Create databases',
      desc: "Here's the story of a man named Brady"
    },
    {
      name: 'Darryl Day',
      avatar: 'assets/images/avatars/thumb-2.jpg',
      due: '2 Apr, 2019',
      status: 'High',
      title: 'Verify connectivity',
      desc: "Bugger bag egg's old boy willy jolly"
    },
    {
      name: 'Riley Newman',
      avatar: 'assets/images/avatars/thumb-6.jpg',
      due: '7 Apr, 2019',
      status: 'Medium',
      title: 'Prepare implementation',
      desc: 'Drop in axle roll-in rail slide'
    }
  ];

  ngOnInit(): void {}
}
  1. Remove e.g. array so the code it looks like this
import { Component, ViewChild, ElementRef, OnInit } from '!angular/core';
import { ThemeConstantService } from '../shared/services/theme-constant.service';

!Component({
  templateUrl: './dashboard.component.html',
  styles: [
    `
      !media only screen and (min-width: 992px) {
        .completion-chart {
          width: calc(100% - 330px);
        }
      }
    `
  ]
})
export class ProjectsDashboardComponent implements OnInit {
  constructor(private colorConfig: ThemeConstantService) {}
  themeColors = this.colorConfig.get().colors;
  blue = this.themeColors.blue;
  blueLight = this.themeColors.blueLight;
  cyan = this.themeColors.cyan;
  cyanLight = this.themeColors.cyanLight;
  gold = this.themeColors.gold;
  purple = this.themeColors.purple;
  purpleLight = this.themeColors.purpleLight;
  red = this.themeColors.red;
  transparent = this.themeColors.transparent;

  !ViewChild('completionChart', { static: true }) canvas: ElementRef;

  completionChartData: Array<any> = [
    {
      data: [30, 60, 40, 50, 40, 55, 85, 65, 75, 50, 70],
      label: 'Series A'
    }
  ];
  currentcompletionChartLabelsIdx = 1;
  completionChartOptions: any = {
    maintainAspectRatio: false,
    responsive: true,
    hover: {
      mode: 'nearest',
      intersect: true
    },
    tooltips: {
      mode: 'index'
    },
    elements: {
      line: {
        tension: 0,
        borderWidth: 2
      }
    },
    scales: {
      xAxes: [
        {
          gridLines: [
            {
              display: false
            }
          ],
          ticks: {
            display: true,
            fontColor: this.themeColors.grayLight,
            fontSize: 13,
            padding: 10
          }
        }
      ],
      yAxes: [
        {
          gridLines: {
            drawBorder: false,
            drawTicks: false,
            borderDash: [3, 4],
            zeroLineWidth: 1,
            zeroLineBorderDash: [3, 4]
          },
          ticks: {
            display: true,
            max: 100,
            stepSize: 20,
            fontColor: this.themeColors.grayLight,
            fontSize: 13,
            padding: 10
          }
        }
      ]
    }
  };
  completionChartColors;
  completionChartType = 'line';

  projectList = [
    {
      project: 'Mind Cog App',
      avatar: 'assets/images/others/thumb-1.jpg',
      status: 'Ready',
      tasks: '31',
      progress: 100
    },
    {
      project: 'Mill Estate',
      avatar: 'assets/images/others/thumb-2.jpg',
      status: 'In Progress',
      tasks: '56',
      progress: 76
    },
    {
      project: 'Eastern Sack',
      avatar: 'assets/images/others/thumb-3.jpg',
      status: 'In Progress',
      tasks: '21',
      progress: 87
    },
    {
      project: 'Fortier Studio',
      avatar: 'assets/images/others/thumb-5.jpg',
      status: 'In Progress',
      tasks: '18',
      progress: 68
    },
    {
      project: 'Indi Web',
      avatar: 'assets/images/others/thumb-6.jpg',
      status: 'Behind',
      tasks: '165',
      progress: 28
    }
  ];

  memberList = [
    {
      name: 'Erin Gonzales',
      img: 'assets/images/avatars/thumb-1.jpg',
      mail: 'erin.gon!gmail.com'
    },
    {
      name: 'Darryl Day',
      img: 'assets/images/avatars/thumb-2.jpg',
      mail: 'darryl.d!gmail.com'
    },
    {
      name: 'Marshall Nichols',
      img: 'assets/images/avatars/thumb-3.jpg',
      mail: 'marshalln!gmail.com'
    },
    {
      name: 'Virgil Gonzales',
      img: 'assets/images/avatars/thumb-4.jpg',
      mail: 'virgil14!gmail.com'
    },
    {
      name: 'Nicole Wyne',
      img: 'assets/images/avatars/thumb-5.jpg',
      mail: 'nicolew!gmail.com'
    },
    {
      name: 'Riley Newman',
      img: 'assets/images/avatars/thumb-6.jpg',
      mail: 'rileyn93!gmail.com'
    },
    {
      name: 'Pamela Wanda',
      img: 'assets/images/avatars/thumb-7.jpg',
      mail: 'pamelaw!gmail.com'
    }
  ];

  activityList = [
    {
      name: 'Virgil Gonzales',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'Prototype Design',
      actionType: 'completed'
    },
    {
      name: 'Marshall Nichols',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'Documentation',
      actionType: 'completed'
    },
    {
      name: 'Virgil Gonzales',
      date: '8:34 PM',
      action: 'Commented',
      target: "'That's not our work",
      actionType: 'comment'
    },
    {
      name: 'Pamela Wanda',
      date: '8:34 PM',
      action: 'Removed',
      target: 'a file',
      actionType: 'removed'
    },
    {
      name: 'Lilian Stone',
      date: '8:34 PM',
      action: 'Attached file',
      target: 'Mockup Zip',
      actionType: 'upload'
    },
    {
      name: 'Marshall Nichols',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'UI Revamp',
      actionType: 'completed'
    },
    {
      name: 'Riley Newman',
      date: '8:34 PM',
      action: 'Commented',
      target: "'Hi, please done this before tommorow'",
      actionType: 'comment'
    },
    {
      name: 'Erin Gonzales',
      date: '10:44 PM',
      action: 'Complete task',
      target: 'UI Revamp',
      actionType: 'completed'
    },
    {
      name: 'Pamela Wanda',
      date: '11:25 PM',
      action: 'Complete task',
      target: 'Clean Up Workspace',
      actionType: 'completed'
    },
    {
      name: 'Nicole Wyne',
      date: '8:25 PM',
      action: 'Complete task',
      target: 'Create Workspace',
      actionType: 'completed'
    }
  ];

  tasksList = [
    {
      name: 'Erin Gonzales',
      avatar: 'assets/images/avatars/thumb-1.jpg',
      due: '24 Mar, 2019',
      status: 'Medium',
      title: 'Define users and workflow',
      desc: 'A cheeseburger is more than sandwich'
    },
    {
      name: 'Virgil Gonzales',
      avatar: 'assets/images/avatars/thumb-4.jpg',
      due: '27 Mar, 2019',
      status: 'Medium',
      title: 'Change interface',
      desc: 'Efficiently unleash cross-media information'
    },
    {
      name: 'Nicole Wyne',
      avatar: 'assets/images/avatars/thumb-5.jpg',
      due: '29 Mar, 2019',
      status: 'Low',
      title: 'Create databases',
      desc: "Here's the story of a man named Brady"
    },
    {
      name: 'Darryl Day',
      avatar: 'assets/images/avatars/thumb-2.jpg',
      due: '2 Apr, 2019',
      status: 'High',
      title: 'Verify connectivity',
      desc: "Bugger bag egg's old boy willy jolly"
    },
    {
      name: 'Riley Newman',
      avatar: 'assets/images/avatars/thumb-6.jpg',
      due: '7 Apr, 2019',
      status: 'Medium',
      title: 'Prepare implementation',
      desc: 'Drop in axle roll-in rail slide'
    }
  ];

  ngOnInit(): void {}
}

!!! Expected output for git log:
feat: remove array

!!! Actual output for git log:

feat: remove array
    diff --git a/apps/sandbox/src/app/dashboard/dashboard.component.ts b/apps/sandbox/src/app/dashboard/dashboard.component.ts
    index deb66e2..b53de3d 100644
    --- a/apps/sandbox/src/app/dashboard/dashboard.component.ts
    +++ b/apps/sandbox/src/app/dashboard/dashboard.component.ts
    !! -35,19 +35,6 !! export class ProjectsDashboardComponent implements OnInit {
         }
       ];
       currentcompletionChartLabelsIdx = 1;
    -  completionChartLabels: Array<any> = [
    -    '16th',
    -    '17th',
    -    '18th',
    -    '19th',
    -    '20th',
    -    '21th',
    -    '22th',
    -    '23th',
    -    '24th',
    -    '25th',
    -    '26th'
    -  ];
       completionChartOptions: any = {
         maintainAspectRatio: false,
         responsive: true,

Does this issue occur when all extensions are disabled?: Yes

This is related to this issue and with VIM the commit works. So its not the local git configuration.

The issue does not appear if only small parts (like properties) are deleted. I suspect that arrays are the problem.
What looks suspicious is this colour for the bracket:
vscode-git-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants