Skip to contentSkip to conversation

Trouble in making an commit .

PATCH Santhosh Pai 4 participants 9 messages Jun 16, 2015 – Jun 18, 2015 Staging

lore
Share & tools
lore
#0 lore raw

Hello Team,
I'm trying to make a commit to a checkpatch fix , and i have followed the instructions in the first patch tutorial but i'm not able to commit . Following were the steps done .
1)Made changes to the file

2)Run git diff command got the below output

drivers/staging/comedi/comedi_fops.c +0 -0
index 146ab00..02a41bc 100644
@@ -2611,7 +2611,7 @@ static int comedi_open(struct inode *inode, struct file *file)

??????? }
??????? if (dev->attached && dev->use_count == 0) {
??????????????? if (!try_module_get(dev->driver->module)) { -?????????????????????? rc = -ENOSYS;
+?????????????????????? rc = -ENODATA;
??????????????????????? goto out;
??????????????? }
??????????????? if (dev->open) {
3) when i run git commit -a? i get the below message and the same goes for git commit -s -v

bash-4.2$ git commit -a
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...] common diff options:
? -z??????????? output diff-raw with lines terminated with NUL.
? -p??????????? output patch format.
? -u??????????? synonym for -p.
? --patch-with-raw
??????????????? output both a patch and the diff-raw format.
? --stat??????? show diffstat instead of patch.
? --numstat???? show numeric diffstat instead of patch.
? --patch-with-stat
??????????????? output a patch and prepend its diffstat.
? --name-only?? show only names of changed files.
? --name-status show names and status of changed files.
? --full-index? show full object name on index lines.
? --abbrev=<n>? abbreviate object names in diff-tree header and diff-raw. ? -R??????????? swap input file pairs.
? -B??????????? detect complete rewrites.
? -M??????????? detect renames.
? -C??????????? detect copies.
? --find-copies-harder
??????????????? try unchanged files as candidate for copy detection.
? -l<n>???????? limit rename attempts up to <n> paths.
? -O<file>????? reorder diffs according to the <file>.
? -S<string>??? find filepair whose only one side contains the string. ? --pickaxe-all
??????????????? show all files diff when -S is used and hit is found. ? -a? --text??? treat all files as text.

i'm not able to commit the changes ,let us know what could be the problem . Below is the details of the git version

git version 1.7.11.7OS : Fedora

Regards,
Santosh Pai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150616/36320bbd/attachment.html

#1 lore raw

Hi Santhosh,

You could try:

git add drivers/staging/comedi/comedi_fops.c
git commit

Does this work?

S?bastien.

#2 lore raw

Hello Sebastain ,
The issue remains the same , i'm unable to perform commit . Below is the o/p

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c
bash-4.2$ git commit -s -v
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...] common diff options:
? -z??????????? output diff-raw with lines terminated with NUL.
? -p??????????? output patch format.
? -u??????????? synonym for -p.
? --patch-with-raw
??????????????? output both a patch and the diff-raw format.
? --stat??????? show diffstat instead of patch.
? --numstat???? show numeric diffstat instead of patch.
? --patch-with-stat
??????????????? output a patch and prepend its diffstat.
? --name-only?? show only names of changed files.
? --name-status show names and status of changed files.
? --full-index? show full object name on index lines.
? --abbrev=<n>? abbreviate object names in diff-tree header and diff-raw. ? -R??????????? swap input file pairs.
? -B??????????? detect complete rewrites.
? -M??????????? detect renames.
? -C??????????? detect copies.
? --find-copies-harder
??????????????? try unchanged files as candidate for copy detection.
? -l<n>???????? limit rename attempts up to <n> paths.
? -O<file>????? reorder diffs according to the <file>.
? -S<string>??? find filepair whose only one side contains the string. ? --pickaxe-all
??????????????? show all files diff when -S is used and hit is found. ? -a? --text??? treat all files as text.

bash-4.2$ git commit
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...] common diff options:
? -z??????????? output diff-raw with lines terminated with NUL.
? -p??????????? output patch format.
? -u??????????? synonym for -p.
? --patch-with-raw
??????????????? output both a patch and the diff-raw format.
? --stat??????? show diffstat instead of patch.
? --numstat???? show numeric diffstat instead of patch.
? --patch-with-stat
??????????????? output a patch and prepend its diffstat.
? --name-only?? show only names of changed files.
? --name-status show names and status of changed files.
? --full-index? show full object name on index lines.
? --abbrev=<n>? abbreviate object names in diff-tree header and diff-raw. ? -R??????????? swap input file pairs.
? -B??????????? detect complete rewrites.
? -M??????????? detect renames.
? -C??????????? detect copies.
? --find-copies-harder
??????????????? try unchanged files as candidate for copy detection.
? -l<n>???????? limit rename attempts up to <n> paths.
? -O<file>????? reorder diffs according to the <file>.
? -S<string>??? find filepair whose only one side contains the string. ? --pickaxe-all
??????????????? show all files diff when -S is used and hit is found. ? -a? --text??? treat all files as text.

bash-4.2$

Regards
Santosh Pai

On Tuesday, June 16, 2015 11:53 AM, S?bastien Hinderer <[email protected]> wrote:

Hi Santhosh,

You could try:

git add drivers/staging/comedi/comedi_fops.c
git commit

Does this work?

S?bastien.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150617/0f0dbdd3/attachment.html

#3 lore raw

Hi Santhosh,

Santhosh Pai (2015/06/17 18:01 +0000):

