Anonymous avatar Anonymous committed 4a43d37

revision: add leak_pending flag

The new flag leak_pending in struct rev_info can be used to prevent
prepare_revision_walk from freeing the list of pending objects. It
will still forget about them, so it really is leaked. This behaviour
may look weird at first, but it can be useful if the pointer to the
list is saved before calling prepare_revision_walk.

Signed-off-by: Rene Scharfe <>;
Signed-off-by: Junio C Hamano <>;

Comments (0)

Files changed (2)

-	free(list);
+	if (!revs->leak_pending)
+		free(list);
 	if (revs->no_walk)
 		return 0;
 	unsigned int	disable_stdin:1;
+	unsigned int	leak_pending:1;
 	enum date_mode date_mode;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.