git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Andrew Oakley <andrew@adoakley.name>
To: Evan McLain <git.commit@none-of-yer.biz>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Luke Diamand <luke@diamand.org>, Ben Keene <seraphire@gmail.com>
Subject: Re: [PATCH] git-p4: fix "git p4 sync" after ignored changelist
Date: Mon, 10 May 2021 18:36:38 +0100	[thread overview]
Message-ID: <20210510183638.156a6b1d@ado-tr> (raw)
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.

>     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.

      parent reply	other threads:[~2021-05-10 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 16:12 Evan McLain via GitGitGadget
2021-05-10  4:10 ` Junio C Hamano
2021-05-10 17:36 ` Andrew Oakley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210510183638.156a6b1d@ado-tr \
    --to=andrew@adoakley.name \
    --cc=git.commit@none-of-yer.biz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=luke@diamand.org \
    --cc=seraphire@gmail.com \
    --subject='Re: [PATCH] git-p4: fix "git p4 sync" after ignored changelist' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).