Remove repo-config
Subsystems (2)
'git config' has been used in place of 'git repo-config' for some time in the documentation and most of the tools, so remove traces of repo-config from the source.
---
Mainly a request for comment, but I sent this patch becuase I noticed repo-config is not even listed in command-list.txt. Before the 1.5.4 release, I would think it either needs to be listed there or removed entirely.
Looking forward to 1.5.5, is there any reason to keep an old command like this around? It is rarely used and needlessly complicates things, and the manpage did nothing but send you to config anyway.
All tests pass on Linux 2.6.23.
-Dan
Documentation/git-repo-config.txt | 18 ------------------ Makefile | 4 ++-- contrib/completion/git-completion.bash | 1 - contrib/examples/git-tag.sh | 1 + git.c | 1 - t/t0020-crlf.sh | 24 ++++++++++++------------ t/t9200-git-cvsexportcommit.sh | 2 +- templates/hooks--update | 8 ++++---- 8 files changed, 20 insertions(+), 39 deletions(-) delete mode 100644 Documentation/git-repo-config.txt
Documentation/git-repo-config.txt deleted +0 -18
@@ -1,18 +0,0 @@ -git-repo-config(1) -================== - -NAME ----- -git-repo-config - Get and set repository or global options - - -SYNOPSIS --------- -'git-repo-config' ... - - -DESCRIPTION ------------ - -This is a synonym for linkgit:git-config[1]. Please refer to the -documentation of that command.
Makefile +2 -2
@@ -262,7 +262,7 @@ EXTRA_PROGRAMS = BUILT_INS = \ git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \ - git-get-tar-commit-id$X git-init$X git-repo-config$X \ + git-get-tar-commit-id$X git-init$X \ git-fsck-objects$X git-cherry-pick$X git-peek-remote$X git-status$X \ $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
@@ -1145,7 +1145,7 @@ check-docs:: case "$$v" in \ git-merge-octopus | git-merge-ours | git-merge-recursive | \ git-merge-resolve | git-merge-stupid | git-merge-subtree | \ - git-fsck-objects | git-init-db | git-repo-config | \ + git-fsck-objects | git-init-db | \ git-?*--?* ) continue ;; \ esac ; \ test -f "Documentation/$$v.txt" || \
contrib/completion/git-completion.bash +0 -1
@@ -333,7 +333,6 @@ __git_commands () read-tree) : plumbing;; receive-pack) : plumbing;; reflog) : plumbing;; - repo-config) : plumbing;; rerere) : plumbing;; rev-list) : plumbing;; rev-parse) : plumbing;;
contrib/examples/git-tag.sh +1 -0
@@ -167,6 +167,7 @@ type=$(git cat-file -t $object) || exit 1 tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1 test -n "$username" || + #NOTE: 'git repo-config' has since been replaced by 'git config' username=$(git repo-config user.signingkey) || username=$(expr "z$tagger" : 'z\(.*>\)')
git.c +0 -1
@@ -340,7 +340,6 @@ static void handle_internal_command(int argc, const char **argv) { "push", cmd_push, RUN_SETUP }, { "read-tree", cmd_read_tree, RUN_SETUP }, { "reflog", cmd_reflog, RUN_SETUP }, - { "repo-config", cmd_config }, { "rerere", cmd_rerere, RUN_SETUP }, { "reset", cmd_reset, RUN_SETUP }, { "rev-list", cmd_rev_list, RUN_SETUP },
t/t0020-crlf.sh +12 -12
@@ -19,7 +19,7 @@ remove_cr () { test_expect_success setup ' - git repo-config core.autocrlf false && + git config core.autocrlf false && for w in Hello world how are you; do echo $w; done >one && mkdir dir &&
@@ -46,7 +46,7 @@ test_expect_success 'update with autocrlf=input' ' rm -f tmp one dir/two three && git read-tree --reset -u HEAD && - git repo-config core.autocrlf input && + git config core.autocrlf input && for f in one dir/two do
@@ -70,7 +70,7 @@ test_expect_success 'update with autocrlf=true' ' rm -f tmp one dir/two three && git read-tree --reset -u HEAD && - git repo-config core.autocrlf true && + git config core.autocrlf true && for f in one dir/two do
@@ -93,7 +93,7 @@ test_expect_success 'update with autocrlf=true' ' test_expect_success 'checkout with autocrlf=true' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf true && + git config core.autocrlf true && git read-tree --reset -u HEAD && for f in one dir/two
@@ -117,7 +117,7 @@ test_expect_success 'checkout with autocrlf=true' ' test_expect_success 'checkout with autocrlf=input' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf input && + git config core.autocrlf input && git read-tree --reset -u HEAD && for f in one dir/two
@@ -143,7 +143,7 @@ test_expect_success 'checkout with autocrlf=input' ' test_expect_success 'apply patch (autocrlf=input)' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf input && + git config core.autocrlf input && git read-tree --reset -u HEAD && git apply patch.file &&
@@ -156,7 +156,7 @@ test_expect_success 'apply patch (autocrlf=input)' ' test_expect_success 'apply patch --cached (autocrlf=input)' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf input && + git config core.autocrlf input && git read-tree --reset -u HEAD && git apply --cached patch.file &&
@@ -169,7 +169,7 @@ test_expect_success 'apply patch --cached (autocrlf=input)' ' test_expect_success 'apply patch --index (autocrlf=input)' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf input && + git config core.autocrlf input && git read-tree --reset -u HEAD && git apply --index patch.file &&
@@ -183,7 +183,7 @@ test_expect_success 'apply patch --index (autocrlf=input)' ' test_expect_success 'apply patch (autocrlf=true)' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf true && + git config core.autocrlf true && git read-tree --reset -u HEAD && git apply patch.file &&
@@ -196,7 +196,7 @@ test_expect_success 'apply patch (autocrlf=true)' ' test_expect_success 'apply patch --cached (autocrlf=true)' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf true && + git config core.autocrlf true && git read-tree --reset -u HEAD && git apply --cached patch.file &&
@@ -209,7 +209,7 @@ test_expect_success 'apply patch --cached (autocrlf=true)' ' test_expect_success 'apply patch --index (autocrlf=true)' ' rm -f tmp one dir/two three && - git repo-config core.autocrlf true && + git config core.autocrlf true && git read-tree --reset -u HEAD && git apply --index patch.file &&
@@ -224,7 +224,7 @@ test_expect_success '.gitattributes says two is binary' ' rm -f tmp one dir/two three && echo "two -crlf" >.gitattributes && - git repo-config core.autocrlf true && + git config core.autocrlf true && git read-tree --reset -u HEAD && if remove_cr dir/two >/dev/null
t/t9200-git-cvsexportcommit.sh +1 -1
@@ -225,7 +225,7 @@ test_expect_success \ ! git-cvsexportcommit -c $id )' -case "$(git repo-config --bool core.filemode)" in +case "$(git config --bool core.filemode)" in false) ;; *)
templates/hooks--update +4 -4
@@ -37,9 +37,9 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then fi # --- Config -allowunannotated=$(git-repo-config --bool hooks.allowunannotated) -allowdeletebranch=$(git-repo-config --bool hooks.allowdeletebranch) -allowdeletetag=$(git-repo-config --bool hooks.allowdeletetag) +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description")
@@ -53,7 +53,7 @@ fi if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then newrev_type=delete else - newrev_type=$(git-cat-file -t $newrev) + newrev_type=$(git cat-file -t $newrev) fi case "$refname","$newrev_type" in
Signature · 1 line
1.5.4.rc3
Quoted 7 lines · Dan McGee
'git config' has been used in place of 'git repo-config' for some time in the documentation and most of the tools, so remove traces of repo-config from the source.
Signed-off-by Dan McGee <[email protected]>---
Quoted 8 lines
Mainly a request for comment, but I sent this patch becuase I noticed repo-config is not even listed in command-list.txt. Before the 1.5.4 release, I would think it either needs to be listed there or removed entirely.
Looking forward to 1.5.5, is there any reason to keep an old command like this around? It is rarely used and needlessly complicates things, and the manpage did nothing but send you to config anyway.
I don't know if this should impact removing schedule, but stgit 0.14.1 (and the current development version) uses "git repo-config" instead of "git config" in stgit/config.py and certain tests
will post a patch for this as a reply
Quoted 3 lines
All tests pass on Linux 2.6.23.
-Dan
Greetings Peter
PS: i hope it is ok to add stgit people to CC
PATCH 1/1 replace "git repo-config" usage by "git config"
"git repo-config" will be removed soon
---
since i am not good at creating log messages, feel free to change it :-) built on top of kha experimental patch
passes all testcases for me
stgit/config.py | 14 +++++++------- t/t1900-mail.sh | 2 +- t/t2100-pull-policy-fetch.sh | 4 ++-- t/t2101-pull-policy-pull.sh | 4 ++-- t/t2102-pull-policy-rebase.sh | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-)
stgit/config.py +7 -7
@@ -47,7 +47,7 @@ class GitConfig: if self.__cache.has_key(name): return self.__cache[name] try: - value = Run('git', 'repo-config', '--get', name).output_one_line() + value = Run('git', 'config', '--get', name).output_one_line() except RunException: value = self.__defaults.get(name, None) self.__cache[name] = value
@@ -56,7 +56,7 @@ class GitConfig: def getall(self, name): if self.__cache.has_key(name): return self.__cache[name] - values = Run('git', 'repo-config', '--get-all', name + values = Run('git', 'config', '--get-all', name ).returns([0, 1]).output_lines() self.__cache[name] = values return values
@@ -71,23 +71,23 @@ class GitConfig: def rename_section(self, from_name, to_name): """Rename a section in the config file. Silently do nothing if the section doesn't exist.""" - Run('git', 'repo-config', '--rename-section', from_name, to_name + Run('git', 'config', '--rename-section', from_name, to_name ).returns([0, 1]).run() self.__cache.clear() def remove_section(self, name): """Remove a section in the config file. Silently do nothing if the section doesn't exist.""" - Run('git', 'repo-config', '--remove-section', name + Run('git', 'config', '--remove-section', name ).returns([0, 1]).discard_stderr().discard_output() self.__cache.clear() def set(self, name, value): - Run('git', 'repo-config', name, value).run() + Run('git', 'config', name, value).run() self.__cache[name] = value def unset(self, name): - Run('git', 'repo-config', '--unset', name) + Run('git', 'config', '--unset', name) self.__cache[name] = None def sections_matching(self, regexp):
@@ -96,7 +96,7 @@ class GitConfig: group contents, for all variable names matching the regexp. """ result = [] - for line in Run('git', 'repo-config', '--get-regexp', '"^%s$"' % regexp + for line in Run('git', 'config', '--get-regexp', '"^%s$"' % regexp ).returns([0, 1]).output_lines(): m = re.match('^%s ' % regexp, line) if m:
t/t1900-mail.sh +1 -1
@@ -6,7 +6,7 @@ test_description='Test the mail command' test_expect_success \ 'Initialize the StGIT repository' \ ' - git repo-config stgit.sender "A U Thor <[email protected]>" && + git config stgit.sender "A U Thor <[email protected]>" && for i in 1 2 3 4 5; do touch foo.txt && echo "line $i" >> foo.txt &&
t/t2100-pull-policy-fetch.sh +2 -2
@@ -19,8 +19,8 @@ test_expect_success \ (cd upstream && stg init) && stg clone upstream clone && (cd clone && - git repo-config branch.master.stgit.pull-policy fetch-rebase && - git repo-config --list && + git config branch.master.stgit.pull-policy fetch-rebase && + git config --list && stg new c1 -m c1 && echo a > file && git add file && stg refresh )
t/t2101-pull-policy-pull.sh +2 -2
@@ -19,8 +19,8 @@ test_expect_success \ (cd upstream && stg init) && stg clone upstream clone && (cd clone && - git repo-config branch.master.stgit.pull-policy pull && - git repo-config --list && + git config branch.master.stgit.pull-policy pull && + git config --list && stg new c1 -m c1 && echo a > file && git add file && stg refresh )
t/t2102-pull-policy-rebase.sh +2 -2
@@ -13,8 +13,8 @@ test_expect_success \ git branch -m master parent && stg init && stg branch --create stack && - git repo-config branch.stack.stgit.pull-policy rebase && - git repo-config --list && + git config branch.stack.stgit.pull-policy rebase && + git config --list && stg new c1 -m c1 && echo a > file && git add file && stg refresh '
Signature · 1 line
1.5.4.rc3
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 9 lines · Peter Oberndorfer
"git repo-config" will be removed soon
Signed-off-by Peter Oberndorfer <[email protected]>---
since i am not good at creating log messages, feel free to change it :-) built on top of kha experimental patch
passes all testcases for me
stgit/config.py class GitConfig: · line 53
Quoted 8 lines
stgit/config.py +1
-1@@ -47,7 +47,7 @@ class GitConfig: if self.__cache.has_key(name): return self.__cache[name] try: - value = Run('git', 'repo-config', '--get', name).output_one_line() + value = Run('git', 'config', '--get', name).output_one_line() except RunException: value = self.__defaults.get(name, None) self.__cache[name] = value
Strange that StGIT didn't abstracted out reading git config, like Git.pm and gitweb.perl did.
BTW. will StGIT be using libgit-thin + PyGit, or is it not ready yet?
Signature · 3 lines
Jakub Narebski Poland ShadeHawk on #git
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 10 lines · Jakub Narebski
Quoted 7 lines · Peter Oberndorfer
"git repo-config" will be removed soon
Signed-off-by Peter Oberndorfer <[email protected]>---
since i am not good at creating log messages, feel free to change it :-) built on top of kha experimental patch
passes all testcases for me
Quoted 5 lines
stgit/config.py class GitConfig: · line 50
Quoted 5 lines
stgit/config.py +0
-1@@ -47,7 +47,7 @@ class GitConfig: if self.__cache.has_key(name): return self.__cache[name] try: - value = Run('git', 'repo-config', '--get',
name).output_one_line()
Quoted 8 lines
stgit/config.py class GitConfig: · line 53
Quoted 4 lines
stgit/config.py +1
-0+ value = Run('git', 'config', '--get', name).output_one_line() except RunException: value = self.__defaults.get(name, None) self.__cache[name] = valueStrange that StGIT didn't abstracted out reading git config, like Git.pm and gitweb.perl did.
It is abstracted, that is why the patch only affectes stgit/config.py :-) (beside tests)
Or do you mean another type of abstraction like loading the whole config file at once?
Quoted 2 lines
BTW. will StGIT be using libgit-thin + PyGit, or is it not ready yet?
I did not hear about it lately.
But since i do not create stgit patches very often i have to say actually i actually have no idea.
Greetings Peter
Quoted 5 lines · Dan McGee
'git config' has been used in place of 'git repo-config' for some time in the documentation and most of the tools, so remove traces of repo-config from the source.
Signed-off-by Dan McGee <[email protected]>
I'd agree with the deprecation. We stopped advertising it long time ago (1.5.0 I think).
Documentation/git-repo-config.txt
Quoted 1 line
Documentation/git-repo-config.txt +0
-0
Let's defer the removal til post 1.5.4.
Makefile
Quoted 1 line
Makefile +0
-0
Likewise.
contrib/completion/git-completion.bash
Quoted 1 line
contrib/completion/git-completion.bash +0
-0
Likewise.
contrib/examples/git-tag.sh type=$(git cat-file -t $object) || exit 1 · line 172
Quoted 11 lines
contrib/examples/git-tag.sh +1
-0@@ -167,6 +167,7 @@ type=$(git cat-file -t $object) || exit 1 tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1 test -n "$username" || + #NOTE: 'git repo-config' has since been replaced by 'git config' username=$(git repo-config user.signingkey) || username=$(expr "z$tagger" : 'z\(.*>\)')
Good.
git.c
Quoted 1 line
git.c +0
-0
Deferred.
t/t9200-git-cvsexportcommit.sh
Quoted 2 lines
t/t0020-crlf.sh +0
-0t/t9200-git-cvsexportcommit.sh +0
-0
Doing s/repo-config/config/ in test scripts is good.
Quoted 7 lines
templates/hooks--update +0
-0@@ -37,9 +37,9 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then fi
templates/hooks--update if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then · line 45
Quoted 10 lines
templates/hooks--update +3
-3# --- Config -allowunannotated=$(git-repo-config --bool hooks.allowunannotated) -allowdeletebranch=$(git-repo-config --bool hooks.allowdeletebranch) -allowdeletetag=$(git-repo-config --bool hooks.allowdeletetag) +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description")
Good.
templates/hooks--update fi · line 59
Quoted 9 lines
templates/hooks--update +1
-1@@ -53,7 +53,7 @@ fi if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then newrev_type=delete else - newrev_type=$(git-cat-file -t $newrev) + newrev_type=$(git cat-file -t $newrev) fi case "$refname","$newrev_type" in
Good but does not belong to the topic.
I do not think it is unreasonable to add repo-config to feature removal schedule in 1.5.4 release notes. Perhaps something like...
Documentation/RelNotes-1.5.4.txt +4 -0
@@ -46,6 +46,10 @@ Deprecation notices and works for all transports; "git peek-remote" will be removed in the future. + * "git repo-config", which was an old name for "git config" command, + has been supported without being advertised for a long time. The + next feature release will remove it. + * From v1.6.0, the repack.usedeltabaseoffset config option will default to true, which will give denser packfiles (i.e. more efficient storage). The downside is that git older than version 1.4.4 will not be able
Documentation/RelNotes-1.5.4.txt Deprecation notices · line 52
Quoted 7 lines · Junio C Hamano
I do not think it is unreasonable to add repo-config to feature removal schedule in 1.5.4 release notes. Perhaps something like...
+ * "git repo-config", which was an old name for "git config" command,
Documentation/RelNotes-1.5.4.txt +3
-0+ has been supported without being advertised for a long time. The + next feature release will remove it. +
Seems fine to me. Does it need to be put in command-list.txt for the time being too, or what all is that file used for? Sorry I am not familiar.
Something like:
git-repo-config ancillarymanipulators deprecated
Quoted 9 lines · Dan McGee
Documentation/RelNotes-1.5.4.txt Deprecation notices · line 52
Quoted 7 lines · Junio C Hamano
I do not think it is unreasonable to add repo-config to feature removal schedule in 1.5.4 release notes. Perhaps something like...
+ * "git repo-config", which was an old name for "git config" command,
Documentation/RelNotes-1.5.4.txt +3
-0+ has been supported without being advertised for a long time. The + next feature release will remove it. +
Quoted 5 lines
Seems fine to me. Does it need to be put in command-list.txt for the time being too, or what all is that file used for? Sorry I am not familiar.
Something like:
git-repo-config ancillarymanipulators deprecated
Technically, you are right, but somehow it feels backwards.
We stopped advertising the existence of the command in v1.5.0, and adding it to the list now would mean we need to add a new git-repo-config manual page that says "This is deprecated, use git-config instead".
Quoted 15 lines · Junio C Hamano
Quoted 13 lines · Dan McGee
Documentation/RelNotes-1.5.4.txt Deprecation notices · line 52
Quoted 7 lines · Junio C Hamano
I do not think it is unreasonable to add repo-config to feature removal schedule in 1.5.4 release notes. Perhaps something like...
+ * "git repo-config", which was an old name for "git config" command,
Documentation/RelNotes-1.5.4.txt +3
-0+ has been supported without being advertised for a long time. The + next feature release will remove it. +Seems fine to me. Does it need to be put in command-list.txt for the time being too, or what all is that file used for? Sorry I am not familiar.
Something like:
Quoted 8 lines
Quoted 1 line
git-repo-config ancillarymanipulators deprecated
Technically, you are right, but somehow it feels backwards.
We stopped advertising the existence of the command in v1.5.0, and adding it to the list now would mean we need to add a new git-repo-config manual page that says "This is deprecated, use git-config instead".
This comment was wrong. We can keep the existing repo-config documentation that has deprecation notice, and add the above line to the list.
Sorry about the confusion.
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
In reply to Jakub NarebskiHi,
Now I'm back from holiday and I'll start merging patches. Thanks for the fixes.
Quoted 2 lines · Jakub Narebski
Strange that StGIT didn't abstracted out reading git config, like Git.pm and gitweb.perl did.
The initial implementation was to use Python to parse the config file but it was dropped in favour of the git-config tool. It might be a bit slower but, at least, we don't need to follow any future syntax changes.
Quoted 1 line
BTW. will StGIT be using libgit-thin + PyGit, or is it not ready yet?
The last commit to the libgit project seems to be in August 2007. Is it still maintained? If GIT will provide a stable API and library, we might use it but I don't think it would bring a great performance improvement. Most of the time, in my case, seems to be spent in calls list git-diff-tree. A few tens of milliseconds avoided by not calling an external tool would be unnoticed.
Signature · 1 line
Catalin
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 4 lines · Catalin Marinas
Now I'm back from holiday and I'll start merging patches. Thanks for the fixes.
Quoted 8 lines
Quoted 2 lines · Jakub Narebski
Strange that StGIT didn't abstracted out reading git config, like Git.pm and gitweb.perl did.
The initial implementation was to use Python to parse the config file but it was dropped in favour of the git-config tool. It might be a bit slower but, at least, we don't need to follow any future syntax changes.
Errr... this is not what I meant. What I meant here is why StGit doesn't have a thin wrapper around "git config", so instead of all those calls to "Run('git', 'config', '--get', name)" use "git_config(name)" etc., similarly to Git.pm and gitweb.perl (which also use git-config to parse the config file; only git-cvsimport parses config file in Perl IIRC).
This way if you want to load the whole config file at once (like gitweb now does, using "git config -z -l") you would have to make changes only in one place.
Signature · 2 lines
Jakub Narebski Poland
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
In reply to Peter OberndorferQuoted 3 lines · Peter Oberndorfer
"git repo-config" will be removed soon
Signed-off-by Peter Oberndorfer <[email protected]>
Thanks, I'll apply this tonight. (Along with Pavel's "stg edit --sign" patch, which I've been neglecting for quite a while now. Sorry!)
Quoted 1 line
since i am not good at creating log messages, feel free to change it :-)
I'm going to end the commit message body sentence with a period, but otherwise it's totally OK.
Signature · 2 lines
Karl Hasselström, [email protected] www.treskal.com/kalle
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 2 lines · Karl Hasselström
Thanks, I'll apply this tonight. (Along with Pavel's "stg edit --sign" patch, which I've been neglecting for quite a while now. Sorry!)
The following changes since commit 5b2666bab799830ac5e511f35103d04fc3968b32:
Catalin Marinas (1):
Remove a newline from the e-mail template
are available in the git repository at:
git://repo.or.cz/stgit/kha.git safe
David Kågedal (2):
Emacs mode: Add mark command
Emacs mode: coalesce command
Karl Hasselström (12):
Teach the new infrastructure about the index and worktree Let "stg clean" use the new transaction primitives Let "stg goto" use the new infrastructure
Convert "stg uncommit" to the new infrastructure New infrastructure: Make sure that the branch is initialized Expose transaction abort function
stg coalesce: Support --file and --save-template Set exit code to 3 on merge conflict
Convert "stg commit" to new infrastructure
Make "stg commit" fancier
Test that "stg goto" can be called from a subdirectory Make "stg goto" subdirectory safe
Pavel Roskin (1):
Fix "stg edit --sign"
Peter Oberndorfer (2):
Don't mention removed "stg refresh" options replace "git repo-config" usage by "git config"
contrib/stgit.el | 97 ++++++++++++++++++----- stgit/commands/clean.py | 35 ++------ stgit/commands/coalesce.py | 118 ++++++++++++++++++--------- stgit/commands/commit.py | 111 ++++++++++++++++---------- stgit/commands/edit.py | 5 +- stgit/commands/goto.py | 52 ++++-------- stgit/commands/refresh.py | 8 +- stgit/commands/uncommit.py | 81 ++++++++----------- stgit/config.py | 14 ++-- stgit/lib/git.py | 128 +++++++++++++++++++++++++++++ stgit/lib/stack.py | 10 ++- stgit/lib/stackupgrade.py | 6 +- stgit/lib/transaction.py | 178 +++++++++++++++++++++++++++++++++++------ stgit/main.py | 4 +- stgit/run.py | 9 ++- stgit/utils.py | 1 + t/t1300-uncommit.sh | 12 ++-- t/t1900-mail.sh | 2 +- t/t2100-pull-policy-fetch.sh | 4 +- t/t2101-pull-policy-pull.sh | 4 +- t/t2102-pull-policy-rebase.sh | 4 +- t/t2800-goto-subdir.sh | 59 ++++++++++++++ 22 files changed, 675 insertions(+), 267 deletions(-) create mode 100755 t/t2800-goto-subdir.sh
-+-
The following changes since commit 085902b45b9bea3fa5bc14470219891ec4ccba78:
Peter Oberndorfer (1):
replace "git repo-config" usage by "git config"
are available in the git repository at:
git://repo.or.cz/stgit/kha.git experimental
Peter Oberndorfer (1):
Add an --index option to "stg refresh"
stgit/commands/refresh.py | 25 ++++++++++++++++--- t/t2700-refresh.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 5 deletions(-)
Signature · 2 lines
Karl Hasselström, [email protected] www.treskal.com/kalle
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Hi Karl,
Quoted 7 lines · Karl Hasselström
The following changes since commit
5b2666bab799830ac5e511f35103d04fc3968b32:
Catalin Marinas (1):
Remove a newline from the e-mail templateare available in the git repository at:
git://repo.or.cz/stgit/kha.gitsafe
[...]
Quoted 3 lines
Teach the new infrastructure about the index and worktree Let "stg clean" use the new transaction primitives Let "stg goto" use the new infrastructure
I merged your patches but I have some wishes. Could we keep pretty much the same reporting messages? For example, pushing reports a conflict but it no longer lists which files conflicted. The 'goto' checks the local status before pushing but doesn't report this (and my machine is slow and it might wait even 20 seconds or more, it is useful to get some messages).
The pop/push commands report that the action took place. The one with "action ... done" was friendlier I think, especially with the 'pop' command reporting that it popped the patches but it waits quite a lot before returning.
Thanks.
Signature · 1 line
Catalin
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 8 lines · Catalin Marinas
Quoted 2 lines · Karl Hasselström
The following changes since commit
5b2666bab799830ac5e511f35103d04fc3968b32:I merged your patches but I have some wishes. Could we keep pretty much the same reporting messages? For example, pushing reports a conflict but it no longer lists which files conflicted.
Mmm, that's a regression. Will try to see where that got lost.
Quoted 3 lines
The 'goto' checks the local status before pushing but doesn't report this (and my machine is slow and it might wait even 20 seconds or more, it is useful to get some messages).
No, it doesn't anymore, so it should be faster than before. Instead of checking the entire tree for cleanliness, it just relies on git-read-tree -u -m to abort without changes if any of the files that need updating are dirty.
This goes for all commands using the new infrastructure, by the way. They share a _lot_ of code.
Quoted 4 lines
The pop/push commands report that the action took place. The one with "action ... done" was friendlier I think, especially with the 'pop' command reporting that it popped the patches but it waits quite a lot before returning.
Yes, I agree that the current output is not optimal.
Signature · 2 lines
Karl Hasselström, [email protected] www.treskal.com/kalle
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 9 lines · Karl Hasselström
Quoted 3 lines · Catalin Marinas
The 'goto' checks the local status before pushing but doesn't report this (and my machine is slow and it might wait even 20 seconds or more, it is useful to get some messages).
No, it doesn't anymore, so it should be faster than before. Instead of checking the entire tree for cleanliness, it just relies on git-read-tree -u -m to abort without changes if any of the files that need updating are dirty.
Ah, OK. BTW, even if the tree was clean, a 'goto' failed on my Linux tree earlier today with the following message:
$ stg goto realview-eb-header Popped realview-pb1176 -- realview-ioaddress fatal: Entry 'arch/arm/mach-realview/realview_pb11mp.c' not uptodate. Cannot merge. stg goto: Command aborted (all changes rolled back)
It worked fine after running 'stg status' once (and not showing any changes). In the old GIT interface, we use to call refresh_index (i.e. 'git update-index -q --unmerged --refresh'). Does this still happen?
The message above also shows what I meant with messages not being very clear. It reports "Popped" but actually failed. Showing "Popping ... done" would be better.
Signature · 1 line
Catalin
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 17 lines · Catalin Marinas
Quoted 5 lines · Karl Hasselström
Quoted 1 line · Catalin Marinas
The 'goto' checks the local status before pushing
No, it doesn't anymore
Ah, OK. BTW, even if the tree was clean, a 'goto' failed on my Linux tree earlier today with the following message:
$ stg goto realview-eb-header Popped realview-pb1176 -- realview-ioaddress fatal: Entry 'arch/arm/mach-realview/realview_pb11mp.c' not uptodate. Cannot merge. stg goto: Command aborted (all changes rolled back)
Quoted 3 lines
It worked fine after running 'stg status' once (and not showing any changes). In the old GIT interface, we use to call
refresh_index(i.e. 'git update-index -q --unmerged --refresh'). Does this still happen?
Ah, no, I guess it doesn't. And I guess it should. We should probably have a test for that ...
Quoted 3 lines
The message above also shows what I meant with messages not being very clear. It reports "Popped" but actually failed. Showing "Popping ... done" would be better.
Not necessarily. Even with the latter message style, you'd sometimes get sequences like this:
Popping p3 -- p1 ... done
Pushing p4 ... done
Pushing p5 ... done
fatal: Entry 'some/annoying/file' not uptodate. Cannot merge.
stg cool-command: Command aborted (all changes rolled back)
That is, the sequence of pushes and pops succeeded, but the changes were still rolled back due to a dirty worktree.
Now, this doesn't mean I don't agree with you about the "done" messages -- they serve as a kind of progress bar -- but just because it says "done" doesn't mean the change will still be in effect when the command returns.
And there should probably be an explicit "Checking out files ... done" stage when we run git-read-tree, since that tends to take relatively much time.
Signature · 2 lines
Karl Hasselström, [email protected] www.treskal.com/kalle
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 7 lines · Karl Hasselström
Quoted 6 lines · Catalin Marinas
$ stg goto realview-eb-header Popped realview-pb1176 -- realview-ioaddress fatal: Entry 'arch/arm/mach-realview/realview_pb11mp.c' not uptodate. Cannot merge. stg goto: Command aborted (all changes rolled back)
Quoted 6 lines
Quoted 3 lines
It worked fine after running 'stg status' once (and not showing any changes). In the old GIT interface, we use to call
refresh_index(i.e. 'git update-index -q --unmerged --refresh'). Does this still happen?Ah, no, I guess it doesn't. And I guess it should. We should probably have a test for that ...
Yes.
Another thing, can the '--keep' option be added? Can it work with the new structure? I use it quite often as I make some minor modification and I'd like to pop patches without affecting the local changes.
Quoted 3 lines
And there should probably be an explicit "Checking out files ... done" stage when we run git-read-tree, since that tends to take relatively much time.
Yes, that would be useful as well.
Signature · 1 line
Catalin
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 4 lines · Catalin Marinas
Another thing, can the '--keep' option be added? Can it work with the new structure? I use it quite often as I make some minor modification and I'd like to pop patches without affecting the local changes.
As is, it works out of the box as long as your local changes are in files not touched by the command.
Making it work in other cases as well should be doable -- behind the scenes, we'd save the local changes much like a patch, and try to apply it at the end. (In fact, we should probably not create this "patch" until git-read-tree tells us it can't do its job due to local changes.)
Adding the --keep flag once would make it available for all commands using the new infrastructure.
Signature · 2 lines
Karl Hasselström, [email protected] www.treskal.com/kalle
Re: [STGIT PATCH] replace "git repo-config" usage by "git config"
Quoted 9 lines · Karl Hasselström
Quoted 4 lines · Catalin Marinas
Another thing, can the '--keep' option be added? Can it work with the new structure? I use it quite often as I make some minor modification and I'd like to pop patches without affecting the local changes.
As is, it works out of the box as long as your local changes are in files not touched by the command.
It used to work in this case as well :-).
Quoted 5 lines
Making it work in other cases as well should be doable -- behind the scenes, we'd save the local changes much like a patch, and try to apply it at the end. (In fact, we should probably not create this "patch" until git-read-tree tells us it can't do its job due to local changes.)
My simple approach was to apply the cumulated diff of the patches to be popped in reverse (and change the top of the stack). If there are no conflicts, it works just fine. If it cannot do this, there might be conflicts and I create a temporary patch manually. Merging that patch would probably lead to conflicts needing to be solved.
For the push operation, we try the diff applying followed by a three-way merge if the former fails. We could do something similar with the pop operation for keeping the local changes - try the reversed diff or create a temporary patch automatically.
But, I'd really like for this not to be enabled by default. I might forget to refresh a patch and will go to another just to realise that there are uncommitted changes, hence the "check_local_changes()" call for most of the commands affecting the stack.
Signature · 1 line
Catalin