All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Żołnowski" <aidecoe@aidecoe.name>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Luke Diamand <luke@diamand.org>
Subject: Re: [PATCH] git-p4.py: Make submit working on bare repository
Date: Sat, 20 Feb 2016 11:00:16 +0000	[thread overview]
Message-ID: <87fuwnd4u7.fsf@freja.aidecoe.name> (raw)
In-Reply-To: <xmqq7fi0b9rt.fsf@gitster.mtv.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

Hi Junio,

To submit changes from master branch to Perforce, new commits should be
based on a remote branch p4/master:

(1)
                  E'---F' master
                 /
    A---B---C---D p4/master

Commits from A to D map to Perforce changelists. These commits include
additional metadata in commit message which most important is changelist
number.

On submit git-p4 prepares changelists for commits E'-F' and submits
these to Perforce repository. After this operation it syncs back remote
branch p4/master. This is the common part for both bare and non-bare
repository.

(2)
                  E'---F' master
                 /
    A---B---C---D---E---F p4/master

In non-bare repository git rebase is performed and it results in
following state:

(3)
    A---B---C---D---E---F p4/master, master

In bare repository this operation cannot be performed, so it remains in
state (2).

With special care state (2) can be transformed to state (3) with manual
update of refs/heads/master with refs/remotes/p4/master.

I understand that implementing rebase for bare repository is unsafe and
it wouldn't be appreciated. Therefore we have to resort to such a
barbarity and git-p4 submit shouldn't attempt to perform a rebase
operation itself. Especially because it performs other operations before
and we end up in the intermediate state (2) anyway.

Is this explanation satisfactory? If yes, I'll include it in patch
description.


Kind regards,

-- 
Amadeusz Żołnowski

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 950 bytes --]

  reply	other threads:[~2016-02-20 11:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 22:46 [PATCH] git-p4.py: Don't try to rebase on submit from bare repository Amadeusz Żołnowski
2016-02-19  9:47 ` Luke Diamand
2016-02-19 17:21   ` Junio C Hamano
2016-02-19 18:27     ` Amadeusz Żołnowski
2016-02-19 18:40       ` Eric Sunshine
2016-02-19 21:57         ` [PATCH] git-p4.py: Make submit working on " Amadeusz Żołnowski
2016-02-19 22:44           ` Junio C Hamano
2016-02-20 11:00             ` Amadeusz Żołnowski [this message]
2016-02-21  7:36               ` Junio C Hamano
2016-02-22 18:50                 ` Amadeusz Żołnowski
2016-02-23  6:59                   ` Junio C Hamano
2016-02-23 12:05                     ` Luke Diamand
2016-02-23 20:56                       ` Amadeusz Żołnowski
2016-02-28  4:26                         ` Luke Diamand
2016-02-28 20:46                           ` Amadeusz Żołnowski
2016-02-29 15:29                             ` Luke Diamand
2016-04-12 23:25                               ` Junio C Hamano
2016-04-13 20:27                                 ` Amadeusz Żołnowski
2016-04-13 21:47                                   ` Junio C Hamano
2016-06-07 20:32                                     ` Amadeusz Żołnowski

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

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

  git send-email \
    --in-reply-to=87fuwnd4u7.fsf@freja.aidecoe.name \
    --to=aidecoe@aidecoe.name \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=luke@diamand.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.