git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/3] git-p4: Add test case for complex branch import

From
Vitor Antunes <vitor.hda@gmail.com>
Date
Jan 23, 2012, 14:01 UTC
Message-ID
<CAOpHH-W1LY3Q50otrcNJTYWN67k_pCZHEOkgbKy7kPgfUbGeQw@mail.gmail.com>
In-Reply-To
<20120121171130.GA6235@padd.com>
On Sat, Jan 21, 2012 at 5:11 PM, Pete Wyckoff <pw@padd.com> wrote:
Show 29 quoted lines
> luke@diamand.org wrote on Sat, 21 Jan 2012 10:51 +0000:
>> However, one thing I noticed in reading through is that it will
>> break if you end up importing a P4 branch that has spaces (or other
>> shell chars) in its name. A quick test confirms this.
>>
>> - the code doesn't handle the names properly
>> - git and p4 have different ideas about valid branch names
>>
>> But before rejecting Vitor's changes because of that it would be
>> worth considering whether we care (much). My own opinion is that if
>> you have developers who are daft enough to put spaces or dollars in
>> their branch names then their project is already doomed anyway....
>>
>> Perhaps it would be enough just to issue a warning ("your project is
>> doomed; start working on your CV") and skip such branch names rather
>> than falling over with inexplicable error messages.
>
> This doesn't seem like a big deal.  The read_pipe and
> read_pipe_lines calls shoud be list-ified.  That gets rid
> of the problem with shell interactions.
>
> For git branch name reserved characters, a little function
> to replace the bogus characters with "_" would avoid needing
> to go work on the resume.  Anything in bad_ref_char() and
> check_refname_component().  I agree this doesn't have to be
> perfect.
>
> This could be a new patch unrelated to Vitor's series, which
> verifies branch names anywhere a new commit is made.

I would also prefer to include that fix on a separate patch series that would include the test case Luke already prepared. In my opinion, updating read_pipe and read_pipe_lines is out of scope for the current patch series.

BTW, and on an unrelated topic, are any test cases failing on your side?

Thanks, Vitor

Previous: Pete WyckoffNext: Pete Wyckoff
Message 10 of 15 in “git-p4: Search for parent commit on branch creation”
  1. 0/3 git-p4: Search for parent commit on branch creationVitor Antunes, Jan 21, 2012
  2. 1/3 git-p4: Add checkpoint() taskVitor Antunes, Jan 21, 2012
  3. 2/3 git-p4: Search for parent commit on branch creationVitor Antunes, Jan 21, 2012
  4. Junio C HamanoJan 21, 2012
  5. Vitor AntunesJan 23, 2012
  6. 3/3 git-p4: Add test case for complex branch importVitor Antunes, Jan 21, 2012
  7. Junio C HamanoJan 21, 2012
  8. Luke DiamandJan 21, 2012
  9. Pete WyckoffJan 21, 2012
  10. Vitor AntunesJan 23, 2012
  11. Pete WyckoffJan 23, 2012
  12. Vitor AntunesJan 25, 2012
  13. Pete WyckoffJan 25, 2012
  14. Vitor AntunesJan 25, 2012
  15. Junio C HamanoJan 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.