summaryrefslogtreecommitdiff
path: root/Debian/Dgit.pm
Commit message (Collapse)AuthorAge
...
* Dgit.pm: Move upstreamversion from dgitIan Jackson2018-08-03
| | | | | | NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Deconfuse argument orders of is_orig_file_of_p_v etc.Ian Jackson2018-08-03
| | | | | | NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move is_orig_file_of_p_v and its dependencies from dgitIan Jackson2018-08-03
| | | | | | | | | We want is_orig_file_of_p_v, so move it and all the things it depends on. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move debinatag_maintview from dgitIan Jackson2018-07-08
| | | | | | | git-debrebase is about to want this for convert-from-gbp dgit split brain fixup. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Break out parsechangelog_loop from dgitIan Jackson2018-07-08
| | | | | | | | git-debrebase is going to want this. No functional change except to some debugging messages. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move parsecontrol etc. out of dgitIan Jackson2018-07-08
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* ref updates: Break out git_reflog_action_msgIan Jackson2018-06-26
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* ref updates: Honour GIT_REFLOG_ACTION everywhere.Ian Jackson2018-06-26
| | | | | | | | Specifically, every time we call git_update_ref_cmd. Closes:#901935. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* ref updates: Introduce update_ref_cmdIan Jackson2018-06-26
| | | | | | | | | | | | | | | | | | Currently the comment about `message may be modified' is rather misleading, since there is no code to do that - but it explains the semantics of the new function. We change the appropriate subset of the git update-ref call sites. These are precisely the ones where we previously specified a message with -m, except for the quilt cache (where we use the reflog message as the cache lookup key). The calls are updates of internal refs etc. We end up using qw(git) rather than @git. Otherwise no functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit, Dgit.pm: Clarify error framing a bitIan Jackson2018-06-21
| | | | | | | | | Add a newline and "error:" before most error messages. Thius makes the output clearer, by distinguishing informational output (which might or might not relate to any error which is occurring) from things which are definitely wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move shell_cmd from dgitIan Jackson2018-06-20
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: gitattributes: Defuse working-tree-encodingIan Jackson2018-06-20
| | | | | | | | | | | | | | | | | | | * Add -working-tree-encoding to $negate_harmful_gitattrs. * Add new arrangements for updating an existing dgit-defuse-attrs macro definition: - is_gitattrs: say whether the macro is up to date - setup_gitattrs: update an existing out-of-date macro - minor message changes - document the new behaviour One consequence is that we have had to breach the promise about how to stop future dgit setup-new-tree runs messing with this: it is now necessary to disapply the macro, rather than redefine it. Closes:#901900. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: gdr_ffq_prev_branchinfo: move from git-debrebaseIan Jackson2018-06-17
| | | | | | dgit is going to want this too, for interoperability. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Provide failmsg, previously buried in failIan Jackson2018-06-16
| | | | | | | | | Most of `fail' is error message construction. This change allows callers to do something other with the message, than pass it to die. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: provide $gdrlast_refprefixIan Jackson2018-06-16
| | | | | | No users yet so no functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit: provide $ffq_refprefix, for git-debrebaseIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit: provide $git_null_objIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: When checking that the tree is clean, check the git index too.Ian Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: break out git_check_unmodified from dgitIan Jackson2018-06-16
| | | | | | We (have to) use just "git" rather than @git, but this is OK I think. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm, dgit: Break $extra_orig_namepart_re out into Dgit.pm.Ian Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: "confess" when we die due to a warning, rather than symply dieing.Ian Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Break out git_get_symrefIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: git_cat_file: Introduce $etype parameterIan Jackson2018-06-16
| | | | | | No functional change for existing callers. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move $playground global to dgit.Ian Jackson2018-06-16
| | | | | | | | It makes the interface to the playground functions confusing. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* playground refactor: Dgit.pm: fresh_playground: Improve error messageIan Jackson2017-08-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* worktree support: Fix playtree_setupIan Jackson2017-08-03
| | | | | | | In a worktree, .git is not a directory. We need to use $maindir_common. Add a comment, too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* worktree support: Fix ensure_a_playground (gives absolute path now)Ian Jackson2017-08-03
| | | | | | | | | | | Make it honour $maindir_gitdir so it will DTRT in a `git worktree'. The .git/dgit play area ends up in the .git/worktrees/<worktreename> for this worktree. It now returns an absolute path. The only call site that needs adjusting is the one in fresh_playground. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* worktree support: Dgit.pm: Introduce $maindir_gitdir and _commondirIan Jackson2017-08-03
| | | | | | | | | | | | A "git worktree" separates out some of the things which used to be found in .git, into "common" things and "gitdir" things. In this patch we simply collect the relevant informaation. No-one uses it yet so there is no significant functional change. However, while we are here, we do improve an error message slightly. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* playground refactoring: Dgit.pm: Provide ensure_a_playgroundIan Jackson2017-08-03
| | | | | | | dgit wants to make a lot of temporary things in .git/dgit. That's like a playground, but dgit doesn't want it wiped. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* playground refactoring: Dgit.pm: Honour $maindir in fresh_playgroundIan Jackson2017-08-03
| | | | | | | | | | Previously, fresh_playground expected that the playground argument has exactly the depth .git/FOO/BAR. Now, it expects that $maindir is set. In dgit (the only caller right now) this is always true because dgit now uses fresh_playground. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* playground refactoring: Dgit.pm: Provide fresh_playground etc.Ian Jackson2017-08-03
| | | | | | | These functions will shortly replace the similar, but less-flexible, ad-hoc functions in dgit proper. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* playground refactoring: Dgit.pm: Expose $local_git_cfgIan Jackson2017-08-03
| | | | | | | | | | | | | This is now the default for playtree_setup. The caller can simply set it explicitly. We make this part of a new :playground export tag for Dgit.pm, which is going to gain other bits shortly. And, we add some comments, and move the global; more code and commentary will appear around this. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Revert "Dgit: Introduce in_workarea and fresh_workarea"Ian Jackson2017-08-02
| | | | | | | | | | | | | | | | | This reverts commit aa073c5bdde68a1ab5026ba4daaf29c8bf361532. These functions are not used on this branch. I originally put them here because I thought dgit would want to use them, but actually it doesn't really. There are no tests for them here and we are about to engage in refactoring which will probably accidentally break them. Instead, delete them. This revert should itself be re-reverted when these functionsn are going to be used. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* playground: playtree: rename from workareaIan Jackson2017-08-02
| | | | | | | We are going to use "playground" for containing temporary directory, and playtree for git trees within it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit: break must_getcwd out into Dgit.pmIan Jackson2017-08-02
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: in_workarea: Use changedirIan Jackson2017-07-19
| | | | | | This produces better debug output. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: changedir: Break out from dgitIan Jackson2017-07-19
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit: Introduce in_workarea and fresh_workareaIan Jackson2017-07-19
| | | | | | No callers yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: git_slurp_config_src: Break out from dgitIan Jackson2017-07-19
| | | | | | | | | | We are going to want this so we can provide better subtree setup functions in Dgit.pm, including the config transfer. No functional change, except that we now run just "git" from the path, rather than honouring dgit's @git (which is not available in Dgit.pm). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: workarea_setup: Break out from dgitIan Jackson2017-07-18
| | | | | | | | | | | This subroutine needs a hash of the main tree's git config, so that some of the config settings which affect the object store can be properly honoured. Purely code motion, except for the changed reference to $gitcfgs. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: $negate_harmful_gitattrs: Break out from dgitIan Jackson2017-07-18
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: runcmd: Break out from dgitIan Jackson2017-07-18
| | | | | | | | | | | | Move runcmd into Dgit.pm. We need to change dgit-repos-server too, but luckily its definition is essentially equivalent. No functional change to dgit. dgit-repos-server now prints somewhat better error messages when subprocesses fail. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Regularise patch filenames, and defend against funny commit subjectsIan Jackson2017-07-09
| | | | | | | * Do not specified patch names which look like series filenames * When we invent a filename based on a commit message, add ".patch". Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Call `confess' when shellquote gets an undef argIan Jackson2017-01-18
| | | | | | | | This can happen if a command (eg passed to debugcmd) has an undef argument. This turns an undefined warning into an explicit internal error. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit: forkcheck_*: break out from setup_sigwarnIan Jackson2017-01-12
| | | | | | Other places are going to want this too, notably END blocks. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: git_cat_file: clarify scalar context semanticsIan Jackson2017-01-08
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: dsc Dgit field handling: Parse additional dataIan Jackson2017-01-08
| | | | | | | So far we don't do much with it, so this akes no change except to messages. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Enforce a syntax for nominal distrosIan Jackson2017-01-08
| | | | | | | | These appear in various interchange output like tags. They should be sane. They're going to appear in Dgit: too where people will need to use them. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Provide git_cat_fileIan Jackson2017-01-06
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit-repos-server: Defend against bad commits (from eg #849041).Ian Jackson2017-01-05
| | | | | | | Right now, this causes the test `debpolicy-quilt-gbp' to fail, because in this branch #849041 is unfixed. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>