Re: [PATCH v1 1/2] t0027: Don't use git commit
On Fri, Dec 08, 2017 at 10:21:19AM -0800, Junio C Hamano wrote: > Junio C Hamanowrites: > > > tbo...@web.de writes: > > > >> From: Torsten Bögershausen > >> > >> Replace `git commit -m "comment" ""` with `git commit -m "comment"` to > >> remove the empty path spec. > >> > >> Signed-off-by: Torsten Bögershausen > >> --- > >> t/t0027-auto-crlf.sh | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > > > This looks a bit strange. The intent seems to commit all changes > > made in the working tree, so I'd understand it if it replaced the > > empty string with a single dot. > > > > I also thought that we deprecated use of an empty string as "match > > all" pathspec recently, and expected that this to break. > > > > ... goes and looks ... > > > > Indeed, 229a95aa ("t0027: do not use an empty string as a pathspec > > element", 2017-06-23) does exactly that. > > OK, I think I can safely omit this patch, because > > (1) when 2/2 is queued on top of tb/check-crlf-for-safe-crlf, > because ex/deprecate-empty-pathspec-as-match-all is not yet in > the topic, an empty pathspec still means "match all" and > nothing breaks; and > > (2) when tb/check-crlf-for-safe-crlf plus 2/2 is merged to any > branch with ex/deprecate-empty-pathspec-as-match-all, the topic > already fixes what this 1/2 tries to > > Thanks for being thorough, though. > Sure, the credit goes 100% to you: commit 229a95aafa77b583b46a3156b4fad469c264ddfd Author: Junio C Hamano Date: Fri Jun 23 11:04:14 2017 -0700 t0027: do not use an empty string as a pathspec element My brain did just assume that this had mad it to master, sorry for the noise
Re: [PATCH v1 1/2] t0027: Don't use git commit
Junio C Hamanowrites: > tbo...@web.de writes: > >> From: Torsten Bögershausen >> >> Replace `git commit -m "comment" ""` with `git commit -m "comment"` to >> remove the empty path spec. >> >> Signed-off-by: Torsten Bögershausen >> --- >> t/t0027-auto-crlf.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > This looks a bit strange. The intent seems to commit all changes > made in the working tree, so I'd understand it if it replaced the > empty string with a single dot. > > I also thought that we deprecated use of an empty string as "match > all" pathspec recently, and expected that this to break. > > ... goes and looks ... > > Indeed, 229a95aa ("t0027: do not use an empty string as a pathspec > element", 2017-06-23) does exactly that. OK, I think I can safely omit this patch, because (1) when 2/2 is queued on top of tb/check-crlf-for-safe-crlf, because ex/deprecate-empty-pathspec-as-match-all is not yet in the topic, an empty pathspec still means "match all" and nothing breaks; and (2) when tb/check-crlf-for-safe-crlf plus 2/2 is merged to any branch with ex/deprecate-empty-pathspec-as-match-all, the topic already fixes what this 1/2 tries to Thanks for being thorough, though.
Re: [PATCH v1 1/2] t0027: Don't use git commit
tbo...@web.de writes: > From: Torsten Bögershausen> > Replace `git commit -m "comment" ""` with `git commit -m "comment"` to > remove the empty path spec. > > Signed-off-by: Torsten Bögershausen > --- > t/t0027-auto-crlf.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This looks a bit strange. The intent seems to commit all changes made in the working tree, so I'd understand it if it replaced the empty string with a single dot. I also thought that we deprecated use of an empty string as "match all" pathspec recently, and expected that this to break. ... goes and looks ... Indeed, 229a95aa ("t0027: do not use an empty string as a pathspec element", 2017-06-23) does exactly that. > diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh > index c2c208fdcd..97154f5c79 100755 > --- a/t/t0027-auto-crlf.sh > +++ b/t/t0027-auto-crlf.sh > @@ -370,7 +370,7 @@ test_expect_success 'setup master' ' > echo >.gitattributes && > git checkout -b master && > git add .gitattributes && > - git commit -m "add .gitattributes" "" && > + git commit -m "add .gitattributes" && > printf "\$Id: > \$\nLINEONE\nLINETWO\nLINETHREE" >LF && > printf "\$Id: > \$\r\nLINEONE\r\nLINETWO\r\nLINETHREE" >CRLF && > printf "\$Id: > \$\nLINEONE\r\nLINETWO\nLINETHREE" >CRLF_mix_LF &&
[PATCH v1 1/2] t0027: Don't use git commit
From: Torsten BögershausenReplace `git commit -m "comment" ""` with `git commit -m "comment"` to remove the empty path spec. Signed-off-by: Torsten Bögershausen --- t/t0027-auto-crlf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh index c2c208fdcd..97154f5c79 100755 --- a/t/t0027-auto-crlf.sh +++ b/t/t0027-auto-crlf.sh @@ -370,7 +370,7 @@ test_expect_success 'setup master' ' echo >.gitattributes && git checkout -b master && git add .gitattributes && - git commit -m "add .gitattributes" "" && + git commit -m "add .gitattributes" && printf "\$Id: \$\nLINEONE\nLINETWO\nLINETHREE" >LF && printf "\$Id: \$\r\nLINEONE\r\nLINETWO\r\nLINETHREE" >CRLF && printf "\$Id: \$\nLINEONE\r\nLINETWO\nLINETHREE" >CRLF_mix_LF && -- 2.15.1.271.g1a4e40aa5d