threads / patch / 29059

patchgit-svn.perl: close the edit for propedits even with no mods

Subject: [PATCH] git-svn.perl: close the edit for propedits even with no mods

## tl;dr

3 messages between Dec 1, 2011 and Dec 6, 2011. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Steven Walter· Dec 1, 2011, 02:37 UTC · lore

It's legitimate to update the mergeinfo property without actually changing any files. This can happen when changes are backported to a branch, and then that branch is merged back into mainline. We still want to record the updated mergeinfo for book-keeping.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-svn.perl +1 −1
diff --git a/git-svn.perl b/git-svn.perl
index 177dd25..cd64659 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4867,7 +4867,7 @@ sub apply_diff {
 			               $self->{mergeinfo});
 	}
 	$self->rmdirs if $_rmdir;
-	if (@$mods == 0) {
+	if (@$mods == 0 && !defined($self->{mergeinfo})) {
 		$self->abort_edit;
 	} else {
 		$self->close_edit;
-- 
1.7.5.4
Eric Wong· Dec 6, 2011, 01:10 UTC · re: Steven Walter · lore

Re: [PATCH] git-svn.perl: close the edit for propedits even with no mods

Steven Walter <stevenrwalter@gmail.com> wrote:
Show 7 quoted lines
> It's legitimate to update the mergeinfo property without
> actually changing any files.  This can happen when changes are
> backported to a branch, and then that branch is merged back
> into mainline.  We still want to record the updated mergeinfo
> for book-keeping.
> 
> Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Pushed to "master" of git://bogomips.org/git-svn.git
(Btw, you got my email address wrong in the Cc:)
Junio C Hamano· Dec 6, 2011, 05:03 UTC · re: Eric Wong · lore

Re: [PATCH] git-svn.perl: close the edit for propedits even with no mods

Eric Wong <normalperson@yhbt.net> writes:
Show 14 quoted lines
> Steven Walter <stevenrwalter@gmail.com> wrote:
>> It's legitimate to update the mergeinfo property without
>> actually changing any files.  This can happen when changes are
>> backported to a branch, and then that branch is merged back
>> into mainline.  We still want to record the updated mergeinfo
>> for book-keeping.
>> 
>> Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
>
> Acked-by: Eric Wong <normalperson@yhbt.net>
>
> Pushed to "master" of git://bogomips.org/git-svn.git
>
> (Btw, you got my email address wrong in the Cc:)
Pulled. Thanks.

← back to recent threads