Fossil

Check-in [13a771ce]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change file_size() to file_wd_size() in file_is_the_same().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 13a771ce18b3ff2be561f12ecbe357083ff2bde2
User & Date: dmitry 2011-09-29 11:45:02.964
Context
2011-09-29
14:07
When creating a manifest, get isExe and isLink bits from filesystem at once instead of doing two stat(2) calls. ... (check-in: 9bfa186b user: dmitry tags: trunk)
11:45
Change file_size() to file_wd_size() in file_is_the_same(). ... (check-in: 13a771ce user: dmitry tags: trunk)
11:05
Cache "manifest" setting in fossil_reserved_name() instead of reading it from the database on every call. This speeds up adding many files. ... (check-in: a369dc77 user: dmitry tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
** different in any way, then return false.
*/
int file_is_the_same(Blob *pContent, const char *zName){
  i64 iSize;
  int rc;
  Blob onDisk;

  iSize = file_size(zName);
  if( iSize<0 ) return 0;
  if( iSize!=blob_size(pContent) ) return 0;
  if( file_wd_islink(zName) ){
    blob_read_link(&onDisk, zName);
  }else{
    blob_read_from_file(&onDisk, zName);
  }







|







897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
** different in any way, then return false.
*/
int file_is_the_same(Blob *pContent, const char *zName){
  i64 iSize;
  int rc;
  Blob onDisk;

  iSize = file_wd_size(zName);
  if( iSize<0 ) return 0;
  if( iSize!=blob_size(pContent) ) return 0;
  if( file_wd_islink(zName) ){
    blob_read_link(&onDisk, zName);
  }else{
    blob_read_from_file(&onDisk, zName);
  }