From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Klauser Subject: [PATCH v3 0/2] Add in-place editing support to git interpret-trailers Date: Wed, 13 Jan 2016 13:43:07 +0100 Message-ID: <1452688989-13746-1-git-send-email-tklauser@distanz.ch> Cc: Matthieu Moy , Eric Sunshine , git@vger.kernel.org To: Junio C Hamano , Christian Couder X-From: git-owner@vger.kernel.org Wed Jan 13 13:43:30 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aJKlt-000895-CG for gcvg-git-2@plane.gmane.org; Wed, 13 Jan 2016 13:43:29 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760060AbcAMMnR (ORCPT ); Wed, 13 Jan 2016 07:43:17 -0500 Received: from mail.zhinst.com ([212.126.164.98]:54483 "EHLO mail.zhinst.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757408AbcAMMnP (ORCPT ); Wed, 13 Jan 2016 07:43:15 -0500 Received: from ziws06.zhinst.com ([10.42.0.7]) by mail.zhinst.com (Kerio Connect 9.0.1) with ESMTP; Wed, 13 Jan 2016 13:43:08 +0100 X-Mailer: git-send-email 2.7.0.1.g5e091f5 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: This patch series adds support for in-place editing to git interpret-trailers akin to sed -i, perl -i. v2->v3: - Rephrase two error messages according to the suggestions by Matthieu Moy. v1->v2: - Split patch to make review easier, as suggested by Matthieu Moy. - Rename FILE * function parameters to a more readable name, as suggested by Matthieu Moy. - Write output to temporary file and rename after successfully written in full to avoid losing the original file in case of an error/interrupt. Pointed out by Eric Sunshine. Tobias Klauser (2): trailer: use fprintf instead of printf interpret-trailers: add option for in-place editing Documentation/git-interpret-trailers.txt | 24 +++++++++++- builtin/interpret-trailers.c | 13 +++++-- t/t7513-interpret-trailers.sh | 32 ++++++++++++++++ trailer.c | 63 +++++++++++++++++++++++++------- trailer.h | 3 +- 5 files changed, 115 insertions(+), 20 deletions(-) -- 2.7.0.1.g5e091f5