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

Re: [PATCH] fast-export: Avoid dropping files from commits

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 25, 2009, 22:13 UTC
Message-ID
<alpine.DEB.1.00.0903252312460.26370@intel-tinevez-2-302>
In-Reply-To
<1238014519-11683-1-git-send-email-newren@gmail.com>
Hi,
On Wed, 25 Mar 2009, newren@gmail.com wrote:
Show 8 quoted lines
> From: Elijah Newren <newren@gmail.com>
> 
> When exporting a subset of commits on a branch that do not go back to a
> root commit (e.g. master~2..master), we still want each exported commit to
> have the same files in the exported tree as in the original tree.
> 
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
Makes sense.
Show 18 quoted lines
>  builtin-fast-export.c  |    3 ++-
>  t/t9301-fast-export.sh |    7 +++++--
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/builtin-fast-export.c b/builtin-fast-export.c
> index fdf4ae9..34a419c 100644
> --- a/builtin-fast-export.c
> +++ b/builtin-fast-export.c
> @@ -221,7 +221,8 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
>  	if (message)
>  		message += 2;
>  
> -	if (commit->parents) {
> +	if (commit->parents &&
> +	    get_object_mark(&commit->parents->item->object) != 0) {
>  		parse_commit(commit->parents->item);
>  		diff_tree_sha1(commit->parents->item->tree->object.sha1,
>  			       commit->tree->object.sha1, "", &rev->diffopt);
I do not understand that change.
A good explanation in the commit message might help this stupid developer.

Ciao, Dscho

Previous: newren@gmail.comNext: newren@gmail.com
Message 2 of 7 in “fast-export: Avoid dropping files from commits”
  1. fast-export: Avoid dropping files from commitsnewren@gmail.com, Mar 25, 2009
  2. Johannes SchindelinMar 25, 2009
  3. newren@gmail.comMar 25, 2009
  4. Elijah NewrenMar 26, 2009
  5. Johannes SchindelinMar 26, 2009
  6. Junio C HamanoMar 26, 2009
  7. Elijah NewrenMar 26, 2009

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.