{"thread":{"id":"37353","subject":"Re: Problem with Git rev-list output","startedAt":"2014-08-15T07:26:04Z","lastAt":"2014-08-15T07:26:04Z","messageCount":1,"participants":["Harlan, Peter"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"247735","messageId":"AFBFD05B9DF375478FAB650FE9527BB426187E5B@G1W3782.americas.hpqcorp.net","threadId":"37353","inReplyTo":null,"subject":"Re: Problem with Git rev-list output","fromName":"Harlan, Peter","fromEmail":"peter.harlan@hp.com","sentAt":"2014-08-15T07:26:04Z","receivedAt":"2014-08-15T07:26:04Z","isPatch":false,"sender":{"key":"peter.harlan@hp.com","avatar":null},"body":"On 2014-08-12 01:10:28 Andrew Crabtree wrote:\n> I'm seeing some oddity in one of my repositories where the root commit is being output in 'rev-list' even\n> when I pass in a reference that should exclude it from being output.\n...\n> Seeing the issue with versions of git from 1.7 to 2.1.\n\nI have a small test repo on GitHub that demonstrates the problem.  I expect it is caused by the commit dates being out of sequence:\n\n1. Clone the \"revlist\" repo:\n\n# git clone https://github.com/pcharlan/revlist.git                             \nCloning into 'revlist'...\n\n2. master has six commits (with out-of-order dates):\n\n# git log --pretty='%h %cd' master\n0f9e594 Sun May 20 01:01:01 2007 -0700\n1ad887b Sun May 20 01:01:01 2007 -0700\ncde7188 Sun May 20 01:01:01 2007 -0700\n51af1c0 Sun May 20 01:01:01 2007 -0700   <-- date seven years ago\n0e080e8 Tue Aug 12 11:51:19 2014 -0700  <-- present day\n77ce973 Fri May 20 01:01:01 2011 -0700  <-- three years ago\n\n3. Pruning master with origin/other (a branch with the same root and also out-of-order dates) has no effect, counter to expectation:\n\n# git log --pretty='%h %cd' master ^origin/other\n0f9e594 Sun May 20 01:01:01 2007 -0700\n1ad887b Sun May 20 01:01:01 2007 -0700\ncde7188 Sun May 20 01:01:01 2007 -0700\n51af1c0 Sun May 20 01:01:01 2007 -0700\n0e080e8 Tue Aug 12 11:51:19 2014 -0700\n77ce973 Fri May 20 01:01:01 2011 -0700     <--- Reachable from origin/other\n\n4. Pruning master with the parent of origin/other removes the root commit:\n\n# git log --pretty='%h %cd' master ^origin/other~\n0f9e594 Sun May 20 01:01:01 2007 -0700\n1ad887b Sun May 20 01:01:01 2007 -0700\ncde7188 Sun May 20 01:01:01 2007 -0700\n51af1c0 Sun May 20 01:01:01 2007 -0700\n0e080e8 Tue Aug 12 11:51:19 2014 -0700\n\nQ: Is this expected behavior?  If so, and assuming that it's the dates that are throwing Git off, is there a way to tell Git to not care about the dates, or to care less than it does?\n\nThanks,\n\n--Pete\n\nPeter Harlan\nHP Networking\n"}]}