Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
ezyang committed Aug 10, 2024
1 parent 600e9c8 commit 76d2812
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Empty file added .github/ghstack_direct
Empty file.
9 changes: 8 additions & 1 deletion ghstack/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,14 @@ def __post_init__(self) -> None:
default_branch = repo["default_branch"]

object.__setattr__(self, "base", default_branch)
object.__setattr__(self, "direct", bool(self.direct_opt))

# Check if direct should be used, if the user didn't explicitly
# specify an option
direct = self.direct_opt
if direct is None:
direct = self.sh.git("cat-file", "-e", "HEAD:.github/ghstack_direct", exitcode=True)

object.__setattr__(self, "direct", direct)

# ~~~~~~~~~~~~~~~~~~~~~~~~
# The main algorithm
Expand Down

0 comments on commit 76d2812

Please sign in to comment.