Commit Graph

9 Commits

Author SHA1 Message Date
Greg Price fc0b99cd62 tools: Apply `set -x` to just the interesting parts of *-pull-request.
The Git commands we're invoking to do the real work are useful to
print, for transparency to see what's happening and that there's no
magic here.

The boring shell stuff like `remote=${2:-"upstream"}` is not so
helpful, and nor is the rather arcane and in any case read-only
command `git diff-index --quiet HEAD`.  Those only add noise that
obscures the interesting parts.  So, move the `set -x` down to when
we're done with the boring preparatory stuff and ready to perform
the commands that do the work.
2020-04-06 17:52:10 -07:00
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00
Anders Kaseorg b920d19358 fetch-rebase-pull-request: Fix shellcheck warnings.
In tools/fetch-rebase-pull-request line 15:
git checkout -B "review-${request_id}" $remote/master
                                       ^-- SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-08-03 09:15:26 -07:00
Tim Abbott abd09cebb2 git tools: Make error messages more clear. 2017-05-08 10:51:59 -07:00
Rishi Gupta 44502da767 tools: Add check for uncommitted files to PR review scripts. 2017-04-11 22:29:38 -07:00
Christie Koehler 24e2690ec2 tools: Improve git scripts.
Minor fixes that enable the ability to:

- Re-run fetch-rebase-pull-request.
- Specify the name of the remote repo as an optional second parameter.
  The default remains 'upstream'.
2016-10-11 13:38:38 -07:00
Sahil Dua 058587da77 Remove extra new lines at the ends of Zulip authoried files.
Fixes #1627.

[tweaked by tabbott to avoid patching third-party modules, for now]
2016-09-26 21:05:24 -07:00
Tim Abbott 4c834172ed tools: Use 'upstream' as expected name for main zulip repo.
Fixes: #1698.
2016-08-24 14:23:37 -07:00
Tim Abbott 39e80b351d Add simple tools for fetching content of a pull request by ID. 2015-12-25 16:22:00 -08:00