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

Re: [PATCH] git-p4: fix "git p4 sync" after ignored changelist

From
Andrew Oakley <andrew@adoakley.name>
Date
May 10, 2021, 17:36 UTC
Message-ID
<20210510183638.156a6b1d@ado-tr>
In-Reply-To
<pull.941.git.1620490353758.gitgitgadget@gmail.com>

On Sat, 08 May 2021 16:12:33 +0000 "Evan McLain via GitGitGadget" <gitgitgadget@gmail.com> wrote:

>     Rename P4Sync.commit() to maybeCommit() and return True if the
> change is committed, or False if ignored. Clear P4Sync.initialParent
> only if maybeCommit() returns True.

I'm not sure I'd bother doing the rename - it makes the diff more noisy than it needs to be.

Show 5 quoted lines
>     There may be some other latent bugs here that I haven't fixed. In
>     particular, there seems to be a similar flow when detecting
> branches with del self.initialParents[branch]. I wasn't sure how to
> set up a repro case to expose that error, so I just fixed the bug I
> understood.

I don't think this issue can happen when using --detect-branches. The list of changed files get split up in splitFilesIntoBranches. Only the branches with modified files get processed, so the initialParents entry does not get removed on branches with no files to commit.

This change looks good to me.
Previous: Junio C Hamano
Message 3 of 3 in “git-p4: fix "git p4 sync" after ignored changelist”
  1. git-p4: fix "git p4 sync" after ignored changelistEvan McLain via GitGitGadget, May 8, 2021
  2. Junio C HamanoMay 10, 2021
  3. Andrew OakleyMay 10, 2021

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.