Re: amend warnings with no changes staged

2019-08-08 Thread Jeff King
On Tue, Aug 06, 2019 at 12:11:53PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > git commit -m 'buggy commit' > > echo fix >>file.c > > git commit --amend ;# oops, should have been "-a" > > git push > > > > But perhaps that gets to the heart of the matter. Could we perhaps be >

Re: amend warnings with no changes staged

2019-08-06 Thread Junio C Hamano
Jeff King writes: > git commit -m 'buggy commit' > echo fix >>file.c > git commit --amend ;# oops, should have been "-a" > git push > > But perhaps that gets to the heart of the matter. Could we perhaps be > providing a more detailed summary of what happened for an --amend? I.e., > to sum

Re: amend warnings with no changes staged

2019-08-06 Thread Phillip Wood
On 06/08/2019 04:53, Junio C Hamano wrote: Junio C Hamano writes: Jonathan Nieder writes: Some non-judgemental descriptive output like $ git commit --amend --no-edit No changes. $ would address this case, without bothering people who are doing it intentionally. So

Re: amend warnings with no changes staged

2019-08-05 Thread Jeff King
On Mon, Aug 05, 2019 at 07:16:18PM -0700, Jonathan Nieder wrote: > Lukas Gross wrote: > > > I had intended to stage commits but forgot to do so. Git responded > > with a normal commit creation message, so I pushed to the remote to > > begin a CI build. When the build failed for the same reason, I

Re: amend warnings with no changes staged

2019-08-05 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > Some non-judgemental descriptive output like $ git commit --amend --no-edit No changes. $ would address this case, without bothering people who are doing it intentionally. So I think there's room

Re: amend warnings with no changes staged

2019-08-05 Thread Junio C Hamano
Jonathan Nieder writes: >>> Some non-judgemental descriptive output like >>> >>> $ git commit --amend --no-edit >>> No changes. >>> $ >>> >>> would address this case, without bothering people who are doing it >>> intentionally. So I think there's room for a simple improvement here. >

Re: amend warnings with no changes staged

2019-08-05 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >> Lukas Gross wrote: >>> I had intended to stage commits but forgot to do so. Git responded >>> with a normal commit creation message, so I pushed to the remote to >>> begin a CI build. When the build failed for the same reason, I >>> realized [...

Re: amend warnings with no changes staged

2019-08-05 Thread Junio C Hamano
Jonathan Nieder writes: > Lukas Gross wrote: > >> I had intended to stage commits but forgot to do so. Git responded >> with a normal commit creation message, so I pushed to the remote to >> begin a CI build. When the build failed for the same reason, I >> realized I had forgotten to stage the ch

Re: amend warnings with no changes staged

2019-08-05 Thread Jonathan Nieder
Lukas Gross wrote: > I had intended to stage commits but forgot to do so. Git responded > with a normal commit creation message, so I pushed to the remote to > begin a CI build. When the build failed for the same reason, I > realized I had forgotten to stage the changes. An additional line in > th

Re: amend warnings with no changes staged

2019-08-05 Thread Jonathan Nieder
(administrivia: please don't top-post) Lukas Gross wrote: > I had intended to stage commits but forgot to do so. Git responded > with a normal commit creation message, so I pushed to the remote to > begin a CI build. When the build failed for the same reason, I > realized I had forgotten to stage

Re: amend warnings with no changes staged

2019-08-05 Thread Lukas Gross
Hi Jonathan, I had intended to stage commits but forgot to do so. Git responded with a normal commit creation message, so I pushed to the remote to begin a CI build. When the build failed for the same reason, I realized I had forgotten to stage the changes. An additional line in the response to th

Re: amend warnings with no changes staged

2019-08-05 Thread Jonathan Nieder
Hi, Lukas Gross wrote: > I have occasionally used git commit --amend without staging any > changes or modifying the commit message (--no-edit). Since this is > often done unintentionally, could amend warn when it is being used in > this way? Can you say more about the context? What were you try

amend warnings with no changes staged

2019-08-05 Thread Lukas Gross
Hi, I have occasionally used git commit --amend without staging any changes or modifying the commit message (--no-edit). Since this is often done unintentionally, could amend warn when it is being used in this way? Thanks!