git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Luke Diamand <luke@diamand.org>
To: Git Users <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Cc: Chen Bin <chenbin.sh@gmail.com>,
	Merland Romain <merlorom@yahoo.fr>,
	Vitor Antunes <vitor.hda@gmail.com>
Subject: git-p4: default behavior for handling moves?
Date: Mon, 7 Jan 2019 12:50:43 +0000	[thread overview]
Message-ID: <CAE5ih7987J2WXdCJvs2e3hOn3zucpE6gsr4JJtxO+XE5=K2G_Q@mail.gmail.com> (raw)

git-p4 can map a "git move" operation to a Perforce "move" operation.
But by default this is disabled. You then end up with a P4 commit
where the file is deleted, and a fresh file is created with the same
contents at the new location at revision #1.

Rename detection gets enabled either with the "-M" option, or with
some config variables, git-p4.detectCopies and git-p4.detectRenames.

I've been tripped up by this, and I actually know about it, and I know
other people have been as well.

Should we switch the default over so that it's enabled by default? I
can't think of any reason why you wouldn't want it enabled.

I think the rename code was first introduced around 2011 by Vitor.

Another option is to add a warning, but people just ignore warnings!

Thanks!
Luke

             reply	other threads:[~2019-01-07 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 12:50 Luke Diamand [this message]
2019-01-08  0:56 ` git-p4: default behavior for handling moves? Mazo, Andrey
2019-01-09 22:41   ` Vitor Antunes

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='CAE5ih7987J2WXdCJvs2e3hOn3zucpE6gsr4JJtxO+XE5=K2G_Q@mail.gmail.com' \
    --to=luke@diamand.org \
    --cc=chenbin.sh@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=merlorom@yahoo.fr \
    --cc=vitor.hda@gmail.com \
    /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.
Code repositories for project(s) associated with this public 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).