Age | Commit message (Collapse) | Author | Files | Lines |
|
The patch 6e8fdc58c786a45d7a63c5edf9c702f1874a7a19 causes StGit to raise
"warnings" (actually: errors) in the event that there are changes staged in
the index and a refresh is performed without specifying either --index or
--force. This is great for preventing an entire class of common mistakes,
but is also a giant pain when resolving conflicts after a pull/rebase.
Depending on the workflow in use, this may occur with a frequency anywhere
between "never" and "mulitple times on every pull".
This patch removes the pain by:
- Reporting unresolved conflicts *before* complaining about staged
changes, since it goes without saying that, when present, these are the
main problem.
- Not complaining about staged changes if there are no unstaged changes in
the working directory, since the presence of --index is immaterial in
this case.
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
The ChangeLog is created by the build scripts each time, so don't
worry about tracking it.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
Need a new entry for the next release.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
Sometimes it is useful to use git add interactively in order to selectively add
parts of an edit to the index, and then refresh a patch. However, standard stg
operation has refresh add every modified file to the patch. This is somewhat
annoying because it is easy to perform a git add -i and then forget to use the
'--index' option. This patch adds code which checks whether the index is clean
(no changes) before allowing a refresh. In addition, a new option '--force'
which overrides this check has been added in the cases where these are
necessary, such as adding new files in a patch.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
This patch fixes an issue with machines which have python3 and python2
installed. It requires the python2 executable by default in order to prevent
accidental use of the Python 3 series (which is not compatible.)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
Simple add of PJ's gmail address.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
This patch modifies stgit-mail in order to enable templates to move the ordering
of PATCH, the prefix, the version, and the number. The issue is due to stgit
hardcoding a ' ' after the previx, before version and before numbers. This means
that you can't design a template which re-orders these as it will result in
incorrect spacing being generated. To this end, introduce %(vspace), %(nspace)
and %(pspace) which allows a template to move the spacing around and enable
correct alignment inside a template. This won't change the default behavior (if
sticking to the standard templates) but enables more ability to customize and
modify the default behaviors.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
There was a bug where the attach option to stg mail was
not spitting out a patch that can be used by git am, because the patch
file only contained the diff.
This is derived from the same fix from Jesse Brandeburg for
the attachinline mbox fix.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
There was a bug where the attachinline option to stg mail was
not spitting out a patch that can be used by git am, because the patch
file only contained the diff.
This modifies the template to include pretty much the same text in the
mail as is in the attachment.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
With this patch, only the automatically generated sender address is
filtered out. Explicitly added one is kept.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This patch fixes a bug caused when attempting to stg uncommit --to a merge,
which stgit is not able to handle. Previously stg uncommit would output a nasty
stack trace instead of a clean warning message. This was due to checking for
multiple parents only inside the get_parent function.
The fix is to instead check for parent before appending patch to the list of
patches. Do this by creating a "check_and_append" function which will be called
instead of commits.append(n). The bug was present because of the logic for --to
not calling "get_parent" at the final "to" commit.
Note that the addition of out.done in the exception is to enable slightly better
formatting of the output message (start it on a new line instead of the previous one)
Reported-by: Matthew Vick <matthew.vick@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
Add a new mail command and mail template to send patches both as
an attachment plus inline in the mail.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
|
|
This will enable downstream distros to package them.
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
If reset() takes us from a tree where some path is a file to one
where it is a directory, then checkout() will replace the file
with the directory, and we don't want to try to os.remove() the
path (which would throw an exception because we're trying to
remove a directory.) This fixes bug https://gna.org/bugs/?15682.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Daniel Bergey <bergey@alum.mit.edu>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Daniel Bergey <bergey@alum.mit.edu>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Daniel Bergey <bergey@alum.mit.edu>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
They should now be 'reset --hard'.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This makes stgit run on different paths that resolve to the same
directory use the same stgit buffer.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Repairs bug introduced in bf7e391cbf0673575fe73915fd71c0920d0f217a.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Make it possible to distinguish between the case where the patch was
found but not the file and the case where both were found.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This prevents reload-spam when doing eval-buffer in stgit.el.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
patched file.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This makes stg produce a slightly better error message when run in a
newly initialized (empty) git tree.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
To allow parsing the header produced by versions of Git newer than the
code written to parse it, all commit parsers are expected to skip unknown
header lines, so that newer types of header lines can be added safely.
The only three things that are promised are:
(1) the header ends with an empty line (just an LF, not "a blank line"),
(2) unknown lines can be skipped, and
(3) a header "field" begins with the field name, followed by a single SP
followed by the value.
The parser used by StGit, introduced by commit cbe4567 (New StGit core
infrastructure: repository operations, 2007-12-19), was accidentally a bit
too loose to lose information, and a bit too strict to raise exception
when dealing with a line it does not understand.
- It used "strip()" to lose whitespaces from both ends, risking a line
with only whitespaces to be mistaken as the end of the header.
- It used "k, v = line.split(None, 1)", blindly assuming that all header
lines (including the ones that the version of StGit may not understand)
can safely be split without raising an exception, which is not true if
there is no SP on the line.
This patch changes the parsing logic so that it:
(1) detects end of the hedaer correctly by treating only an empty line as
such;
(2) handles multi-line fields (a header line that begins with a single SP
is appended to the previous line after removing that leading SP but
retaining the LF between the line and the previous line) correctly;
(3) splits a line at the first SP to find the field name, but only does
so when there actually is SP on the line; and
(4) ignores lines that cannot be understood without barfing.
Updated following comments from Michael Haggerty.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
shortcut for: stg delete `stg top`
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
It was missed on the previous release.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
asciidoc complains about using level 0 section in a non-book document.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
|
|
Signed-off-by: Norbert Nemec <Norbert@Nemec-online.de>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
There isn't really any point in keeping another status command. The only
functionality missing would be 'status --reset' but this was moved to
the 'reset --hard' command (similar to what Git does).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This is similar to the git reset --hard command.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This TODO item was done with this commit, so remove it.
c6f366f6b7452e24edf5bff06da8b69c500899a4
Author: Catalin Marinas <catalin.marinas@gmail.com>
Date: Fri Jan 26 22:29:10 2007 +0000
Make the 'series --short' length configurable
The 'shortnr' config option was added so that one can set a different
length than the default 5.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: Lu Guanqun <guanqun.lu@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
With this patch, we can now specify part of a long patch name, and it will try
to match the correct one.
Signed-off-by: Lu Guanqun <guanqun.lu@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The ANSI escape sequence chart is got from http://pypi.python.org/pypi/colorama
The example file is updated as well to show how to specify the colors.
Signed-off-by: Lu Guanqun <guanqun.lu@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Lu Guanqun <guanqun.lu@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This fixes the failing test added in the previous patch. Bug
discovered by and fixed in collaboration with Dan Härdfeldt.
The offending line was added in
ba52890d Record a single transaction for conflicting push operations
but I can't see why.
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Instead of spawning a separate diff-tree process for every pair of
trees we want to diff. This speeds things up slightly: about 10% when
uncommitting and rebasing 1470 linux-kernel patches (perftest.py
rebase-newrebase-add-file-linux).
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
When some unknown key/value pairs are found in the commit data, StGit
crashes. It looks like this can actually happen with the "encoding:
latin1" pair.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Zane Bitter <zane.bitter@alliedtelesis.co.nz>
Tested-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This bug was introduced in 3f19450c426970b78b19c522a82df1a962da5761
It should report the commit stg stack is based on, but not the
last patch in stack.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This has been required for some time. If you need to take a branch out
of StGit control, use this option (keeps the branch but removes the
metadata).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Juergen Wieferink <wieferink@fhi-berlin.mpg.de>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The automatically generated patch names are truncated to
stgit.namelength but this was truncating the final words.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
With the --to=<commit> option to uncommit, if the given commit is not in
the history just try to find the common ancestor and uncommit to that
point (exclusive range).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This is for cases where we need to use one of the elements of the list.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Instead of spawning a separate cat-file process for every blob and
commit we want to read. This speeds things up slightly: about 6-8%
when uncommitting and rebasing 1470 linux-kernel patches (perftest.py
rebase-newrebase-add-file-linux).
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Move faces to a customization subgroup.
Sort customization entries in a more user-friendly way.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Use 'git log -<N>' to list historical commits. This avoids showing
more than stgit-committed-count patches (for merges) and does not
cause an error when running out of history.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Also make stgit-{previous,next}-patch behave the same way when moving
past the first/last patch.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Fixes omission in 8f489f41f8ffe6e06254cefc5b352610df06cbeb.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Use --diff-filter=C when showing the diff of the copy operation.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
|
|
Also fix capitalization in edit's short description.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
|
|
If committing a patch in the middle of a series, the resulting stack
doesn't have any patches applied. The trans.pop_patches() function only
returns the additional patches that had to be popped rather than all
popped patches. The patch also adds some tests for the 'commit' command.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Reported-by: Jeenu Viswambharan <Jeenu.Viswambharan@arm.com>
Cc: Karl Hasselström <kha@treskal.com>
|
|
* gustav/proposed: (22 commits)
stgit.el: Make ! with prefix argument prompt for git command
stgit.el: Make ! sort patches when building command line
stgit.el: Add visual feedback (a message) when toggling view flags
stgit.el: Add stgit-inhibit-messages
stgit.el: Add support for showing git-svn information
stgit.el: Remove useless defvars
stgit.el: Use forward-line instead of goto-line non-interactively
stgit.el: Make stgit-toggle-* behave as documented
stgit.el: Make "C-u r" raise error if run with prefix argument without a patch
stgit.el: Make stgit-reload move point more intuitively when a patch disappears
stgit.el: Allow showing recent historical (committed) commits as well
stgit.el: Add stgit-line-format
stgit.el: Minor improvements of stgit{,-noname}-patch-line-format documentation
stgit.el: Delay automatic refresh of stgit buffers a bit
stgit.el: Refresh stgit buffer after dired-delete-file
stgit.el: Refactor: use mapc to set all local variables in stgit-mode
stgit.el: Add stgit-default-show-{ignored,unknown}
stgit.el: Fix so "t u" and "t i" only operate on the current buffer
stgit.el: Move to goal column after expanding unknown directory
stgit.el: Ask for branch point when creating new branch
...
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
These defvars are no longer needed as they are defined as buffer-local
in stgit-mode.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Add macro stgit-define-toggle-view to implement these functions.
Repair prefix argument behavior.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This is controlled with the "t h" command.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This function will be used in the following patch.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This prevents multiple consecutive refreshes when several
refresh-causing operations are done after each other, which happens
when one does recursive deletes.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
This makes sure git-config branch.<branch>.parentbranch is set correctly.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This makes carriage return and similar be handled correctly, which is
important as some git commands use those.
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The author should be the one reverting the patch rather than the creator
of the reverted commit. The patch also improves the revert message to
contain the description of the reverted commit.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This way other commands like sink and pop can use the interactive
mergetool.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The default Python implementation (at least 2.5 and earlier) fold long
e-mail header lines by inserting "\n\t". This causes issues with some
e-mail clients that remove both "\n\t". The RFC2822 shows that folding
should be done with "\n ". The Python workaround is to use a Header
object instead of a string when setting the message headers.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@gmail.com>
|
|
The original implementation was asking for the SMTP password on every
patch sent. This patch only asks the password once before sending or
even editing the cover message and patches.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Cc: Pavel Roskin <proski@gnu.org>
Cc: Alex Chiang <achiang@hp.com>
|
|
The alias commands are not real StGit commands and the corresponding set
(kind) defined in stgit/commands/__init__.py is empty. This leads to a
KeyError in the _command_list() function. The patch ignores empty sets.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This patch introduces support StGit command aliases with a few defaults:
stg add -> git add
stg rm -> git rm
stg mv -> git mv
stg resolved -> git add
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The patch pre-populates the cached config options with the default
values. It also removes an unused option (stgit.extensions).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The new option names are --in-reply-to and --no-thread.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
StGit commands resulting in a conflicting patch pushing record two
transactions in the log (with one of them being inconsistent with HEAD
!= top). Undoing such operations requires two "stg undo" (possibly with
--hard) commands which is unintuitive. This patch changes such
operations to only record one log entry and "stg undo" reverts the stack
to the state prior to the operation.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Cc: Gustav Hållberg <gustav@virtutech.com>
Cc: Karl Wiberg <kha@treskal.com>
|
|
When using stg mail in --git mode, do not parse command-line To/Cc/Bcc
addresses.
Instead, we pass them directly to git send-email.
This allows us to leverage git send-email's support for email aliases.
Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This is the first step in turning stg mail into a wrapper for
git send-email. It requires passing the --git option to stg mail
for now.
Only a few basic options are supported for now, namely To/Cc/Bcc.
git send-email options used:
--suppress-cc=self prevent further information prompts
--quiet reduce git send-email output
Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Factor __update_header out of __build_address_headers.
Headers like Reply-To, Mail-Reply-To, and Mail-Followup-To are now
handled in __build_extra_headers.
We make this change because in the future, we do not want to call
__build_address_headers if using git send-email but we will always
want to call __build_extra_headers.
Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Factor out the common code required to send either a cover mail
or patch, and implement it in __send_message.
WRY? DRY.
Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Reorder the argument lists for both __build_cover and __build_message.
This change will aid readability of a subsequent refactoring patch.
Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Instead of passing all the various smtp* args to __send_message
individually, let's just pass the options list instead.
The main motivation is for future patches. The end goal is to
thin out stg mail's implementation and make it a minimal wrapper
around git send-email. By passing the options list to __send_message
we prepare to pass options directly to git send-email.
As a bonus, this change results in a cleaner internal API.
Finally, it also pushes the smtp logic where it belongs, viz. into
__send_message_smtp, instead of cluttering up the main body of
mail.func().
Cc: Karl Wiberg <kha@treskal.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
This prevents unchanged files from showing up as "Modified" in the
work tree.
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
This stops stgit-diff-range from moving point.
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
stgit.el: Make "G" work before/after the tree
stgit.el: Repair how patches with empty descriptions are shown
|
|
|
|
This command was replaced by "stg series --applied" but the above shell
script hasn't been changed. This is a fix for bug #557475.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
index/worktree
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Let RET on unexpanded directories expand the directory.
This is similar to how git-status does it.
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
|
|
Introduce an "alternate" patch line format and make "t n" toggle
between the two.
Signed-off-by: David Kågedal <david@virtutech.com>
|
|
Signed-off-by: David Kågedal <david@virtutech.com>
|
|
Signed-off-by: David Kågedal <david@virtutech.com>
|
|
Signed-off-by: David Kågedal <david@virtutech.com>
|
|
|
|
|
|
This is a fix for bug #14672.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
state
The test currently fails.
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
|
|
StGit was relying on Makefile to generate some files but this breaks
using setup.py directly for targets like rpm.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Send "-p<N>" flag to "git apply" rather than "-p <N>".
This removes dependency on git 1.6.2, commit:
f26c494 parse-opt: migrate builtin-apply.
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Also document what "-n<negative>" does.
Added some push tests to t1203-pop.sh and renamed it t1208-push-and-pop.sh.
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This patch renames --reverse to --revert and sets the picked patch
message similar to the "git revert" command.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The patch sets a metavar for this option's definition.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The MessagePrinter constructor redirects stderr to stdout if the output
is not a file. This makes it difficult for tools needing to filter the
error output (like Documentation/Makefile building the COMMANDS
variable).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
The stgit.config code dumps a stack trace if git-config returns an error
(when, for example, there is no ~/.gitconfig file).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
If setup is run in a directory without .git, setup.py deletes the
stgit/builtin_version.py file and subsequent commands no longer have a
version. See bug #14480.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This is important if we have a custom rebase command (like "git svn
rebase").
Signed-off-by: Jakob Stoklund Olesen <stoklund@2pi.dk>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This is to avoid a merge commit when fast-forwarding is possible.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
If the first part of the range is missing, stgit was not assuming HEAD.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Some mail clients use this MIME type rather than text/plain.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
If stgit.autosign configuration is set, allow the automatic signing of
the imported patches, similar to the 'new' command.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This option was added to import, so it makes sense for fold to have it
as well.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
If the import failed, do not leave an empty patch on the stack. If this
is required, the --reject option should be passed. The patch also fixes
a lowercase typo in the --reject option description.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
Since we have a 'reject' argument, there is no need for the failed diff
to be dumped.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
This patch modifies the Repository.diff_tree() function to generate
binary diffs by default. This way commands like 'export' would generate
patches containing the full information.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
|
|
The import has two stages - one for creating the initial empty commit
with the patch description followed by a refresh once the diff was
successfully applied. The second refresh resets the author date to the
current one. This patch passes the given author date to the
refresh_patch function.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
|
|
This patch renames some of the existing import options and adds the -p
(--strip) option which allows stripping the leading slashes of the diff
paths.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
|
|
|
|
Signed-off-by: David Kågedal <david@virtutech.com>
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
This patch modifies the import command to check for standard 'git show'
output and parse it accordingly.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|
|
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
|
|
Very often, the commit message you want when squashing is the message
of the first patch. So instead of simply concatenating the messages of
all the patches, put a comment delimiter after the first one, and
ignore everything after the delimiter when reading the message back
in. If the user wants to use any part of the commented-out messages,
she can move text around however she wants, including deleting the
comment delimiter.
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
When reading the config values, we save all values for a given key in
a list, in the order we see them. Then, when asked for one value, we
used to return the _first_ value in the list. But the correct thing to
do in order to allow local configs (like the repository's .git/config)
to override global configs (like ~/.gitconfig) is to return the _last_
value.
Signed-off-by: Karl Wiberg <kha@treskal.com>
|
|
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
|