Re: is this a bug of git-diff?

2013-05-15 Thread Mike Hommey
On Wed, May 15, 2013 at 10:50:25AM +0100, John Keeping wrote: > On Wed, May 15, 2013 at 11:34:41AM +0200, Matthieu Moy wrote: > > Antoine's answer is correct. In addition, I'd say that you may want to > > enable color in the output to make it clearer (the @@ ... @@ part would > > be colored, but no

Re: Default for color.ui (was Re: is this a bug of git-diff?)

2013-05-15 Thread Felipe Contreras
On Wed, May 15, 2013 at 5:03 AM, Matthieu Moy wrote: > John Keeping writes: > >> I wonder if that should be the default. I've advised a lot of people to >> turn it on and it seems to me that a user is much more likely to go >> looking for a "turn color off" option than realise that color is an >

Default for color.ui (was Re: is this a bug of git-diff?)

2013-05-15 Thread Matthieu Moy
John Keeping writes: > I wonder if that should be the default. I've advised a lot of people to > turn it on and it seems to me that a user is much more likely to go > looking for a "turn color off" option than realise that color is an > option at all. I'd love to see this by default, yes. Maybe

Re: is this a bug of git-diff?

2013-05-15 Thread John Keeping
On Wed, May 15, 2013 at 11:34:41AM +0200, Matthieu Moy wrote: > Antoine's answer is correct. In addition, I'd say that you may want to > enable color in the output to make it clearer (the @@ ... @@ part would > be colored, but not the function name): > > git config --global color.ui auto I wond

Re: is this a bug of git-diff?

2013-05-15 Thread Matthieu Moy
Antoine Pelisse writes: > On Wed, May 15, 2013 at 8:52 AM, eric liou wrote: >> Thank you for the quick reply. >> But this line is not correct: "@@ -4,5 +4,6 @@ int a = 1;" Antoine's answer is correct. In addition, I'd say that you may want to enable color in the output to make it clearer (the @

Re: is this a bug of git-diff?

2013-05-15 Thread Antoine Pelisse
On Wed, May 15, 2013 at 8:52 AM, eric liou wrote: > Thank you for the quick reply. > But this line is not correct: "@@ -4,5 +4,6 @@ int a = 1;" Oh OK, I see. Git tries to name the function where the changes take place. This is purely informative. In your example, you don't have any function so of

Re: is this a bug of git-diff?

2013-05-14 Thread Antoine Pelisse
On Wed, May 15, 2013 at 8:23 AM, eric liou wrote: > The output of git-diff is different from my expectation. > It may skip some lines of context. git-diff is using a default of 3 lines of context above and below the changes. In your example, there is only two lines of context below the change, so

Re: Is this a bug?

2013-02-22 Thread Junio C Hamano
Phil Hord writes: > Or maybe --amend should imply --cleanup=whitespace. I am fairly negative on that. Such a hidden linkage, even if it is documented, is just one more thing people need to learn. It _might_ be interesting (note: I did not say "worthwhile" here) to think what happens if we scan

Re: Is this a bug?

2013-02-22 Thread Phil Hord
On Tue, Feb 19, 2013 at 6:02 AM, Duy Nguyen wrote: > On Tue, Feb 19, 2013 at 4:47 PM, Erik Faye-Lund wrote: >> On Tue, Feb 19, 2013 at 10:32 AM, David Wade wrote: >>> Hi, >>> >>> I wrote a commit message beginning with a hash (#) character, like this: >>> 'git commit -m "#ifdef " ' >>> >>>

Re: Is this a bug?

2013-02-19 Thread Duy Nguyen
On Tue, Feb 19, 2013 at 4:47 PM, Erik Faye-Lund wrote: > On Tue, Feb 19, 2013 at 10:32 AM, David Wade wrote: >> Hi, >> >> I wrote a commit message beginning with a hash (#) character, like this: >> 'git commit -m "#ifdef " ' >> >> Everything went okay when committing, but then I tried 'git c

Re: Is this a bug?

2013-02-19 Thread Erik Faye-Lund
On Tue, Feb 19, 2013 at 10:32 AM, David Wade wrote: > Hi, > > I wrote a commit message beginning with a hash (#) character, like this: 'git > commit -m "#ifdef " ' > > Everything went okay when committing, but then I tried 'git commit -amend' > and without editing the commit message I was to

Re: Is this a bug?

2013-02-19 Thread Andreas Ericsson
On 02/19/2013 10:32 AM, David Wade wrote: > Hi, > > I wrote a commit message beginning with a hash (#) character, like > this: 'git commit -m "#ifdef " ' > > Everything went okay when committing, but then I tried 'git commit > -amend' and without editing the commit message I was told I had an

RE: Is this a bug?

2013-02-19 Thread David Wade
Hi, I wrote a commit message beginning with a hash (#) character, like this: 'git commit -m "#ifdef " ' Everything went okay when committing, but then I tried 'git commit -amend' and without editing the commit message I was told I had an empty commit message. Is this a problem with my text