From patchwork Thu Jan 16 20:36:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11337765 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CE23139A for ; Thu, 16 Jan 2020 20:36:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49B4F2075B for ; Thu, 16 Jan 2020 20:36:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="udLo6p9v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388036AbgAPUgg (ORCPT ); Thu, 16 Jan 2020 15:36:36 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39744 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729637AbgAPUgf (ORCPT ); Thu, 16 Jan 2020 15:36:35 -0500 Received: by mail-pf1-f195.google.com with SMTP id q10so10793659pfs.6 for ; Thu, 16 Jan 2020 12:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p9CuCKi/K1gnzNNdmC7X9dz8Nca6UM53SC/q2hKYxXE=; b=udLo6p9vI5K4fo7qfwjNKQ6dnojS537/iypyQb/m5EY50k2ZbVEW0oVA/1nw3BmhJw XEnhp5B9FW1XOIzQvmcR0YNToPBa+pLWU4JSs/Jgqu2MA1CFpc2bhIe3ql8SsG51xU3P dAGsAME7G+ceBUCWta/ST2Id8g6xDTjFl4PS/1lIZyigryIaQ4QHKQ7IYY40GMsH3oQY k6Wb57bUu0GUrtWGNnVGUP23LFaxObkJVkbyXUhz4WO14bcbdHPj2Lfp0lI8TGR/Z7ro ZpTVXN9mssW/ZlvWyao5vacyzMO02iC62FHN7Ruyz2H6XcJx/zM60jc8k6ojoYSAXfHe TfTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p9CuCKi/K1gnzNNdmC7X9dz8Nca6UM53SC/q2hKYxXE=; b=evuCdcGb513VZddgoXCn/aSkZTnj+VA7THE4Hz69OHk9yAtCZfNgOA3LcH/hPRqspr M1OzdyxQLdy/PW7VLi83uXyDb52NvCySFdGQ0tz/v4OFslQgt0yCqfXInWJerjhUxQZ6 97Ie50FXiDuacYvgAl5jYcCEMePqQ0q6JvkyIUkV4vd024ifhmkWrEqi+mCNQfjwhN1D NgXy/EMztSA12EYkrdrk0M+ywbyAtTjOt5B+vKn8//XF8tgleAi+LfOxo9aRXyo2PQbc SktQ6idFfhk+q612bUJ/MCf3Vd646Kf6YkKIXUvSfUkGmlBzXz7tzpUambt28NIUInLH E1ww== X-Gm-Message-State: APjAAAUY7LiKzWWqxkiipfPtrSMJz7lSb6KEDxux3v6dRrc1y6aBaTYI o8TIDuphYPJs/erbZ67YKL56vQpVWb65Sw== X-Google-Smtp-Source: APXvYqxuyK4fv1ik37TxcMChx4/ww2YWQZjKIwGQ8zl4A3+FQ0FOvcuhi3EKQqL8YWiX+LxUS5zVEw== X-Received: by 2002:a63:1b0a:: with SMTP id b10mr41020048pgb.56.1579206994691; Thu, 16 Jan 2020 12:36:34 -0800 (PST) Received: from konoha.iitr.ac.in ([103.37.201.173]) by smtp.gmail.com with ESMTPSA id d4sm3481167pjg.19.2020.01.16.12.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 12:36:33 -0800 (PST) From: Shourya Shukla To: git@vger.kernel.org, gitster@pobox.com, johannes.schindelin@gmx.de Cc: Shourya Shukla Subject: [PATCH 0/3] t6025: updating tests Date: Fri, 17 Jan 2020 02:06:19 +0530 Message-Id: <20200116203622.4694-1-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Greetings everyone! This is my first ever contribution in the Open-Source Community and I chose Git for this purpose as I have been using this important tool to maintain my projects regularly. In this patch, I have: - modernized these tests so that they meet current Git CodingGuidlines[1] - replaced the pipe operator with the redirection operator so that one can detect the errors easily and precisely - used helper function 'test_path_is_file()' to replace 'test -f' checks in in the program as it improves the readability of the code and provides better error messages Also, I have some questions to better my understanding of the code: - In the statement, > git hash-object -t blob -w --stdin is it necessary to explicitly specify the type 'blob' of the hash-object? I have this question because it is the default type of hash-object. - In the statement, > l=$(printf file | git hash-object -t blob -w --stdin) I have not used the redirection operator as this sub-shell will be executed separately, hence its error cannot be captured therefore the presence of '>' will not matter. Will using '>' improve the code? Thanks, Shourya Shukla Shourya Shukla (3): t6025: modernize style t6025: replace pipe with redirection operator t6025: use helpers to replace test -f t/t6025-merge-symlinks.sh | 97 ++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 47 deletions(-)