| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Replace implementation of prep_ud with a call to fresh_playground
* Replace references to $ud with $playground
* Replace hardcoded changedir ../../.. etc. with $maindir
The overall functional change is fairly minimal. We now call getcwd
more often, and when we want to return to the maindir we changedir to
an absolute path instead of a relative one.
Later, we may rename prep_ud, mktree_in_ud_here, etc.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Nothing passes this argument, so no functional change.
This will make forthcoming changes more obviously correct.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is to permit code deduplication between the commands for pushing
and building. Both these sets of commands deny usage of -p, and set
$isuite, $package and $version based on the changelog.
In particular, a command that will perform a build /and/ a push can
first perform the check for -p, set $package and then call functions
to do the build. These latter functions will not complain that
$package is set thanks to the $build_or_push_prep_early_done logic.
No functional change.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| | |
Will be re-used by cmd_push_source.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
$cmd,$subcommand now global vars.
No functional change.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| | |
This produces better debug output.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| | |
No callers yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are going to want to break the meat of mktree_in_ud here out into
Dgit.pm. Dgit.pm doesn't have access_cfg, is_gitattrs_setup, and so
on.
On the other hand, we don't need any of that here: this is a fresh
tree of our own (so there is no existing .git/info/attributes to
combine with our new settings), and we ignore the config already.
So overall, little functional change: the .git/info/attributes in our
private working areas are now slightly simpler: they don't indirect
via git-defuse-attrs.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| | |
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
This avoids duplicating this rune (so the manpage can't get out of
date).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| | |
Quite ugly due to #868527. Closes:#868526.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| | |
curl prints to stdout, as the rune expects.
Reported-by: Simon Tatham
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| | |
This involves creating a new "gitish-only" branch in the example
worktree.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|\| |
|
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Specifically, do dgit push --dry-run. This will check that the source
package and git tree agree - ie, that what we have produced can
round-trip through dpkg-source.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Experimentally, dpkg-source on stretch will create patches to create
new symlinks. (It will fail on attempts to modify existing symlinks
and it ignores attempts to change plain file executability.)
Implementation: add an alternative which tolerates the git symlink
mode. This replaces the check on $oldmode, which in this context we
know is all 0s and can therefore never match.
While we're here, change the error message.
Closes:#857382.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't care what the old mode was; if we tell dpkg-source to record
the deletion it can do so.
But we do care that it was a file. Experimentally, dpkg-source on
stretch ignores attempts to delete symlinks.
The removal of the check for $newmode has no functional change,
because in this context we know that $newmode is all 0s. If it
wasn't, we would have been in "both old and new files exist", above.
So that limb of the test will never match and should be removed.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are going to want to handle these cases separately because the
behaviour of dpkg-source is different.
In this commit, simply clone the existing code (and add a few
comments), so no functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Permit symlinks (which have mode 120000 in git) to make their way
through for more detailed checks.
No functional change except to error messages, because:
* If neither thing was a symlink, then the existing regexps
still match and the new "modified symlink" clause will not,
so the flow is unchanged.
* Otherwise, if both $oldmode and $newmode match [^0], ie,
this is a modification rather than deletion or removal,
we insist that $oldmode=$newmode, and then, fail the
new "modified symlink" check.
* Otherwise, we fail the check for default mode.
So in the case we are allowing to proceed further, we fail as before.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We are going to tolerate symlink creation, because dpkg-source can
consume patches to create symlinks (even though it cannot create
them).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Specifically,
git-gc --aggressive --prune=all
This shrinks it quite a lot.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are going to want to test alternation/deletion of symlinks and
non-644 files.
To test this we need to switch to using example_1.1.orig.tar.gz (and
the corresponding git branch in the worktree), so that we have
such existing objects.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
But still insist on date, and hence on the actual committer and author
commit header fields. Peter Green reports that eg 66c65d90db100435 in
upstream linux.git is such a commit (and is accepted by github).
Closes:#863353.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| | |
This is really helpful when debugging.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In most cases we could carry on and fail later. But creating a broken
symlink is undesirable, particularly because it might prevent dgit
from trying to make a non-broken symlink pointing elsewhere in future
(or prevent dget from downloading the file).
Even worse, if the dsc is in .. but an absolute path was provided, we
would make a circular symlink!
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Close examination of this code path reveals that:
* The error is generated only if $there contains no slash.
* This can only occur if $dscfn matches the first regexp,
ie $dscfn is [./]../X in which case $there becomes X
* So in this situation, $there is simply the dsc filename
which is supposed to be in ..
* What we should be testing is ../$f but that is $here
which is what are trying to create and which we statted
earlier and got ENOENT for.
So this occurs when the dsc is in .. and a file it refers to is
missing.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Provide a special error message if lstat succeeds but lstat fails.
This is not hypothetical - currently even dgit import ../blah.dsc can
generate this situation !
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |\
| | |
| | |
| | | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|\| |
| | |
| | |
| | | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Without this option, git-diff-tree might detect a rename (or possibly
even a copy). If it does it prints a different output format with a
status of C or R *and a separate filename*. The latter is an
additional nul-terminated record and would get dgit's interpreter of
the git diff-tree output out of step.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| |/
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
| | |
|