diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-02-13 14:33:19 -0800 | 
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-02-13 14:33:19 -0800 | 
| commit | aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d (patch) | |
| tree | 8e9410d69333688d32ccab097beaa48b10850833 /builtin-pack-objects.c | |
| parent | 41e2edf41a6d501f1b8beca7f1f0bcbe9296dcc2 (diff) | |
| parent | d8e87570c32b190af3991d180f37adb8cf5eb99c (diff) | |
| download | git-aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d.tar.gz | |
Merge branch 'maint'
* maint:
  config: add test cases for empty value and no value config variables.
  cvsimport: have default merge regex also match beginning of commit message
  git clone -s documentation: force a new paragraph for the NOTE
  status: suggest "git rm --cached" to unstage for initial commit
  Protect get_author_ident_from_commit() from filenames in work tree
  upload-pack: Initialize the exec-path.
  bisect: use verbatim commit subject in the bisect log
  git-cvsimport.txt: fix '-M' description.
  Revert "pack-objects: only throw away data during memory pressure"
Diffstat (limited to 'builtin-pack-objects.c')
| -rw-r--r-- | builtin-pack-objects.c | 13 | 
1 files changed, 2 insertions, 11 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index acb05554d4..692a76126b 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1464,7 +1464,7 @@ static unsigned int check_delta_limit(struct object_entry *me, unsigned int n)  	return m;  } -static unsigned long free_unpacked_data(struct unpacked *n) +static unsigned long free_unpacked(struct unpacked *n)  {  	unsigned long freed_mem = sizeof_delta_index(n->index);  	free_delta_index(n->index); @@ -1474,12 +1474,6 @@ static unsigned long free_unpacked_data(struct unpacked *n)  		free(n->data);  		n->data = NULL;  	} -	return freed_mem; -} - -static unsigned long free_unpacked(struct unpacked *n) -{ -	unsigned long freed_mem = free_unpacked_data(n);  	n->entry = NULL;  	n->depth = 0;  	return freed_mem; @@ -1520,7 +1514,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,  		       mem_usage > window_memory_limit &&  		       count > 1) {  			uint32_t tail = (idx + window - count) % window; -			mem_usage -= free_unpacked_data(array + tail); +			mem_usage -= free_unpacked(array + tail);  			count--;  		} @@ -1553,9 +1547,6 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,  			if (!m->entry)  				break;  			ret = try_delta(n, m, max_depth, &mem_usage); -			if (window_memory_limit && -			    mem_usage > window_memory_limit) -				mem_usage -= free_unpacked_data(m);  			if (ret < 0)  				break;  			else if (ret > 0)  | 
