3

On Windows 10...
(I am using powershell - if that makes a difference)

Creating a patch with:

git diff --no-prefix --no-color > bootstrap.patch

Creates a file like this:

diff --git Panda.Service/node_modules/bootstrap-sass/assets/javascripts/bootstrap.js Panda.Service/node_modules/bootstrap-sass/assets/javascripts/bootstrap.js
index 8a2e99a..ac84c8c 100644
--- Panda.Service/node_modules/bootstrap-sass/assets/javascripts/bootstrap.js
+++ Panda.Service/node_modules/bootstrap-sass/assets/javascripts/bootstrap.js
@@ -443,7 +443,7 @@ if (typeof jQuery === 'undefined') {
     var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
     if ($.support.transition && this.$element.hasClass('slide')) {
       $next.addClass(type)
-      $next[0].offsetWidth // force reflow
+      if (typeof $next == 'object' && $next.length) $next[0].offsetWidth // force reflow
       $active.addClass(direction)
       $next.addClass(direction)
       $active

The relative paths are correct for the current directory.

Attempting to apply the patch...

git apply --unsafe-paths .\bootstrap.patch

Gives the following error:

error: unrecognized input

Jim
  • 14,952
  • 15
  • 80
  • 167
  • Have a look at [this post](https://stackoverflow.com/questions/13675782/git-shell-in-windows-patchs-default-character-encoding-is-ucs-2-little-endian) – jhoepken Sep 27 '17 at 06:59

0 Answers0