Re: [PATCHv2 1/3] t6022: New test checking for unnecessary updates of renamed+modified files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 01, 2011 at 08:33:16AM +0100, Johannes Sixt wrote:

> > +	orig=$(stat --format="%Y" rename) &&
> 
> 	orig=$(test-chmtime -v +0 rename) &&
> 
> > +	git merge merge-branch-1 &&
> > +	new=$(stat --format="%Y" rename) &&
> 
> 	new=$(test-chmtime -v +0 rename) &&
> 
> > +	echo "Checking whether stat times are same: $orig vs $new" &&
> 
> 	echo "Checking whether stat times are same: ${orig%%	*} vs ${new%%	*}" &&
> 
> (that's TAB after the %%)
> 
> > +	test "$orig" == "$new" &&
> 
> 	test "${orig%%	*}" = "${new%%	*}" &&

Maybe this would be simpler as:

  test-chmtime -v +0 rename >orig &&
  ... do the merge ...
  test-chmtime -v +0 rename >new &&
  test_cmp orig new

And then you don't have to care about the format that test-chmtime
outputs at all, and test_cmp's diff output is usually self-explanatory
when there is a mismatch (it's even better if you name the files
"expect" and "actual").

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]