git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: Michael Horowitz <mike@horowitz.name>
Cc: git <git@vger.kernel.org>
Subject: Re: git-p4: Jobs and skipSubmitEdit
Date: Sun, 24 Jun 2012 16:24:45 -0400	[thread overview]
Message-ID: <20120624202445.GA27664@padd.com> (raw)
In-Reply-To: <CAFLRbop2aETNp0-6AdvSTx7Jmh7epYZ6rQc6hhFHbxZrGdEo9g@mail.gmail.com>

mike@horowitz.name wrote on Fri, 22 Jun 2012 12:15 -0400:
> I've written a git prepare-commit-msg hook to do what the Perforce
> JobsView would essentially do, so I can include the jobs directly in
> my git commit message, and then use git-p4.skipSubmitEdit=true, so I
> can just push things into Perforce directly from git without ever
> being prompted by Perforce.
> 
> Problem is that this doesn't work, because git-p4 tabs in the entire
> commit message to put it in the "Description:" section of the Perforce
> changelist, and my "Jobs:" ends up tabbed in, and it it required by
> Perforce to be at the beginning of the line.  The submit ends up
> failing, because "Jobs:" is required.  I am forced to turn off
> skipSubmitEdit and edit the message to remove the tab from the "Jobs:"
> line each commit.
> 
> Is there any option to make this work right, or does the git-p4 not
> support this?

This is a great idea, and something I've thought would be useful
too.  There's no code to handle it currently, but it shouldn't be
too hard.

I'm imagining that special strings in the git commit are hoisted
up out of the description when building the p4 change message,
as you describe.  Are there any more than "Jobs:"?  Is it just
a single instance that might appear?

An easy way to do this is to change prepareLogMessage to alter
or add a Jobs line.  Unless we decide this needs to be more
general.

		-- Pete

  reply	other threads:[~2012-06-24 20:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 16:15 git-p4: Jobs and skipSubmitEdit Michael Horowitz
2012-06-24 20:24 ` Pete Wyckoff [this message]
2012-06-26  5:07   ` Michael Horowitz
2012-06-26 11:21     ` Pete Wyckoff
2012-07-17  8:49       ` Michael Horowitz
2012-07-18  1:03         ` Pete Wyckoff

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=20120624202445.GA27664@padd.com \
    --to=pw@padd.com \
    --cc=git@vger.kernel.org \
    --cc=mike@horowitz.name \
    /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 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 NNTP newsgroup(s).