git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v6.1 4/8] Implement line-history search (git log -L)

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2010, 00:20 UTC
Message-ID
<7vfwtzrin3.fsf@alter.siamese.dyndns.org>
In-Reply-To
<426fca7313fc9466efa036b7b86947f23548fc26.1292366984.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 15 quoted lines
> +void line_log_init(struct rev_info *rev, struct diff_line_range *r)
> +{
> +	struct commit *commit = NULL;
> +	struct diff_options *opt = &rev->diffopt;
> +
> +	commit = (struct commit *)verify_commit(rev);
> +	parse_lines(commit, r);
> +
> +	add_line_range(rev, commit, r);
> +	/*
> +	 * Note we support -M/-C to detect file rename
> +	 */
> +	opt->nr_paths = 0;
> +	diff_tree_release_paths(opt);
> +}

Note that opt->nr_paths may be going away soon (cf. nd/struct-pathspec topic). Do you need this assignment here?

Previous: Thomas RastNext: Thomas Rast
Message 6 of 10 in “git log -L, cleaned up and (hopefully) fixed”
  1. 0/8 git log -L, cleaned up and (hopefully) fixedThomas Rast, Dec 14, 2010
  2. 1/8 Refactor parse_locThomas Rast, Dec 14, 2010
  3. 2/8 Export three functions from diff.cThomas Rast, Dec 14, 2010
  4. 3/8 Export rewrite_parents() for 'log -L'Thomas Rast, Dec 14, 2010
  5. 4/8 Implement line-history search (git log -L)Thomas Rast, Dec 14, 2010
  6. Junio C HamanoDec 15, 2010
  7. 5/8 log -L: support parent rewritingThomas Rast, Dec 14, 2010
  8. 6/8 log -L: add --graph prefix before outputThomas Rast, Dec 14, 2010
  9. 7/8 log -L: add --full-line-diff optionThomas Rast, Dec 14, 2010
  10. 8/8 log -L: implement move/copy detection (-M/-C)Thomas Rast, Dec 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.