Expected bug with reset --hard

2014-10-14 Thread Nicholas Chmielewski
git version 1.9.1  version 2.1.2

I had some changes in a tracked file that I wanted to discard.
Instead of using checkout, I instead used `git reset --hard HEAD` to reset.

Git returned the message `HEAD is now at sha commit-message`
I then went `git status` and it showed me that I still have changes to commit

I expected there to be no changes in my working directory as a result of
doing a `git reset --hard`

I did a little more fiddling around and still yielded the same results.

- `$ touch file.md`
- `$ git add file.md`
- `$ git commit -m 'empty file'`
- `$ echo 'text'  file.md`

At this point git reported that I had uncommited changes for both file.md and
the troublesome file in question (jquery.datatables.js)

`$ git reset --hard HEAD`

Git now no longer reports and untracked changes for file.md but still
for jquery.datatables.js

`$ git reset --hard HEAD~1`

Git still reports untracked changes for jquery.datatables.js

I have included a copy of the diff of the jquery.datatables.js
diff --git a/vendor/assets/javascripts/jquery.datatables.js 
b/vendor/assets/javascripts/jquery.datatables.js
index b9044f1..4aab04b 100644
--- a/vendor/assets/javascripts/jquery.datatables.js
+++ b/vendor/assets/javascripts/jquery.datatables.js
@@ -1,11 +1,11 @@
-/*! DataTables 1.10.1
- * ©2008-2014 SpryMedia Ltd - datatables.net/license
+/*! DataTables 1.10.3
+ * ©2008-2014 SpryMedia Ltd - datatables.net/license
  */
 
 /**
  * @summary DataTables
  * @description Paginate, search and order HTML tables
- * @version 1.10.1
+ * @version 1.10.3
  * @filejquery.dataTables.js
  * @author  SpryMedia Ltd (www.sprymedia.co.uk)
  * @contact www.sprymedia.co.uk/contact
@@ -113,7 +113,7 @@

// U+2009 is thin space and U+202F is narrow no-break space, both used 
in many
// standards as thousands separators
-   var _re_formatted_numeric = /[',$£€¥%\u2009\u202F]/g;
+   var _re_formatted_numeric = /[',$£€¥%\u2009\u202F]/g;


var _empty = function ( d ) {
@@ -133,7 +133,7 @@
if ( ! _re_dic[ decimalPoint ] ) {
_re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( 
decimalPoint ), 'g' );
}
-   return typeof num === 'string' ?
+   return typeof num === 'string'  decimalPoint !== '.' ?
num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint 
], '.' ) :
num;
};
@@ -310,7 +310,6 @@
newKey = key.replace( match[0], 
match[2].toLowerCase() );
map[ newKey ] = key;

-   //console.log( key, match );
if ( match[1] === 'o' )
{
_fnHungarianMap( o[key] );
@@ -673,6 +672,12 @@
return _fnSetObjectDataFn( mDataSrc )( rowData, val, 
meta );
};

+   // Indicate if DataTables should read DOM data as an object or 
array
+   // Used in _fnGetRowElements
+   if ( typeof mDataSrc !== 'number' ) {
+   oSettings._rowReadObject = true;
+   }
+   
/* Feature sorting overrides column specific when off */
if ( !oSettings.oFeatures.bSort )
{
@@ -1498,19 +1503,22 @@
function _fnGetRowElements( settings, row )
{
var
-   d = [],
tds = [],
td = row.firstChild,
name, col, o, i=0, contents,
-   columns = settings.aoColumns;
+   columns = settings.aoColumns,
+   objectRead = settings._rowReadObject;

-   var attr = function ( str, data, td  ) {
+   var d = objectRead ? {} : [];
+   
+   var attr = function ( str, td  ) {
if ( typeof str === 'string' ) {
var idx = str.indexOf('@');

if ( idx !== -1 ) {
-   var src = str.substring( idx+1 );
-   o[ '@'+src ] = td.getAttribute( src );
+   var attr = str.substring( idx+1 );
+   var setter = _fnSetObjectDataFn( str );
+   setter( d, td.getAttribute( attr ) );
}
}
};
@@ -1520,18 +1528,26 @@
contents = $.trim(cell.innerHTML);

if ( col  col._bAttrSrc ) {
-   o = {
-   display: contents
-   };
+   var 

Re: Expected bug with reset --hard

2014-10-14 Thread Nicholas Chmielewski
I'd like to rescind my bug report.


A bit more further investigation revealed that git was detecting the
file with changes as jquery.datatables.js but the file in my directory
was reported as being named jquery.dataTables.js .

I'm currently working on OS X 10.9, and this issue is probably related
more to the case-preservation of the file system rather than git
itself.

On 15 October 2014 14:34, Nicholas Chmielewski
nicholas.chmielew...@ennova.com.au wrote:
 git version 1.9.1  version 2.1.2

 I had some changes in a tracked file that I wanted to discard.
 Instead of using checkout, I instead used `git reset --hard HEAD` to reset.

 Git returned the message `HEAD is now at sha commit-message`
 I then went `git status` and it showed me that I still have changes to commit

 I expected there to be no changes in my working directory as a result of
 doing a `git reset --hard`

 I did a little more fiddling around and still yielded the same results.

 - `$ touch file.md`
 - `$ git add file.md`
 - `$ git commit -m 'empty file'`
 - `$ echo 'text'  file.md`

 At this point git reported that I had uncommited changes for both file.md and
 the troublesome file in question (jquery.datatables.js)

 `$ git reset --hard HEAD`

 Git now no longer reports and untracked changes for file.md but still
 for jquery.datatables.js

 `$ git reset --hard HEAD~1`

 Git still reports untracked changes for jquery.datatables.js

 I have included a copy of the diff of the jquery.datatables.js
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html