Quoted 5 lines

Hello Sebastain ,
The issue remains the same , i'm unable to perform commit . Below is the o/p

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c bash-4.2$ git commit -s -v

In my suggestion there were not options to git commit... Can you please try without?
At least without the -v...

If it does still not work, please provide output of git status.

S?bastien.

#4 lore raw
Quoted 6 lines · S?bastien Hinderer

Hi Santhosh,

Santhosh Pai (2015/06/17 18:01 +0000):

Quoted 3 lines

Hello Sebastain ,
The issue remains the same , i'm unable to perform commit . Below is the o/p

Quoted 6 lines
Quoted 2 lines

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c bash-4.2$ git commit -s -v

In my suggestion there were not options to git commit... Can you please try without?
At least without the -v...

-s and -v both are valid options, I just tried and it worked for me. what is showing on the screen after you give the command git commit -s -v

regards
sudip

#5 lore raw
In reply to Santhosh Pai
Quoted 8 lines · Santhosh Pai

The issue remains the same , i'm unable to perform commit . Below is the o/p

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c
bash-4.2$ git commit -s -v
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]

This is odd. You?re calling git commit, but you?re getting usage information for git diff-index.

How did you install git? Have you tried reinstalling? Do you have any odd symlinks/aliases/shell functions/ ? related to git?

Regards,
Kristof

#6 lore raw

Kristof Provost (2015/06/18 09:54 +0200):

Quoted 10 lines
Quoted 8 lines · Santhosh Pai

The issue remains the same , i'm unable to perform commit . Below is the o/p

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c
bash-4.2$ git commit -s -v
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]

This is odd. You?re calling git commit, but you?re getting usage

Quoted 1 line

information for git diff-index.

Isn't that because of the -v option which may require this call to show differences?

S?bastien.

#7 lore raw
Quoted 9 lines · S?bastien Hinderer

Kristof Provost (2015/06/18 09:54 +0200):

Quoted 5 lines
Quoted 5 lines · Santhosh Pai

The issue remains the same , i'm unable to perform commit . Below is the o/p

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c
bash-4.2$ git commit -s -v
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]

This is odd. You?re calling git commit, but you?re getting usage

Quoted 1 line

information for git diff-index.

Isn't that because of the -v option which may require this call to show differences?

This doesn?t suggest that that?s likely:

# git commit -v -s --bad-option
error: unknown option `bad-option?
usage: git commit [options] [--] <pathspec>?

That?s with git (git version 2.3.2 (Apple Git-55)).

Regards,
Kristof

#8 lore raw

Hello All,
I had given the o/p of git status in the previous mail , its still the same .
1) Git commit o/p

bash-4.2$ git commitusage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]common diff options:? -z ? ? ? ? ? ?output diff-raw with lines terminated with NUL.? -p ? ? ? ? ? ?output patch format.? -u ? ? ? ? ? ?synonym for -p.? --patch-with-raw? ? ? ? ? ? ? ? output both a patch and the diff-raw format.? --stat ? ? ? ?show diffstat instead of patch.? --numstat ? ? show numeric diffstat instead of patch.? --patch-with-stat? ? ? ? ? ? ? ? output a patch and prepend its diffstat.? --name-only ? show only names of changed files.? --name-status show names and status of changed files.? --full-index ?show full object name on index lines.? --abbrev=<n> ?abbreviate object names in diff-tree header and diff-raw.? -R ? ? ? ? ? ?swap input file pairs.? -B ? ? ? ? ? ?detect complete rewrites.? -M ? ? ? ? ? ?detect renames.? -C ? ? ? ? ? ?detect copies.? --find-copies-harder? ? ? ? ? ? ? ? try unchanged files as candidate for copy detection.? -l<n> ? ? ? ? limit rename attempts up to <n> paths.? -O<file> ? ? ?reorder diffs according to the <file>.? -S<string> ? ?find filepair whose only one side contains the string.? --pickaxe-all? ? ? ? ? ? ? ? show all files diff when -S is used and hit is found.? -a ?--text ? ?treat all files as text. bash-4.2$
2) And the output of the git status is below?

bash-4.2$ git status
# On branch first-patch# Changes to be committed:# ? (use "git reset HEAD <file>..." to unstage)## modified: ? drivers/staging/comedi/comedi_fops.c## Changes not staged for commit:# ? (use "git add <file>..." to update what will be committed)# ? (use "git checkout -- <file>..." to discard changes in working directory)## modified: ? drivers/net/ethernet/intel/e1000/e1000_main.c#

Quoted 8 lines · Kristof Provost

On 18 Jun 2015, at 10:14, S?bastien Hinderer <[email protected]> wrote:

Kristof Provost (2015/06/18 09:54 +0200):

Quoted 5 lines
Quoted 5 lines · Santhosh Pai

The issue remains the same , i'm unable to perform commit . Below is the o/p

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

bash-4.2$ git add drivers/staging/comedi/comedi_fops.c
bash-4.2$ git commit -s -v
usage: git diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]

This is odd. You?re calling git commit, but you?re getting usage

Quoted 1 line

information for git diff-index.

Isn't that because of the -v option which may require this call to show differences?

This doesn?t suggest that that?s likely:

# git commit -v -s --bad-option
error: unknown option `bad-option?
usage: git commit [options] [--] <pathspec>?

That?s with git (git version 2.3.2 (Apple Git-55)).

Regards,
Kristof
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150618/69125074/attachment.html