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

Re: [PATCH v2] git-p4: Fix multi-path changelist empty commits

From
Luke Diamand <luke@diamand.org>
Date
Dec 19, 2016, 17:56 UTC
Message-ID
<CAE5ih7_KKLiifY5K6k2u-VJcJvizhgXRLKz5+DLahoudwXhELg@mail.gmail.com>
In-Reply-To
<xmqqy3zbq05o.fsf@gitster.mtv.corp.google.com>
On 19 December 2016 at 17:49, Junio C Hamano <gitster@pobox.com> wrote:
Show 31 quoted lines
> George Vanburgh <george@vanburgh.me> writes:
>
>> From: George Vanburgh <gvanburgh@bloomberg.net>
>>
>> When importing from multiple perforce paths - we may attempt to import
>> a changelist that contains files from two (or more) of these depot
>> paths. Currently, this results in multiple git commits - one
>> containing the changes, and the other(s) as empty commit(s). This
>> behavior was introduced in commit 1f90a64
>> ("git-p4: reduce number of server queries for fetches", 2015-12-19).
>>
>> Reproduction Steps:
>>
>> 1. Have a git repo cloned from a perforce repo using multiple depot
>> paths (e.g. //depot/foo and //depot/bar).
>> 2. Submit a single change to the perforce repo that makes changes in
>> both //depot/foo and //depot/bar.
>> 3. Run "git p4 sync" to sync the change from #2.
>>
>> Change is synced as multiple commits, one for each depot path that was
>> affected.
>>
>> Using a set, instead of a list inside p4ChangesForPaths() ensures that
>> each changelist is unique to the returned list, and therefore only a
>> single commit is generated for each changelist.
>>
>> Reported-by: James Farwell <jfarwell@vmware.com>
>> Signed-off-by: George Vanburgh <gvanburgh@bloomberg.net>
>> ---
>
> Thanks, George.  Luke, can I add your "Reviewed-by:" here?
Yes, thanks.
Luke
Previous: Junio C Hamano
Message 6 of 6 in “git-p4: Fix multi-path changelist empty commits”
  1. git-p4: Fix multi-path changelist empty commitsGeorge Vanburgh, Dec 15, 2016
  2. Luke DiamandDec 17, 2016
  3. George VanburghDec 17, 2016
  4. git-p4: Fix multi-path changelist empty commitsGeorge Vanburgh, Dec 17, 2016
  5. Junio C HamanoDec 19, 2016
  6. Luke DiamandDec 19, 2016

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.