[PATCH] samba-tool: Easily edit a users object in AD V2 with test

Alexander Bokovoy ab at samba.org
Tue Jul 4 11:13:28 UTC 2017


On ti, 04 heinä 2017, Rowland Penny via samba-technical wrote:
> On Tue, 4 Jul 2017 13:42:10 +0300
> Alexander Bokovoy <ab at samba.org> wrote:
> 
> > On ti, 04 heinä 2017, Rowland Penny via samba-technical wrote:
> > > On Tue, 4 Jul 2017 12:39:00 +0300
> > > Alexander Bokovoy <ab at samba.org> wrote:
> > > 
> > > > On ti, 04 heinä 2017, Rowland Penny via samba-technical wrote:
> > > > > On Mon, 3 Jul 2017 18:07:49 +0300
> > > > > Alexander Bokovoy <ab at samba.org> wrote:
> > > > > 
> > > > > > Looks like it works! Great!
> > > > > 
> > > > > OK, one step forward, three steps back ;-)
> > > > > 
> > > > > How do you create a new file ?
> > > > > 
> > > > > I have created the edit.sh file in my local git, but when I run:
> > > > > 
> > > > > git commit -s -a
> > > > > 
> > > > > I get:
> > > > > 
> > > > > On branch master
> > > > > Your branch is ahead of 'origin/master' by 1 commit.
> > > > >   (use "git push" to publish your local commits)
> > > > > Untracked files:
> > > > > 	python/samba/tests/samba_tool/edit.sh
> > > > > 
> > > > > nothing added to commit but untracked files present
> > > > > 
> > > > > I don't think I should run 'git push' as, from reading the
> > > > > manpage, it looks like this will try to create 'edit.sh' in the
> > > > > Samba git.
> > > > git add <file>
> > > > https://www.atlassian.com/git/tutorials/saving-changes
> > > 
> > > I did wonder about that, but 'man git commit' said this:
> > > 
> > >        The command git commit -a first looks at your working tree,
> > > notices that you have modified hello.c and removed goodbye.c, and
> > > performs necessary git add and git rm for you.
> > > 
> > > Looks like the manpage lies, because I was using '-a' and it didn't
> > > add the file ;-)
> > No, man page talks about 'git commit' which deals with the changes in
> > the index it knows about. A new file is not known yet, so it needs to
> > be added first to the index. '-a' is "accept all changes to known
> > files in the index", not "accept all changes whatsoever in my working
> > tree".
> > 
> 
> Thanks for clarifying that, but it quite clearly says:
> 
> and performs necessary git add and git rm for you.
> 
> It doesn't say 'git commit add', it says 'git add', but it doesn't. I
> had to use 'git add /path/to/edit.sh'
> It is under 'EXAMPLES' on the manpage
You need to look at the whole flow in 'EXAMPLES'. There is a
'git add hello.c' before that segment, so there is a record of 'hello.c'
in the index.


-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list