summaryrefslogtreecommitdiff
path: root/Debian/Dgit.pm
Commit message (Collapse)AuthorAge
* i18n: Dgit.pm: mark final batch of messages (2)Ian Jackson2018-10-01
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: parsecontrol: Improve error message for failed openIan Jackson2018-10-01
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Split here doc for reflog cache commit message (nfc)Ian Jackson2018-10-01
| | | | | | This will make the translation markup auditable. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Improve message for control file parse failureIan Jackson2018-10-01
| | | | | | Use fail rather than die. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Improve symlink failure messageIan Jackson2018-10-01
| | | | | | | Use fail rather than die, and print a newline. This is used sometimes to link origs etc. Hopefully if this fails the user will know why. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Replace many die calls with confessIan Jackson2018-10-01
| | | | | | | | As a rule of thumb, anything where we would end up printing the line number in Dgit.pm is wrong. Most of these are internal errors or unexpected syscall failures. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Dgit.pm: mark some of messages (1)Ian Jackson2018-10-01
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Improve getcwd failure messageIan Jackson2018-10-01
| | | | | | Don't print the pointless line number in Dgit.pm. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Rename ___ to f_Ian Jackson2018-09-29
| | | | | | | | I have decided that's a better name. Not _f because, unlike printf (where f is done first, and then print), here the _ is done first and then f. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Flag a handful of messages for translationIan Jackson2018-09-29
| | | | | | This is just useful for testing the forthcoming machinery, so far. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Source-level framework: call setlocale, provide __ and ___Ian Jackson2018-09-29
| | | | | | | This is the general plumbing for looking up translated messages - the consumer-side. No actual messages are flagged for translation yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move reflog_cache_* from dgitIan Jackson2018-08-12
| | | | | | | | We are going to want this for git-debrebase merge resolutions. NFC other than the usual change to literal `git'. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move $maindir* up the file.Ian Jackson2018-08-12
| | | | | | | | We're going to want these for the reflog cache functions. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move make_commit_text from dgitIan Jackson2018-08-12
| | | | | | NFC other than the usual change to literal `git'. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: failmsg: Remove all double newlines, not just the firstIan Jackson2018-08-11
| | | | | | | I don't think this makes any difference with the current error messages. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: printdebug: Selectively print $debugprefix, and add a docIan Jackson2018-08-11
| | | | | | | | | Remember whether the last printdebug ended in a \n. If it didn't, suppress printing the next newline. I don't think anywhere calls printdebug without @_ right now. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: printdebug: Strip empty strings from @_ and maybe quit earlyIan Jackson2018-08-11
| | | | | | Now the meat of the function always has nonempty $_[-1]. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: printdebug: Break apart the printIan Jackson2018-08-11
| | | | | | NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: printdebug: Refactor slightlyIan Jackson2018-08-11
| | | | | | This will make the next commits easier. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Introduce $debugcmd_when_debuglevelIan Jackson2018-08-11
| | | | | | | | | This is also intended to be usefully localisable, and works by localising $printdebug_when_debuglevel. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Introduce $printdebug_when_debuglevelIan Jackson2018-08-11
| | | | | | | | This is intended to be usefully localisable. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* 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>