git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Sheikh hamza via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Sheikh hamza <sheikhhamza012@gmail.com>,
	sheikh hamza <sheikhhamza012@gmail.com>
Subject: [PATCH] bisect: remove root directory restriction for git bisect
Date: Sun, 22 Mar 2020 09:15:47 +0000	[thread overview]
Message-ID: <pull.736.git.git.1584868547682.gitgitgadget@gmail.com> (raw)

From: sheikh hamza <sheikhhamza012@gmail.com>

    according to the open issue #486 the git bisect
    command should be able to run from inside any
    subdirectory and in the same disscusion "dscho"
    gave the directions and those directions lead me
    the fix of adding SUBDIRECTORY_OK=Yes on L#34
    before sourcing git-sh-setup that made it work as
    in git-sh-setup there was a check on SUBDIRECTORY_OK
    that prevents it to run in sub directories if it is not
    set to "ok" as this file was also sourced in other commands
    that are required to only run from root one of such scripts
    is git-filter-branch

Signed-off-by: sheikh hamza <sheikhhamza012@gmail.com>
---
    bisect: remove root directory restriction for git bisect
    
    according to the open issue #486 the git bisect
    command should be able to run from inside any
    subdirectory and in the same disscusion "dscho"
    gave the directions and those directions lead me
    the fix of adding SUBDIRECTORY_OK=Yes on L#34
    before sourcing git-sh-setup that made it work as
    in git-sh-setup there was a check on SUBDIRECTORY_OK
    that prevents it to run in sub directories if it is not
    set to "ok" as this file was also sourced in other commands
    that are required to only run from root one of such scripts
    is git-filter-branch

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-736%2Fsheikhhamza012%2Fbisect_subdirectory_fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-736/sheikhhamza012/bisect_subdirectory_fix-v1
Pull-Request: https://github.com/git/git/pull/736

 git-bisect.sh            | 1 +
 t/perf/bisect_regression | 6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index efee12b8b1e..8c1da200e41 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -31,6 +31,7 @@ git bisect run <cmd>...
 
 Please use "git help bisect" to get the full man page.'
 
+SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
 . git-sh-setup
 
diff --git a/t/perf/bisect_regression b/t/perf/bisect_regression
index ce47e1662a9..d6b96f49e46 100755
--- a/t/perf/bisect_regression
+++ b/t/perf/bisect_regression
@@ -57,11 +57,9 @@ tmpdir=$(mktemp -d -t bisect_regression_XXXXXX) || die "Failed to create temp di
 echo "$oldtime" >"$tmpdir/oldtime" || die "Failed to write to '$tmpdir/oldtime'"
 echo "$newtime" >"$tmpdir/newtime" || die "Failed to write to '$tmpdir/newtime'"
 
-# Bisecting must be performed from the top level directory (even with --no-checkout)
-(
-	toplevel_dir=$(git rev-parse --show-toplevel) || die "Failed to find top level directory"
-	cd "$toplevel_dir" || die "Failed to cd into top level directory '$toplevel_dir'"
 
+(
+	 
 	git bisect start --no-checkout "$newrev" "$oldrev" || die "Failed to start bisecting"
 
 	git bisect run t/perf/bisect_run_script "$test_script" "$test_number" "$tmpdir"

base-commit: 98cedd0233ee88e69711f79d1126b6bd772ff5bd
-- 
gitgitgadget

             reply	other threads:[~2020-03-22  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22  9:15 Sheikh hamza via GitGitGadget [this message]
2020-03-22 10:48 ` [PATCH] bisect: remove root directory restriction for git bisect SZEDER Gábor
2020-03-22 14:30   ` sheikh hamza
2020-03-22 14:39   ` sheikh hamza
2020-03-22 14:58   ` sheikh hamza
2020-03-23 16:02   ` Johannes Schindelin
2020-03-23 16:17   ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.736.git.git.1584868547682.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sheikhhamza012@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).