summaryrefslogtreecommitdiff
path: root/git-debpush
Commit message (Collapse)AuthorAge
* git-debpush: avoid a pipefail problem in get_file_from_refSean Whitton2020-02-02
| | | | | | | | | | | | | | `grep -q` exits as soon as it finds a matching line, potentially sending a SIGPIPE to git-ls-tree. We have pipefail turned on, so that can make the whole pipeline exit nonzero, which is wrong when grep did in fact find a match. This solution is more readable than disabling pipefail just for this line (as is done elsewhere in git-debpush). Closes: #940588 Reported-by: Andrej Shadura <andrewsh@debian.org> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Check for a detached head when pushing HEADSean Whitton2019-07-22
| | | | | | | See discussion in #932612. Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Check for unstitched git-debrebase branchSean Whitton2019-07-22
| | | | | | Closes: #932612 Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Check that patches are (un)applicableSean Whitton2019-07-22
| | | | | | Closes: #932477 Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: check_treesame: Show diffstat when there is a diffSean Whitton2019-07-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: check_treesame: Also pass --quiet to 'git diff'Sean Whitton2019-07-22
| | | | | | | Otherwise, when using git-debpush in a terminal, the user will get a pile of unwanted diff output each time check_treesame is called. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Do not spuriously print -sn/-skIan Jackson2019-07-22
| | | | | | | | When looking for -sn or -sk in debian/source/options, we need to not print it to stdout even if grep finds it. So use -q. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: use -m rather than -F- <<EOFIan Jackson2019-07-22
| | | | | | | | | | | | | | This means that a run with set -x shows the tag data that is being signed. The user can even then try it again. It will make it easier to do some kind of dry run, too, if we want to. We are really not in danger of hitting a command line length limit. (It also involves fewer syscalls, less use of /tmp etc., although that is really irrelevant here.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* git-playtree-setup: Rename from git-playtree-createIan Jackson2019-07-21
| | | | | | | The name is from when I thought it would actually mkdir. But it doesn't. No overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-playtree-create: Fix with tests/using-intreeIan Jackson2019-07-21
| | | | | Reported-by: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-playtree-setup: Provide to git-debpushIan Jackson2019-07-21
| | | | | | | | Not used yet, so no overall functional change to the script. The .deb has a new file. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Check upstream source is identical in the upstream tagSean Whitton2019-07-20
| | | | | | Closes: #932476 Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debpush: Support forcing individual checksSean Whitton2019-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While using git-debpush interactively, if the user sees that checks have failed which they know to be safe to override, they typically just use --force or -f. However, it is useful for scripts to be able to skip single checks, and if the user knows that a check will fail in advance of running git-debpush, it is convenient to be able to specify that but still see whether other checks fail, where those failures were unexpected. This can avoid the user having to run git-debpush more than once. The list of any checks which failed but were overridden is not stored in the generated tag. git-debpush's checks are for the convenience of the local user only, and the list of failed but overridden checks is not considered to be metadata for the upload. Not recording failed but overridden checks in the git tag keeps git-debpush's checking independent of its wrapping of git-tag and git-push, which makes git-debpush simpler and easier to understand. The complexity is on the server side, in tag2upload. git-debpush(1): We want the list of checks that can be overridden to be at the bottom of the list of options because most users will not need to look at it. We also want the description of --force|-f to be adjacent to the description of --force=<check>. So move the description of --force|-f to the end of the list of options. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Closes: #932459
* git-debpush: SubheadersSean Whitton2019-07-20
| | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: refactor to avoid more than one push commandSean Whitton2019-07-17
| | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: check that upstream tag is ancestor of $branchSean Whitton2019-07-17
| | | | | | Closes: #932096 Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: gather some information earlierSean Whitton2019-07-17
| | | | | | | | For use by sanity checks. Pure code motion. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: cope with spaces in user-supplied upstream tagSean Whitton2019-07-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: check for target suite change since last uploadSean Whitton2019-07-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: check for pushing the dgit view to the maintainer viewSean Whitton2019-07-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: factor out find_last_tag()Sean Whitton2019-07-17
| | | | | | | | Also determine the last debian/ tag earlier, for use by sanity checks. No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: introduce and call fail_checkSean Whitton2019-07-17
| | | | | | | | | | | | | | Without this, passing --force to override an earlier sanity check might cause the user to miss the output of a later sanity check, which would never get run. We don't want to have multiple forcing options to override different sanity checks, as that is too much complexity for a script like this. So always run all checks, and error out afterwards if at least one of them failed. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Don't pretend to support --baredebian+tarballSean Whitton2019-07-07
| | | | | | | | | Instead of just deleting the option from the argument parser, accept it, but print a message explicitly stating that the *quilt mode* is not supported by this workflow (i.e. it's not just git-debpush passing the quilt mode on to tag2upload that we don't support). Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Defend against git-deborig #931509Ian Jackson2019-07-07
| | | | | | | | | | | | | | | | | | | | | | | | Without this, when git-deborig fails and #931509 isn't fixed, git-debpush will silently exit with a nonzero exit status which is very unfriendly. With this change it does something like this: git-debpush: git-deborig failed; maybe try git-debpush --upstream=TAG fatal: Invalid object name 'refs/tags/couldn't find any of the following tags'. It then exits status 127. This is obviously daft, but making this any better is even more complex. When git-deborig is fixed it will do this: couldn't find any of the following tags: 1.0, v1.0, upstream/1.0 tell me a tag or branch head to make an orig.tar from: git deborig --just-print '--version=1.0-1' COMMITTISH git-debpush: git-deborig failed; maybe try git-debpush --upstream=TAG which is still not brilliant but I guess it will do. The downside, if it is one, is that we lose git-deborig's original exit status. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Support --upstream=TAG (and document it)Ian Jackson2019-07-07
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debpush: Defend against unexpected git-deborig outputIan Jackson2019-07-07
| | | | | | | | | | | If git-deborig prints something other than a tag name, for example an error message (see #931509), this approach will bomb out, roughly appropriately. This will also become useful when we make upstream_tag overrideable. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Change comment headingIan Jackson2019-07-07
| | | | | | | | | IMO "Principles of Operation" would be a comprehensive reference detailing the model and functionality. I think "Design Principles" is the conventional name for semi-self-imposed choices/constraints. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Acked-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Fixes to help with pushing native packagesIan Jackson2019-07-07
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debpush: Numerous improvementsSean Whitton2019-07-07
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* git-debpush: Tolerate not specifying a quilt mode if not neededIan Jackson2019-07-07
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debpush: new scriptSean Whitton2019-07-06
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>