bugQuilt - Bugs: bug #51668, quilt import should read from stdin

 
 

bug #51668: quilt import should read from stdin

Submitter:  Oleksandr Gavenko <gavenkoa>
Submitted:  Sat 05 Aug 2017 08:42:03 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  khali
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 11 Apr 2023 01:33:19 PM UTC, comment #4: 

Closing this bug as process substitution on the command line makes it possible to import a patch generated by any tool without writing it to a temporary file first.

As an alternative, you could also create an empty patch with "quilt new" and then use "git diff | quilt fold" to import the patch contents generated by the external tool (git in this case).

Jean Delvare <khali>
Group administrator
Mon 07 Aug 2017 03:03:15 PM UTC, comment #3: 

Yes this works for me in Cygwin Bash:

$ quilt import -P git.diff <(git diff)

Completely forget about Process Substitution.

That satisfied my needs.

Oleksandr Gavenko <gavenkoa>
Mon 07 Aug 2017 12:20:48 PM UTC, comment #2: 

Unfortunately I can't find any trace of the candidate patches mentioned in bug #46958. I must have deleted them after closing the bug.

With bash, you can use the following to achieve what you want:

# quilt import -P git.diff <(git diff)

It should work with other SCM, and with any shell supporting process substitution. Does it work for you?

Jean Delvare <khali>
Group administrator
Sat 05 Aug 2017 09:20:37 PM UTC, comment #1: 

Found ugly alternative:

  svn diff | quilt import -f -P new.diff -p0 /dev/stdin

and broken by interesting:

  hg diff | quilt fold

Oleksandr Gavenko <gavenkoa>
Sat 05 Aug 2017 08:42:03 PM UTC, original submission:  

I would like to use quilt with Git and

  • to avoid numerous "quilt add" and
  • to allow to import existing Git changes as patch


I'd like to have syntax:

  git diff | quilt import -P fix.patch -

Currently it failed with:

  Patch - does not exist

I can emulate behavior with:

  git diff >fix.patch
  quilt import fix.patch
  rm fix.patch

though it doesn't look funny in 2017 ((

Similar request is closed without no meaningful reason:

  https://savannah.nongnu.org/bugs/?46958

If this request WONTFIX please answer how I can import already applied changes from Git/HG/SVN managed sources avoiding SH/BASH kong-fu (to make "quild add ..." or save patch, un-apply changes, etc).

Oleksandr Gavenko <gavenkoa>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by khali (Posted a comment)
  • -email is unavailable- added by gavenkoa (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-11 khali StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2017-08-07 khali StatusNone Need Info
        Assigned toNone khali

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code